C# Класс TradeMe.Api.Client.PhotoMethods

The PhotoMethods class contains the methods requried for making calls to the API related to photos.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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