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

Implementation of conversation related actions.
Inheritance: EndpointBase, IConversationEndpoint
ファイルを表示 Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Property Type Description
ConversationEndpoint System

Public Methods

Method 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

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

Initializes a new instance of the ConversationEndpoint class.

Method Details

BlockSenderAsync() public method

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

ConversationEndpoint() public method

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

CreateConversationAsync() public method

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

DeleteConversationAsync() public method

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

GetConversationAsync() public method

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

GetConversationsAsync() public method

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

ReportSenderAsync() public method

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