A Rails application to demonstrate effective management of the Gnip Historical PowerTrack APIs
JavaScript Ruby CSS CoffeeScript Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
fixtures/cassettes
lib/gnip
public
spec
vendor/assets
.gitignore
.powrc
.ruby-gemset
.ruby-version
.travis.yml
Bowerfile
CONTRIBUTING.md
Capfile
Gemfile
Gemfile.lock
Guardfile
LICENSE
README.md
Rakefile
config.ru
demo.gif
screenshot.png
start.sh

README.md

Overview

Code Climate GPA Travis CI Status

A simple Rails application that uses the Gnip Historical PowerTrack API to give you complete and comprehensive access to every publicly available Tweet, ever.

This sample application demonstrates how to effectively interact with the API and manage your historical jobs.

Here's a short video showing how to get Twitter data about the 2014 World Cup matches:

Historical API Demo

Features

  • Create, estimate, accept and download Historical jobs
  • Detailed job progress
  • Filter jobs based on ID, Title, Date or Status
  • Supports IE10+, FF, Chrome, Opera 12+, Safari 5+
  • NOTE: If your expected dataset is large (over 1GB), we recommend you use a more efficient tool to parallelize file downloads

Requirements

  1. A Gnip Account with a Historical PowerTrack Subscription
  2. Ruby 2.0.x.
  3. Ruby on Rails 4.0.x.
  4. You may need Python on your PATH to install some dependencies on Windows

Setup

Open a terminal window and execute the following commands:

git clone git://github.com/twitterdev/historical-api-rails-demo.git
cd historical-api-rails-demo

Ensure the following environment variables are set:

  • GNIP_ACCOUNT = Your Gnip account.
  • GNIP_USERNAME = Your Gnip username.
  • GNIP_PASSWORD = Your Gnip password.

Usage

To run, execute bundle install and then rails s.

Testing

To test, do the following:

  1. Ruby Specs: rake spec
  2. JavaScript Specs: rake spec:javascript
  3. Both: rake test

NOTE: guard will automatically run RSpec, and CoffeeScript (sorry, no auto-jasmine yet).

Contributions

Read CONTRIBUTING for details.

Credits