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

Implementation of conversation related actions.
Inheritance: EndpointBase, IConversationEndpoint
Afficher le fichier Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

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

Méthodes publiques

Méthode Description
BlockSenderAsync ( string username ) : Task

Block the user from sending messages to the user that is logged in. OAuth authentication required.

ConversationEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the ConversationEndpoint class.

CreateConversationAsync ( string recipient, string body ) : Task

Create a new message. OAuth authentication required.

DeleteConversationAsync ( string conversationId ) : Task

Delete a conversation by the given id. OAuth authentication required.

GetConversationAsync ( string conversationId, int page = null, int offset = null ) : Task

Get information about a specific conversation. Includes messages. OAuth authentication required.

GetConversationsAsync ( ) : Task>

Get list of all conversations for the logged in user. OAuth authentication required.

ReportSenderAsync ( string username ) : Task

Report a user for sending messages that are against the Terms of Service. OAuth authentication required.

Private Methods

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

Initializes a new instance of the ConversationEndpoint class.

Method Details

BlockSenderAsync() public méthode

Block the user from sending messages to the user that is logged in. 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 BlockSenderAsync ( string username ) : Task
username string The sender that should be blocked.
Résultat Task

ConversationEndpoint() public méthode

Initializes a new instance of the ConversationEndpoint class.
public ConversationEndpoint ( IApiClient apiClient ) : System
apiClient IApiClient The type of client that will be used for authentication.
Résultat System

CreateConversationAsync() public méthode

Create a new message. 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 CreateConversationAsync ( string recipient, string body ) : Task
recipient string The recipient username, this person will receive the message.
body string The message itself, similar to the body of an email.
Résultat Task

DeleteConversationAsync() public méthode

Delete a conversation by the 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 DeleteConversationAsync ( string conversationId ) : Task
conversationId string The conversation id.
Résultat Task

GetConversationAsync() public méthode

Get information about a specific conversation. Includes messages. 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 GetConversationAsync ( string conversationId, int page = null, int offset = null ) : Task
conversationId string The conversation id.
page int /// Page of message thread. Starting at 1 for the most recent 25 messages and counting upwards. Default: /// null ///
offset int Additional offset in current page.
Résultat Task

GetConversationsAsync() public méthode

Get list of all conversations for the logged in 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 GetConversationsAsync ( ) : Task>
Résultat Task>

ReportSenderAsync() public méthode

Report a user for sending messages that are against the Terms of Service. 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 ReportSenderAsync ( string username ) : Task
username string The sender that should be reported.
Résultat Task