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

Показать файл Открыть проект Примеры использования класса

Private Properties

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

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

Метод Описание
AccountEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the AccountEndpoint class.

DeleteAlbumAsync ( string albumId, string username = "me" ) : Task

Delete an Album with a given id. OAuth authentication required.

DeleteCommentAsync ( int commentId, string username = "me" ) : Task

Delete a comment. OAuth authentication required.

DeleteImageAsync ( string imageId, string username = "me" ) : Task

Deletes an Image. You are required to be logged in as the user whom created the image. OAuth authentication required.

GetAccountAsync ( string username = "me" ) : Task

Request standard user information. If you need the username for the account that is logged in, it is returned in the request for an access token.

GetAccountFavoritesAsync ( ) : Task>

Returns the users favorited images. OAuth authentication required.

GetAccountGalleryFavoritesAsync ( string username = "me", int page = null, AccountGallerySortOrder sort = AccountGallerySortOrder.Newest ) : Task>

Return the images the user has favorited in the gallery.

GetAccountSettingsAsync ( ) : Task

Returns the account settings. OAuth authentication required.

GetAccountSubmissionsAsync ( string username = "me", int page = null ) : Task>

Return the images a user has submitted to the gallery.

GetAlbumAsync ( string albumId, string username = "me" ) : Task

Get additional information about an album, this works the same as the Album Endpoint.

GetAlbumCountAsync ( string username = "me" ) : Task

Return a list of all of the album IDs.

GetAlbumIdsAsync ( string username = "me", int page = null ) : Task>

Return a list of all of the album IDs.

GetAlbumsAsync ( string username = "me", int page = null ) : Task>

Get all the albums associated with the account. Must be logged in as the user to see secret and hidden albums.

GetCommentAsync ( int commentId, string username = "me" ) : Task

Return information about a specific comment.

GetCommentCountAsync ( string username = "me" ) : Task

Return a count of all of the comments associated with the account.

GetCommentIdsAsync ( string username = "me", CommentSortOrder sort = CommentSortOrder.Newest, int page = null ) : Task>

Return a list of all of the comment IDs.

GetCommentsAsync ( string username = "me", CommentSortOrder sort = CommentSortOrder.Newest, int page = null ) : Task>

Return the comments the user has created.

GetGalleryProfileAsync ( string username = "me" ) : Task

The totals for a users gallery information.

GetImageAsync ( string imageId, string username = "me" ) : Task

Return information about a specific image.

GetImageCountAsync ( string username = "me" ) : Task

Returns the total number of images associated with the account. OAuth authentication required.

GetImageIdsAsync ( string username = "me", int page = null ) : Task>

Returns a list of Image IDs that are associated with the account. OAuth authentication required.

GetImagesAsync ( string username = "me", int page = null ) : Task>

Return all of the images associated with the account. You can page through the images by setting the page, this defaults to 0. OAuth authentication required.

GetNotificationsAsync ( bool newNotifications = true ) : Task

Returns all of the reply notifications for the user. OAuth authentication required.

SendVerificationEmailAsync ( ) : Task

Sends an email to the user to verify that their email is valid to upload to gallery. OAuth authentication required.

UpdateAccountSettingsAsync ( string bio = null, bool publicImages = null, bool messagingEnabled = null, AlbumPrivacy albumPrivacy = null, bool acceptedGalleryTerms = null, string username = null, bool showMature = null, bool newsletterSubscribed = null ) : Task

Updates the account settings for a given user. OAuth authentication required.

VerifyEmailAsync ( ) : Task

Checks to see if user has verified their email address. OAuth authentication required.

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

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

Initializes a new instance of the AccountEndpoint class.

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

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

Initializes a new instance of the AccountEndpoint class.
public AccountEndpoint ( IApiClient apiClient ) : System
apiClient IApiClient The type of client that will be used for authentication.
Результат System

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

Delete 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 DeleteAlbumAsync ( string albumId, string username = "me" ) : Task
albumId string The album id.
username string The user account. Default: me
Результат Task

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

Delete a comment. 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 DeleteCommentAsync ( int commentId, string username = "me" ) : Task
commentId int The comment id.
username string The user account. Default: me
Результат Task

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

Deletes an Image. You are required to be logged in as the user whom created the image. 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 DeleteImageAsync ( string imageId, string username = "me" ) : Task
imageId string The image id.
username string The user account. Default: me
Результат Task

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

Request standard user information. If you need the username for the account that is logged in, it is returned in the request for an access token.
/// 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 GetAccountAsync ( string username = "me" ) : Task
username string The user account. Default: me
Результат Task

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

Returns the users favorited images. 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 GetAccountFavoritesAsync ( ) : Task>
Результат Task>

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

