C# Класс Imgur.API.Endpoints.Impl.AlbumEndpoint

Album related actions.
Наследование: EndpointBase, IAlbumEndpoint
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AlbumEndpoint System

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

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

Приватные методы

Метод Описание
AlbumEndpoint ( IApiClient apiClient, HttpClient httpClient ) : System

Initializes a new instance of the AlbumEndpoint class.

Описание методов

AddAlbumImagesAsync() публичный Метод

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.
Результат Task

AlbumEndpoint() публичный Метод

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.
Результат System

CreateAlbumAsync() публичный Метод

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.
Результат Task

DeleteAlbumAsync() публичный Метод

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.
Результат Task

FavoriteAlbumAsync() публичный Метод

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.
Результат Task

GetAlbumAsync() публичный Метод

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.
Результат Task

GetAlbumImageAsync() публичный Метод

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.
Результат Task

GetAlbumImagesAsync() публичный Метод

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.
Результат Task>

RemoveAlbumImagesAsync() публичный Метод

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.
Результат Task

SetAlbumImagesAsync() публичный Метод

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.
Результат Task

UpdateAlbumAsync() публичный Метод

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.
Результат Task