Skip to content

Notifications/CMS API #1326

@sirpy

Description

@sirpy

Build API for 3rd parties to publish content to their feed
Users will be able to subscribe to these feeds and choose if to receive local notifications about new items.
Build as external project
Separate API logic from underlying data structre
Initial Implementation with GunDB

Data Structure

feeds: {
 [name]: Feed
}
Feed: {
 info:FeedInfo
 items:FeedItems
privateItems: {
  [publickey]: EncryptedFeedItems
}

}

FeedInfo
{
 name,
 description
 id: <the record id to the feed itself>,
owner:<public key/ie user record soul>
}

FeedItems/EncryptedFeedItems: {
 [date]: {
   [id]: FeedItem/EncryptedFeedItem
 }
}

API

  • login(user,pass):Feeds - login to the underlying database (in our case gun)

Feeds API

  • createFeed(FeedInfo):Feed - add to gun.user().get('feeds') {name: Feed}, sets correct soul/id in FeedInfo record once its created
  • getFeed(name):Feed

Feed API

  • updateFeedInfo(description)
  • addItem(FeedItem) - puts item in correct day
  • addPrivateItem(FeedItem, public key) - encrypts FeedItem with public key, puts the item in privateItems.publickey.date

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions