C# Class TradeMe.Api.Client.PhotoMethods

The PhotoMethods class contains the methods requried for making calls to the API related to photos.
Afficher le fichier Open project: TradeMe/trade-me-api-wrapper Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

AddPhotoToListing() public méthode

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.
Résultat System.Xml.Linq.XDocument

MemberPhotoDetails() public méthode

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
Résultat MemberPhotos

MemberPhotoDetails() public méthode

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.
Résultat MemberPhotos

MemberPhotos() public méthode

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

Creates a query string and performs the request.

REQUIRES AUTHENTICATION.

public MemberPhotos ( ) : MemberPhotos
Résultat MemberPhotos

MemberPhotos() public méthode

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.
Résultat MemberPhotos

PhotoMethods() public méthode

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
Résultat System

RemovePhoto() public méthode

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.
Résultat string

UploadPhoto() public méthode

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.
Résultat System.Xml.Linq.XDocument

UploadPhotoFormat() public méthode

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.
Résultat System.Xml.Linq.XDocument