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

Notification related actions.
Inheritance: EndpointBase, INotificationEndpoint
ファイルを表示 Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Property Type Description
NotificationEndpoint System

Public Methods

Method Description
GetNotificationAsync ( string notificationId ) : Task

Returns the data about a specific notification. OAuth authentication required.

GetNotificationsAsync ( bool newNotifications = true ) : Task

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

MarkNotificationViewedAsync ( string notificationId ) : Task

Marks a notification as viewed. OAuth authentication required.

MarkNotificationsViewedAsync ( IEnumerable ids ) : Task

Marks notifications as viewed. OAuth authentication required.

NotificationEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the NotificationsEndpoint class.

Private Methods

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

Initializes a new instance of the NotificationsEndpoint class.

Method Details

GetNotificationAsync() public method

Returns the data about a specific notification. 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 GetNotificationAsync ( string notificationId ) : Task
notificationId string The notification id.
return Task

GetNotificationsAsync() public method

Returns all of the 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

MarkNotificationViewedAsync() public method

Marks a notification as viewed. 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 MarkNotificationViewedAsync ( string notificationId ) : Task
notificationId string The notification id.
return Task

MarkNotificationsViewedAsync() public method

Marks notifications as viewed. 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 MarkNotificationsViewedAsync ( IEnumerable ids ) : Task
ids IEnumerable The notification id.
return Task

NotificationEndpoint() public method

Initializes a new instance of the NotificationsEndpoint class.
public NotificationEndpoint ( IApiClient apiClient ) : System
apiClient IApiClient The type of client that will be used for authentication.
return System