C# Class Imgur.API.Endpoints.Impl.AlbumEndpoint

Album related actions.
Inheritance: EndpointBase, IAlbumEndpoint
ファイルを表示 Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Property Type Description
AlbumEndpoint System

Public Methods

Method Description
AddAlbumImagesAsync ( string albumId, IEnumerable imageIds ) : Task

Takes a list of imageIds to add to the album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.

AlbumEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the AlbumEndpoint class.

CreateAlbumAsync ( string title = null, string description = null, AlbumPrivacy privacy = null, AlbumLayout layout = null, string coverId = null, IEnumerable imageIds = null ) : Task

Create a new album.

DeleteAlbumAsync ( string albumId ) : Task

Delete an album with a given Id. You are required to be logged in as the user to delete the album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.

FavoriteAlbumAsync ( string albumId ) : Task

Favorite an album with a given Id. OAuth authentication required.

GetAlbumAsync ( string albumId ) : Task

Get information about a specific album.

GetAlbumImageAsync ( string imageId, string albumId ) : Task

Get information about an image in an album.

GetAlbumImagesAsync ( string albumId ) : Task>

Return all of the images in the album.

RemoveAlbumImagesAsync ( string albumId, IEnumerable imageIds ) : Task

Takes a list of imageIds and removes from the album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.

SetAlbumImagesAsync ( string albumId, IEnumerable imageIds ) : Task

Sets the images for an album, removes all other images and only uses the images in this request. For anonymous albums, {albumId} should be the deletehash that is returned at creation.

UpdateAlbumAsync ( string albumId, string title = null, string description = null, AlbumPrivacy privacy = null, AlbumLayout layout = null, string coverId = null, IEnumerable imageIds = null ) : Task

Update the information of an album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.

Private Methods

Method Description
AlbumEndpoint ( IApiClient apiClient, HttpClient httpClient ) : System

Initializes a new instance of the AlbumEndpoint class.

Method Details

AddAlbumImagesAsync() public method

Takes a list of imageIds to add to the album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.
/// 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 AddAlbumImagesAsync ( string albumId, IEnumerable imageIds ) : Task
albumId string The id or deletehash of the album.
imageIds IEnumerable The imageIds that you want to be added to the album.
return Task

AlbumEndpoint() public method

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

CreateAlbumAsync() public method

Create a new album.
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 CreateAlbumAsync ( string title = null, string description = null, AlbumPrivacy privacy = null, AlbumLayout layout = null, string coverId = null, IEnumerable imageIds = null ) : Task
title string The title of the album.
description string The description of the album.
privacy AlbumPrivacy Sets the privacy level of the album.
layout AlbumLayout Sets the layout to display the album.
coverId string The Id of an image that you want to be the cover of the album.
imageIds IEnumerable The imageIds that you want to be included in the album.
return Task

DeleteAlbumAsync() public method

Delete an album with a given Id. You are required to be logged in as the user to delete the album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.
/// 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 DeleteAlbumAsync ( string albumId ) : Task
albumId string The id or deletehash of the album.
return Task

FavoriteAlbumAsync() public method

Favorite an album with a 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 FavoriteAlbumAsync ( string albumId ) : Task
albumId string The album id.
return Task

GetAlbumAsync() public method

Get information about a specific album.
/// 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 GetAlbumAsync ( string albumId ) : Task
albumId string The album id.
return Task

GetAlbumImageAsync() public method

Get information about an image in an album.
/// 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 GetAlbumImageAsync ( string imageId, string albumId ) : Task
imageId string The image id.
albumId string The album id.
return Task

GetAlbumImagesAsync() public method

Return all of the images in the album.
/// 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 GetAlbumImagesAsync ( string albumId ) : Task>
albumId string The album id.
return Task>

RemoveAlbumImagesAsync() public method

Takes a list of imageIds and removes from the album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.
/// 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 RemoveAlbumImagesAsync ( string albumId, IEnumerable imageIds ) : Task
albumId string The id or deletehash of the album.
imageIds IEnumerable The imageIds that you want to be removed from the album.
return Task

SetAlbumImagesAsync() public method

Sets the images for an album, removes all other images and only uses the images in this request. For anonymous albums, {albumId} should be the deletehash that is returned at creation.
/// 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 SetAlbumImagesAsync ( string albumId, IEnumerable imageIds ) : Task
albumId string The id or deletehash of the album.
imageIds IEnumerable The imageIds that you want to be added to the album.
return Task

UpdateAlbumAsync() public method

Update the information of an album. For anonymous albums, {albumId} should be the deletehash that is returned at creation.
/// 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 UpdateAlbumAsync ( string albumId, string title = null, string description = null, AlbumPrivacy privacy = null, AlbumLayout layout = null, string coverId = null, IEnumerable imageIds = null ) : Task
albumId string The id or deletehash of the album.
title string The title of the album.
description string The description of the album.
privacy AlbumPrivacy Sets the privacy level of the album.
layout AlbumLayout Sets the layout to display the album.
coverId string The Id of an image that you want to be the cover of the album.
imageIds IEnumerable The imageIds that you want to be included in the album.
return Task