C# 클래스 TradeMe.Api.Client.PhotoMethods

The PhotoMethods class contains the methods requried for making calls to the API related to photos.
파일 보기 프로젝트 열기: TradeMe/trade-me-api-wrapper 1 사용 예제들

공개 메소드들

메소드 설명
AddPhotoToListing ( string photoId, string listingId ) : System.Xml.Linq.XDocument

Performs the Photo Method: Adds a photo to an auction. The currently authenticated user must be the seller. POST

REQUIRES AUTHENTICATION.

MemberPhotoDetails ( ) : MemberPhotos

Performs the Photo Method: Returns a list of the photos for the authenticated user, with extra usage data.

Creates a query string and performs the request.

REQUIRES AUTHENTICATION.

MemberPhotoDetails ( string query ) : MemberPhotos

Performs the Photo Method: Returns a list of the photos for the authenticated user, with extra usage data.

using the "query" string provided - should be the "Photos/Details.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

REQUIRES AUTHENTICATION.

MemberPhotos ( ) : MemberPhotos

Performs the Photo Method: Retrieve a list of member photos.

Creates a query string and performs the request.

REQUIRES AUTHENTICATION.

MemberPhotos ( string query ) : MemberPhotos

Performs the Photo Method: Retrieve a list of member photos

using the "query" string provided - should be the "Photos.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

REQUIRES AUTHENTICATION.

PhotoMethods ( ConnectionMethods connect ) : System

Initializes a new instance of the PhotoMethods class.

RemovePhoto ( string photoId ) : string

Performs the Photo Method: Remove a photo.

Creates a query string using the photo id provided.

REQUIRES AUTHENTICATION.

UploadPhoto ( PhotoUploadRequest up ) : System.Xml.Linq.XDocument

Performs the Photo Method: Upload a photo.

Serializes the given PhotoUploadRequest into xml and sends the message.

UploadPhotoFormat ( PhotoUploadRequest up ) : System.Xml.Linq.XDocument

Performs the Photo Method: Upload a photo.

Serializes the given PhotoUploadRequest into xml and sends the message. Loads the file and converts it to the appropriate data format for the request - it does not require the "PhotoData" field of the PhotoUploadRequest object to have anything in it.

메소드 상세

AddPhotoToListing() 공개 메소드

Performs the Photo Method: Adds a photo to an auction. The currently authenticated user must be the seller. POST

REQUIRES AUTHENTICATION.
public AddPhotoToListing ( string photoId, string listingId ) : System.Xml.Linq.XDocument
photoId string The id of the photo to add.
listingId string The ID of the listing to add the photo to.
리턴 System.Xml.Linq.XDocument

MemberPhotoDetails() 공개 메소드

Performs the Photo Method: Returns a list of the photos for the authenticated user, with extra usage data.

Creates a query string and performs the request.

REQUIRES AUTHENTICATION.
public MemberPhotoDetails ( ) : MemberPhotos
리턴 MemberPhotos

MemberPhotoDetails() 공개 메소드

Performs the Photo Method: Returns a list of the photos for the authenticated user, with extra usage data.

using the "query" string provided - should be the "Photos/Details.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

REQUIRES AUTHENTICATION.
public MemberPhotoDetails ( string query ) : MemberPhotos
query string The query string that will be added to the base url and used to connect to the API.
리턴 MemberPhotos

MemberPhotos() 공개 메소드

Performs the Photo Method: Retrieve a list of member photos.

Creates a query string and performs the request.

REQUIRES AUTHENTICATION.

public MemberPhotos ( ) : MemberPhotos
리턴 MemberPhotos

MemberPhotos() 공개 메소드

Performs the Photo Method: Retrieve a list of member photos

using the "query" string provided - should be the "Photos.xml" part of the url. It shouldn't include "http://api.trademe.co.nz/v1/".

REQUIRES AUTHENTICATION.
public MemberPhotos ( string query ) : MemberPhotos
query string The query string that will be added to the base url and used to connect to the API.
리턴 MemberPhotos

PhotoMethods() 공개 메소드

Initializes a new instance of the PhotoMethods class.
public PhotoMethods ( ConnectionMethods connect ) : System
connect ConnectionMethods A ConnectionMethods class used to make calls to the API
리턴 System

RemovePhoto() 공개 메소드

Performs the Photo Method: Remove a photo.

Creates a query string using the photo id provided.

REQUIRES AUTHENTICATION.
public RemovePhoto ( string photoId ) : string
photoId string The id of the photo to be removed.
리턴 string

UploadPhoto() 공개 메소드

Performs the Photo Method: Upload a photo.

Serializes the given PhotoUploadRequest into xml and sends the message.
public UploadPhoto ( PhotoUploadRequest up ) : System.Xml.Linq.XDocument
up PhotoUploadRequest The object that will be serialized into xml and then sent in a POST message.
리턴 System.Xml.Linq.XDocument

UploadPhotoFormat() 공개 메소드

Performs the Photo Method: Upload a photo.

Serializes the given PhotoUploadRequest into xml and sends the message. Loads the file and converts it to the appropriate data format for the request - it does not require the "PhotoData" field of the PhotoUploadRequest object to have anything in it.

public UploadPhotoFormat ( PhotoUploadRequest up ) : System.Xml.Linq.XDocument
up PhotoUploadRequest The object that will be serialized into xml and then sent in a POST message.
리턴 System.Xml.Linq.XDocument