Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (30 sloc) 0.928 kB
9d98a58 @tubbo pushing up
authored
1 # StatusExchange
2 # ==============
3 #
4 # StatusExchange is a Sinatra app that responds to '/status.json' with the latest updates from the following platforms:
5 #
6 # - Facebook
7 # - Twitter
8 # - Last.FM
9 # - Spotify
10 # - GitHub
11 #
12 # Author:: Tom Scott
13 # Homepage:: http://psychedeli.ca/
14
15 require 'sinatra'
16 require 'twitter'
17 require 'mogli'
18
19 CONFIG = YAML::load_file('_config.yml')
20
21 Twitter.configure do |config|
22 config.consumer_key = CONFIG['twitter']['app']['token']
23 config.consumer_secret = CONFIG['twitter']['app']['secret']
24 config.oauth_token = CONFIG['twitter']['usr']['token']
25 config.oauth_token_secret = CONFIG['twitter']['usr']['secret']
26 end
27
28 class StatusExchange < Sinatra::Base
29 get '/status.json' do
30 facebook_client = Mogli::Client.new(CONFIG['facebook']['access_token'])
31 facebook = Mogli::User.find('me', facebook_client)
32
33 twitter = Twitter.home_timeline
34
35 github = GitHub.create
36
37 end
38
Something went wrong with that request. Please try again.