Skip to content

Instantly share code, notes, and snippets.

@fedecarg
Last active May 23, 2018 15:31
Show Gist options
  • Select an option

  • Save fedecarg/bab3291b1efdf6e4fd0086b8d7206e8a to your computer and use it in GitHub Desktop.

Select an option

Save fedecarg/bab3291b1efdf6e4fd0086b8d7206e8a to your computer and use it in GitHub Desktop.
Notifications

Notifications

Collections

The purpose of the notification-feed-all collection is to allow the client to retrieve a list of manual and automatic collections, including:

  • notification-feed-info (manual)
  • notification-feed-new-shows (automatic)
    • Sort: Shows - has new episodes
  • notification-feed-expiring-shows (automatic)
    • Sort: Shows - has expiring episodes
  • notification-feed-new-videos (automatic)
    • Sort: Videos - has expiring videos (wip)
  • notification-feed-expiring-videos (automatic)
    • Sort: Videos - has expiring videos (wip)

Rules

  • A collection item is considered an Info notification:
    • if the object type is Article
  • A collection item is considered a New notification:
    • if the object contains the property isNews with the value true
    • if the object type is Link (Game) or Show
  • A collection item is considered an Expiring notification:
    • if it has a valid publishEnd date and it's not Info or New

Sorting

Collection items are sorted by Date in descending order:

Notification |  Sort by Date (DESC)    |  Object Type    |  Object property
------------------------------------------------------------------------------
New          |  2018-08-30T00:00:00Z   |  Link           |  publishStart
New          |  2018-08-29T00:00:00Z   |  Video          |  publishStart
Expires      |  2018-08-28T00:00:00Z   |  Video          |  publishEnd
Info         |  2018-08-27T00:00:00Z   |  Article        |  published

API Calls

curl -H "Content-Type: application/json" \
     -H "Authorization: Bearer <token>" https://dkids-test.disco-api.com/cms/collections/notification-feed-all?include=default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment