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

Album related actions.
Inheritance: EndpointBase, IAlbumEndpoint
Afficher le fichier Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Свойство Type Description
AlbumEndpoint System

Méthodes publiques

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

Méthode Description
AlbumEndpoint ( IApiClient apiClient, HttpClient httpClient ) : System

Initializes a new instance of the AlbumEndpoint class.

Method Details

AddAlbumImagesAsync() public méthode

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

AlbumEndpoint() public méthode

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

CreateAlbumAsync() public méthode

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

DeleteAlbumAsync() public méthode

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

FavoriteAlbumAsync() public méthode

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

GetAlbumAsync() public méthode

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

GetAlbumImageAsync() public méthode

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

GetAlbumImagesAsync() public méthode

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

RemoveAlbumImagesAsync() public méthode

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

SetAlbumImagesAsync() public méthode

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

UpdateAlbumAsync() public méthode

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