Return the images the user has favorited in the gallery.
/// 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 GetAccountGalleryFavoritesAsync ( string username = "me", int page = null, AccountGallerySortOrder sort = AccountGallerySortOrder.Newest ) : Task>
username string The user account. Default: me
page int Set the page number so you don't have to retrieve all the data at once. Default: null
sort AccountGallerySortOrder The order that the account gallery should be sorted by. Default: Newest
Результат Task>

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

Returns the account settings. 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 GetAccountSettingsAsync ( ) : Task
Результат Task

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

Return the images a user has submitted to the gallery.
/// 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 GetAccountSubmissionsAsync ( string username = "me", int page = null ) : Task>
username string The user account. Default: me
page int Set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

Get additional information about an album, this works the same as the Album Endpoint.
/// 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, string username = "me" ) : Task
albumId string The album id.
username string The user account. Default: me
Результат Task

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

Return a list of all of the album IDs.
/// 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 GetAlbumCountAsync ( string username = "me" ) : Task
username string The user account. Default: me
Результат Task

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

Return a list of all of the album IDs.
/// 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 GetAlbumIdsAsync ( string username = "me", int page = null ) : Task>
username string The user account. Default: me
page int Allows you to set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

Get all the albums associated with the account. Must be logged in as the user to see secret and hidden albums.
/// 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 GetAlbumsAsync ( string username = "me", int page = null ) : Task>
username string The user account. Default: me
page int Allows you to set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

Return information about a specific comment.
/// 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 GetCommentAsync ( int commentId, string username = "me" ) : Task
commentId int The comment id.
username string The user account. Default: me
Результат Task

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

Return a count of all of the comments associated with the account.
/// 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 GetCommentCountAsync ( string username = "me" ) : Task
username string The user account. Default: me
Результат Task

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

Return a list of all of the comment IDs.
/// 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 GetCommentIdsAsync ( string username = "me", CommentSortOrder sort = CommentSortOrder.Newest, int page = null ) : Task>
username string The user account. Default: me
sort CommentSortOrder The order that the comments should be sorted by. Default: Newest
page int Allows you to set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

Return the comments the user has created.
/// 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 GetCommentsAsync ( string username = "me", CommentSortOrder sort = CommentSortOrder.Newest, int page = null ) : Task>
username string The user account. Default: me
sort CommentSortOrder The order that the comments should be sorted by. Default: Newest
page int Allows you to set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

The totals for a users gallery information.
/// 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 GetGalleryProfileAsync ( string username = "me" ) : Task
username string The user account. Default: me
Результат Task

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

Return information about a specific 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, string username = "me" ) : Task
imageId string The image's id.
username string The user account. Default: me
Результат Task

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

Returns the total number of images associated with the account. 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 GetImageCountAsync ( string username = "me" ) : Task
username string
Результат Task

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

Returns a list of Image IDs that are associated with the account. 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 GetImageIdsAsync ( string username = "me", int page = null ) : Task>
username string The user account. Default: me
page int Allows you to set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

Return all of the images associated with the account. You can page through the images by setting the page, this defaults to 0. 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 GetImagesAsync ( string username = "me", int page = null ) : Task>
username string The user account. Default: me
page int Allows you to set the page number so you don't have to retrieve all the data at once. Default: null
Результат Task>

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

Returns all of the reply notifications for the user. 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 GetNotificationsAsync ( bool newNotifications = true ) : Task
newNotifications bool false for all notifications, true for only non-viewed notification. Default is true.
Результат Task

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

Sends an email to the user to verify that their email is valid to upload to gallery. 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 SendVerificationEmailAsync ( ) : Task
Результат Task

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

Updates the account settings for a given user. 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 UpdateAccountSettingsAsync ( string bio = null, bool publicImages = null, bool messagingEnabled = null, AlbumPrivacy albumPrivacy = null, bool acceptedGalleryTerms = null, string username = null, bool showMature = null, bool newsletterSubscribed = null ) : Task
bio string The biography of the user, is displayed in the gallery profile page.
publicImages bool Set the users images to private or public by default.
messagingEnabled bool Allows the user to enable / disable private messages.
albumPrivacy AlbumPrivacy Sets the default privacy level of albums the users creates.
acceptedGalleryTerms bool The user agreement to the Imgur Gallery terms.
username string A valid Imgur username (between 4 and 63 alphanumeric characters).
showMature bool Toggle display of mature images in gallery list endpoints.
newsletterSubscribed bool Toggle subscription to email newsletter.
Результат Task

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

Checks to see if user has verified their email address. 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 VerifyEmailAsync ( ) : Task
Результат Task