Created
December 1, 2012 16:51
-
-
Save trappist/4183199 to your computer and use it in GitHub Desktop.
api auth
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 characters
| mac:~/projects/real-server(json_api)$ ./script/api_client post /api/login email:rocco@railsdog.com password:railsdog | |
| {"success"=>true, | |
| "auth_token"=>"TjIcHa-fsG-OM58LJeBd", | |
| "email"=>"rocco@railsdog.com"} | |
| mac:~/projects/real-server(json_api)$ ./script/api_client get /flash_sales | |
| /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 401 Unauthorized (RestClient::Unauthorized) | |
| from /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result' | |
| from /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit' | |
| from /Users/trappist/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:745:in `start' | |
| from /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit' | |
| from /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' | |
| from /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' | |
| from /Users/trappist/.rvm/gems/ruby-1.9.3-p327@trr/gems/rest-client-1.6.7/lib/restclient.rb:68:in `get' | |
| from ./script/api_client:18:in `<main>' | |
| mac:~/projects/real-server(json_api)$ ./script/api_client get /flash_sales auth_token:TjIcHa-fsG-OM58LJeBd | |
| {"current"=>[], | |
| "ending_soon"=> | |
| [{"flash_sale"=> | |
| {"description"=>" Valentino description", | |
| "ends_at"=>"2012-12-02T07:00:00Z", | |
| "id"=>4, | |
| "name"=>"Valentino", | |
| "permalink"=>"valentino", | |
| "starts_at"=>"2012-11-29T07:00:00Z", | |
| "list_image_url"=>"/assets/store/missing.png", | |
| "upcoming_image_url"=>"/assets/store/missing.png", | |
| "main_image_url"=>"/assets/store/missing.png"}}, | |
| {"flash_sale"=> | |
| {"description"=>" Balenciaga description", | |
| "ends_at"=>"2012-12-02T07:00:00Z", | |
| "id"=>5, | |
| "name"=>"Balenciaga", | |
| "permalink"=>"balenciaga", | |
| "starts_at"=>"2012-11-29T07:00:00Z", | |
| "list_image_url"=>"/assets/store/missing.png", | |
| "upcoming_image_url"=>"/assets/store/missing.png", | |
| "main_image_url"=>"/assets/store/missing.png"}}, | |
| {"flash_sale"=> | |
| {"description"=>" ACNE description", | |
| "ends_at"=>"2012-12-02T07:00:00Z", | |
| "id"=>6, | |
| "name"=>"ACNE", | |
| "permalink"=>"acne", | |
| "starts_at"=>"2012-11-29T07:00:00Z", | |
| "list_image_url"=>"/assets/store/missing.png", | |
| "upcoming_image_url"=>"/assets/store/missing.png", | |
| "main_image_url"=>"/assets/store/missing.png"}}], | |
| "upcoming"=>[]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment