-
-
Save HADDADSOHAIB/a2bb5480c8d4f95e2a6ff40379325741 to your computer and use it in GitHub Desktop.
Revisions
-
jeffdonthemic revised this gist
Jul 15, 2016 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,3 +31,9 @@ } results = HTTParty.post("https://papertrailapp.com/api/v1/distributors/accounts", options) results = HTTParty.get("http://some.api", :headers => { "X-Api-Key" => "#{api_key}", "Content-Type" => "application/json", "Authorization" => "Bearer #{response.access_token}" }) -
jeffdonthemic revised this gist
Aug 1, 2014 . 1 changed file with 33 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1 +1,33 @@ options = { :body => { :username => 'my', :password => 'password' } } results = HTTParty.post("http://api.topcoder.com/v2/auth", options) ## ## example for post with papertrail and basic auth ## auth = { :username => ENV['PAPERTRAIL_DIST_USERNAME'], :password => ENV['PAPERTRAIL_DIST_PASSWORD'] } # create the user's account user = { :id => membername, :email => email } payload = { :id => membername, :name => membername, :user => user, :plan => 'free' } options = { :body => payload, :basic_auth => auth } results = HTTParty.post("https://papertrailapp.com/api/v1/distributors/accounts", options) -
jeffdonthemic created this gist
Aug 1, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ d