Last active
December 24, 2015 02:29
-
-
Save adamjonas/6731117 to your computer and use it in GitHub Desktop.
Pergola
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###cURL | |
#Authenticate | |
curl -X POST --data '[email protected]&password=1password' https://api.vineapp.com/users/authenticate | |
#My profile | |
curl -H "vine-session-id:#{key}" https://api.vineapp.com/users/me | |
###httparty | |
gem install httparty | |
require 'httparty' | |
#httparty authenticate | |
reponse = HTTParty.post('https://api.vineapp.com/users/authenticate', body: { username: "[email protected]", password: "1password"}) | |
# Get /user | |
HTTParty.get('https://api.vineapp.com/users/profiles/908940759363887104', :headers => {"vine-session-id" => response["data"]["key"]}) | |
# Get Popular | |
HTTParty.get('https://api.vineapp.com/timelines/popular', :headers => {"vine-session-id" => response["data"]["key"]}) | |
# Get a user timeline | |
HTTParty.get('https://api.vineapp.com/timelines/users/956062410865807360', :headers => {"vine-session-id" => response["data"]["key"]}) | |
###Pergola | |
gem install pergola | |
require 'pergola' | |
#authenticate | |
client = Pergola::Client.new(:username => "[email protected]", :password => "1password") | |
###Sinatra Code | |
https://github.com/carrot/pergola-sinatra | |
#App on the interwebs | |
http://pergola.herokuapp.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment