API for Resistance Calendar events
An instance of the application is running at the following location:
https://resistance-calendar.herokuapp.com/v1/events
All endpoints try to be compliant with the OSDI Events standard which exposes two high level endpoints and a few options for paging:
Queries are intended to comply with the ODATA standard and use odata-v4-mongodb to do so which implements much, but not all of the standard. Some examples of common queries are:
Filter by start date (dates in ISO8601 format):
Filter by nested property (postal_code and locality/city):
This can be done via multiple contains functions combined via and / or logical operators and are not case sensitive.
Searching is not technically ODATA compliant since there is not affordance for radial searches. This implementation filters by location using coordinates (longitude, latitude), city, or postal code and distance in meters. If coordinates are specified, they are used as they are the preferred method of location based searching since postal_codes are only supported for US and may be out of date.
Again, using the ODATA standard, ordering is done like so:
Intended to find the city based on a set of coordinates
For ETL based processes, limiting the number of events queried for can be done by created_date and modified_date fields
cd resistance-calendar-api
# Export the facebook token. Eventually this can be made to auto-refresh using the app secret.
export FB_GRAPH_API_TOKEN=[YOUR FACEBOOK TOKEN]
# Start mongodb
mkdir .db
mongod --dbpath .db/
# Always a good idea to install packages
npm install && npm install semistandard -g
# Run the tests!
npm test
# Run the service
npm start
The service is a node service based on the hapijs framework and uses mongodb