C# Class ImgurNet.ApiEndpoints.ImageEndpoint

Inheritance: BaseEndpoint
Show file Open project: 0xdeafcafe/ImgurNet Class Usage Examples

Public Methods

Method Description
DeleteImageAsync ( string imageDeletionHash ) : Task>

Deletes an image from imgur. You get the deletion hash from the initial image response when you upload an image, or from GetImageDetailsAsync if you are signed in and own that image;

FavouriteImageAsync ( string imageId ) : Task>

Adds/Removes an image from the authenticated user's favourites. Must be authenticated using OAuth2Authentication to call this Endpoint.

GetImageDetailsAsync ( string imageId ) : Task>

Get information about an image.

ImageEndpoint ( Imgur imgur ) : System

UpdateImageDetailsAsync ( string imageId, string title = null, string description = null ) : Task>

Updates an image that was previously uploaded. ImageId can be the Image Id, if you're signed in as the uploader, or the DeleteHash if you are not.

UploadImageFromBase64Async ( string base64ImageData, string albumId = null, string name = null, string title = null, string description = null ) : Task>

UploadImageFromBinaryAsync ( byte imageBinary, string albumId = null, string name = null, string title = null, string description = null ) : Task>

UploadImageFromUrlAsync ( Uri uri, string albumId = null, string name = null, string title = null, string description = null ) : Task>

UploadImageFromUrlAsync ( string url, string albumId = null, string name = null, string title = null, string description = null ) : Task>

Method Details

DeleteImageAsync() public method

Deletes an image from imgur. You get the deletion hash from the initial image response when you upload an image, or from GetImageDetailsAsync if you are signed in and own that image;
public DeleteImageAsync ( string imageDeletionHash ) : Task>
imageDeletionHash string The image deletion hash
return Task>

FavouriteImageAsync() public method

Adds/Removes an image from the authenticated user's favourites. Must be authenticated using OAuth2Authentication to call this Endpoint.
public FavouriteImageAsync ( string imageId ) : Task>
imageId string The ImageId of the image you want to favourite.
return Task>

GetImageDetailsAsync() public method

Get information about an image.
public GetImageDetailsAsync ( string imageId ) : Task>
imageId string The Id of the image you want details of.
return Task>

ImageEndpoint() public method

public ImageEndpoint ( Imgur imgur ) : System
imgur Imgur
return System

UpdateImageDetailsAsync() public method

Updates an image that was previously uploaded. ImageId can be the Image Id, if you're signed in as the uploader, or the DeleteHash if you are not.
public UpdateImageDetailsAsync ( string imageId, string title = null, string description = null ) : Task>
imageId string The ImageId (or deletion hash) of the image to be edited.
title string The string you want to set as the title of image.
description string The string you want to set as the description of image.
return Task>

UploadImageFromBase64Async() public method

public UploadImageFromBase64Async ( string base64ImageData, string albumId = null, string name = null, string title = null, string description = null ) : Task>
base64ImageData string
albumId string
name string
title string
description string
return Task>

UploadImageFromBinaryAsync() public method

public UploadImageFromBinaryAsync ( byte imageBinary, string albumId = null, string name = null, string title = null, string description = null ) : Task>
imageBinary byte
albumId string
name string
title string
description string
return Task>

UploadImageFromUrlAsync() public method

public UploadImageFromUrlAsync ( Uri uri, string albumId = null, string name = null, string title = null, string description = null ) : Task>
uri System.Uri
albumId string
name string
title string
description string
return Task>

UploadImageFromUrlAsync() public method

public UploadImageFromUrlAsync ( string url, string albumId = null, string name = null, string title = null, string description = null ) : Task>
url string
albumId string
name string
title string
description string
return Task>