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

ファイルを表示 Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Property Type Description
AccountEndpoint System

Public Methods

Method Description
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.

Private Methods

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

Initializes a new instance of the AccountEndpoint class.

Method Details

AccountEndpoint() public method

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.
return System

DeleteAlbumAsync() public method

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
return Task

DeleteCommentAsync() public method

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
return Task

DeleteImageAsync() public method

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
return Task

GetAccountAsync() public method

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
return Task

GetAccountFavoritesAsync() public method

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>
return Task>

GetAccountGalleryFavoritesAsync() public method

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
return Task>

GetAccountSettingsAsync() public method

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
return Task

GetAccountSubmissionsAsync() public method

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
return Task>

GetAlbumAsync() public method

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
return Task

GetAlbumCountAsync() public method

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
return Task

GetAlbumIdsAsync() public method

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
return Task>

GetAlbumsAsync() public method

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
return Task>

GetCommentAsync() public method

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
return Task

GetCommentCountAsync() public method

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
return Task

GetCommentIdsAsync() public method

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
return Task>

GetCommentsAsync() public method

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
return Task>

GetGalleryProfileAsync() public method

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
return Task

GetImageAsync() public method

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
return Task

GetImageCountAsync() public method

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
return Task

GetImageIdsAsync() public method

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
return Task>

GetImagesAsync() public method

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
return Task>

GetNotificationsAsync() public method

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.
return Task

SendVerificationEmailAsync() public method

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
return Task

UpdateAccountSettingsAsync() public method

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.
return Task

VerifyEmailAsync() public method

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
return Task