C# 클래스 Imgur.API.Endpoints.Impl.ImageEndpoint

Image related actions.
상속: EndpointBase, IImageEndpoint
파일 보기 프로젝트 열기: DamienDennehy/Imgur.API 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ImageEndpoint System

공개 메소드들

메소드 설명
DeleteImageAsync ( string imageId ) : Task

Deletes an image. For an anonymous image, {id} must be the image's deletehash. If the image belongs to your account then passing the ID of the image is sufficient.

FavoriteImageAsync ( string imageId ) : Task

Favorite an image with the given ID. OAuth authentication required.

GetImageAsync ( string imageId ) : Task

Get information about an image.

ImageEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the ImageEndpoint class.

UpdateImageAsync ( string imageId, string title = null, string description = null ) : Task

Updates the title or description of an image. You can only update an image you own and is associated with your account. For an anonymous image, {id} must be the image's deletehash.

UploadImageBinaryAsync ( byte image, string albumId = null, string title = null, string description = null ) : Task

Upload a new image using a binary file.

UploadImageStreamAsync ( Stream image, string albumId = null, string title = null, string description = null ) : Task

Upload a new image using a stream.

UploadImageUrlAsync ( string image, string albumId = null, string title = null, string description = null ) : Task

Upload a new image using a URL.

비공개 메소드들

메소드 설명
ImageEndpoint ( IApiClient apiClient, HttpClient httpClient ) : System

Initializes a new instance of the ImageEndpoint class.

메소드 상세

DeleteImageAsync() 공개 메소드

Deletes an image. For an anonymous image, {id} must be the image's deletehash. If the image belongs to your account then passing the ID of the image is sufficient.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public DeleteImageAsync ( string imageId ) : Task
imageId string The image id.
리턴 Task

FavoriteImageAsync() 공개 메소드

Favorite an image with the given ID. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public FavoriteImageAsync ( string imageId ) : Task
imageId string The image id.
리턴 Task

GetImageAsync() 공개 메소드

Get information about an image.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetImageAsync ( string imageId ) : Task
imageId string The image id.
리턴 Task

ImageEndpoint() 공개 메소드

Initializes a new instance of the ImageEndpoint class.
public ImageEndpoint ( IApiClient apiClient ) : System
apiClient IApiClient The type of client that will be used for authentication.
리턴 System

UpdateImageAsync() 공개 메소드

Updates the title or description of an image. You can only update an image you own and is associated with your account. For an anonymous image, {id} must be the image's deletehash.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public UpdateImageAsync ( string imageId, string title = null, string description = null ) : Task
imageId string The image id.
title string The title of the image.
description string The description of the image.
리턴 Task

UploadImageBinaryAsync() 공개 메소드

Upload a new image using a binary file.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public UploadImageBinaryAsync ( byte image, string albumId = null, string title = null, string description = null ) : Task
image byte A binary file.
albumId string /// The id of the album you want to add the image to. For anonymous albums, {albumId} should be the /// deletehash that is returned at creation. ///
title string The title of the image.
description string The description of the image.
리턴 Task

UploadImageStreamAsync() 공개 메소드

Upload a new image using a stream.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public UploadImageStreamAsync ( Stream image, string albumId = null, string title = null, string description = null ) : Task
image Stream A stream.
albumId string /// The id of the album you want to add the image to. For anonymous albums, {albumId} should be the /// deletehash that is returned at creation. ///
title string The title of the image.
description string The description of the image.
리턴 Task

UploadImageUrlAsync() 공개 메소드

Upload a new image using a URL.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public UploadImageUrlAsync ( string image, string albumId = null, string title = null, string description = null ) : Task
image string The URL for the image.
albumId string /// The id of the album you want to add the image to. For anonymous albums, {albumId} should be the /// deletehash that is returned at creation. ///
title string The title of the image.
description string The description of the image.
리턴 Task