sayhiben / onebusaway-deep-links

A web app with a URL pattern designed for deep linking in native apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup

  1. Install RVM (https://rvm.io): \curl -sSL https://get.rvm.io | bash -s stable
  2. Install Postgresql. I like https://postgresapp.com for macOS.
  3. Clone the repo
  4. cd into the directory where you cloned the repo and agree to whatever RVM says
  5. gem install bundler
  6. bundle install
  7. rake db:create
  8. rake db:schema:load
  9. rake db:seed
  10. rails s
  11. open http://localhost:3000

Features

Service Alerts

Service alerts involve the following models:

  • AlertFeed - Represents a single service alert feed. It is primarily designed to consume RSS feeds. This is an STI model; child classes are responsible for knowing how to parse their own feed types. See KingCountyMetroAlertFeed.
  • AlertFeedItem - Represents an item in an AlertFeed

Alert feeds are updated from their sources by running rake update_alert_feeds. In production, this is managed with the Heroku Scheduler add-on.

Endpoints

  • GET /regions/:region_id/alert_feeds - Returns a JSON collection of AlertFeed objects.
  • GET /regions/:region_id/alert_feed_items - Returns a JSON collection of AlertFeedItem objects for the given Region id. Accepts a since parameter formatted as a UTC timestamp.
  • GET /alert_feeds/:id - Returns a JSON collection of AlertFeedItem objects for the given AlertFeed id. Accepts a since parameter formatted as a UTC timestamp.

About

A web app with a URL pattern designed for deep linking in native apps


Languages

Language:Ruby 89.4%Language:HTML 8.0%Language:JavaScript 1.6%Language:CSS 1.0%