Giter Site home page Giter Site logo

notification-center's Introduction

notification-center

Centralized Notification Center for all Projects

Allows users to subscribe on projects' event streams. Projects just need to expose RSS feeds with the events, notifications etc.

The notification server does all the user authentication, RSS feed polling, filtering by tags or lat/lon (for projects who need it), and send an aggregated email to the user - at the frequency the project or user required.

API

General

All API commands work wither with GET or POST.

For GET, parameters are passed in the URL as query parameters. You can add a callback parameter for JSONP access.

For POST, parameters are passed as a JSON object in the request's body.

All commands return a JSON object with the command's reponse. All reponses contain a boolean success indicating the command's success, and possibly additional fields.

Subscribe to a feed

/api/subscribe

Subscribes a user to a specific notification.

Parameters:

  • url :

    URL of RSS feed to subscribe to.

  • period :

    Minimal time (in seconds) between consecutive emails sent to the user in this subscription.

  • tags :

    Comma delimited list of tags to filter. If not specified, not filtering by tags will be performed.

  • latlon :

    Tuple of floats separated by a comma, indicating a geo-filter for this feed around this location. Example: 32.8,34.2

  • radius :

    Numeric value (in meters), used alongside the latlon parameter to specify the search radius for the geo-filtering. If one of latlon or radius is not specified, no geo-filtering will be performed.

Response:

  • id :

    identification string for the subscription. Can be used to unsubscribe later.

Unsubscribe from a feed

/api/unsubscribe

Unsubscribes a user from a specific notification.

Parameters:

  • subscription_id :

    Identification string of the subscription.

Response:

(none)

RSS Format

We support all flavours of RSS and ATOM although currently tested on RSS 2.0 only.

Permitted and useful tags are:

  • feed.title
  • feed.subtitle
  • item.pubDate
  • item.title
  • item.description
  • item.link

Also special tags under the pkw namespace (xmlns:pkw="http://hasadna.org.il/rss/1.0/dtd"):

  • item.pkw:tags

    Comma separated list of tags which is used for filtered subscriptions.

  • item.pkw:latlon

    Lat,Lon for the item, used for geo-filtered subscriptions.

see sample/sample.rss for a sample RSS file.

notification-center's People

Contributors

akariv avatar alonisser avatar

Watchers

James Cloos avatar  avatar  avatar

notification-center's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.