C# Class PodioAPI.Services.NotificationService

Mostrar archivo Open project: podio/podio-dotnet

Public Methods

Method Description
GetInboxNewCount ( ) : Task

Returns the number of unread notifications for the active user.

Podio API Reference: https://developers.podio.com/doc/notifications/get-inbox-new-count-84610

GetNotification ( int notificationId ) : Task

Retrieves a single notification grouped similarly to the get notifications operation.

Podio API Reference: https://developers.podio.com/doc/notifications/get-notification-2973737

GetNotifications ( string contextType = null, System.DateTime createdFrom = null, System.DateTime createdTo = null, string direction = "incoming", int limit = 20, int offSet, bool starred = null, string type = null, int userId = null, bool viewed = null, System.DateTime viewedFrom = null ) : Task>

Returns a list of notifications based on the query parameters. The notifications will be grouped based on their context.

Podio API Reference: https://developers.podio.com/doc/notifications/get-notifications-290777

MarkAllNotificationsAsViewed ( ) : Task

Marks all the users notifications as viewed.

Podio API Reference: https://developers.podio.com/doc/notifications/mark-all-notifications-as-viewed-58099

MarkNotificationAsViewed ( int notificationId ) : Task

Mark the notification as viewed. This will move the notification from the inbox to the viewed archive.

Podio API Reference: https://developers.podio.com/doc/notifications/mark-notification-as-viewed-22436

MarkNotificationsAsViewedByRef ( string refType, int refId ) : Task

Marks all notifications on the given object as viewed.

Podio API Reference: https://developers.podio.com/doc/notifications/mark-notifications-as-viewed-by-ref-553653

NotificationService ( Podio currentInstance ) : System
StarNotification ( int notificationId ) : Task

Star the given notification to move it to the star list.

Podio API Reference: https://developers.podio.com/doc/notifications/star-notification-295910

UnStarNotification ( int notificationId ) : Task

Removes the star on the notification.

Podio API Reference: https://developers.podio.com/doc/notifications/un-star-notification-295911

Method Details

GetInboxNewCount() public method

Returns the number of unread notifications for the active user.

Podio API Reference: https://developers.podio.com/doc/notifications/get-inbox-new-count-84610

public GetInboxNewCount ( ) : Task
return Task

GetNotification() public method

Retrieves a single notification grouped similarly to the get notifications operation.

Podio API Reference: https://developers.podio.com/doc/notifications/get-notification-2973737

public GetNotification ( int notificationId ) : Task
notificationId int
return Task

GetNotifications() public method

Returns a list of notifications based on the query parameters. The notifications will be grouped based on their context.

Podio API Reference: https://developers.podio.com/doc/notifications/get-notifications-290777

public GetNotifications ( string contextType = null, System.DateTime createdFrom = null, System.DateTime createdTo = null, string direction = "incoming", int limit = 20, int offSet, bool starred = null, string type = null, int userId = null, bool viewed = null, System.DateTime viewedFrom = null ) : Task>
contextType string The type of the context to get notifications for, f.ex. "conversation", "item" or "task"
createdFrom System.DateTime The earliest date and time to return notifications from
createdTo System.DateTime The latest date and time to return notifications from
direction string /// "incoming" to get incoming notifications, "outgoing" to get outgoing notifications. Default /// value: incoming ///
limit int The maximum number of notifications to return, maxium is "100". Default value: 20
offSet int The offet into the returned notifications. Default value: 0
starred bool /// False to get only unstarred notifications, true to get only starred notifications, leave blank /// for both ///
type string A type of notification, see the area for possible types
userId int The user id of the other part of the notification
viewed bool /// False to get all unviewed notifications, true to get all viewed notifications, leave blank for /// both ///
viewedFrom System.DateTime /// When returning only unviewed notifications (above), notifications viewed after the given date /// and time will also be returned. Use this to keep pagination even when some notifications has been viewed after /// initial page load. ///
return Task>

MarkAllNotificationsAsViewed() public method

Marks all the users notifications as viewed.

Podio API Reference: https://developers.podio.com/doc/notifications/mark-all-notifications-as-viewed-58099

public MarkAllNotificationsAsViewed ( ) : Task
return Task

MarkNotificationAsViewed() public method

Mark the notification as viewed. This will move the notification from the inbox to the viewed archive.

Podio API Reference: https://developers.podio.com/doc/notifications/mark-notification-as-viewed-22436

public MarkNotificationAsViewed ( int notificationId ) : Task
notificationId int
return Task

MarkNotificationsAsViewedByRef() public method

Marks all notifications on the given object as viewed.

Podio API Reference: https://developers.podio.com/doc/notifications/mark-notifications-as-viewed-by-ref-553653

public MarkNotificationsAsViewedByRef ( string refType, int refId ) : Task
refType string
refId int
return Task

NotificationService() public method

public NotificationService ( Podio currentInstance ) : System
currentInstance Podio
return System

StarNotification() public method

Star the given notification to move it to the star list.

Podio API Reference: https://developers.podio.com/doc/notifications/star-notification-295910

public StarNotification ( int notificationId ) : Task
notificationId int
return Task

UnStarNotification() public method

Removes the star on the notification.

Podio API Reference: https://developers.podio.com/doc/notifications/un-star-notification-295911

public UnStarNotification ( int notificationId ) : Task
notificationId int
return Task