2014-09-04 19:20:27 -04:00
|
|
|
## Examples
|
|
|
|
|
2014-09-04 20:12:19 -04:00
|
|
|
* [Amazon Book Search](aaws.rb)
|
2014-09-04 19:22:57 -04:00
|
|
|
* Httparty included into poro class
|
2014-09-04 20:03:46 -04:00
|
|
|
* Uses `get` requests
|
2014-09-04 19:22:57 -04:00
|
|
|
* Transforms query params to uppercased params
|
2014-09-04 19:22:04 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Google Search](google.rb)
|
|
|
|
* Httparty included into poro class
|
|
|
|
* Uses `get` requests
|
2014-09-04 19:22:04 -04:00
|
|
|
|
2014-09-04 19:20:27 -04:00
|
|
|
* [Crack Custom Parser](crack.rb)
|
2014-09-04 19:24:08 -04:00
|
|
|
* Creates a custom parser for XML using crack gem
|
2014-09-04 20:03:46 -04:00
|
|
|
* Uses `get` request
|
|
|
|
|
2018-10-08 07:44:44 -04:00
|
|
|
* [Create HTML Nokogiri parser](nokogiri_html_parser.rb)
|
2014-09-04 20:03:46 -04:00
|
|
|
* Adds Html as a format
|
|
|
|
* passed the body of request to Nokogiri
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:12:19 -04:00
|
|
|
* [More Custom Parsers](custom_parsers.rb)
|
2014-09-04 20:03:46 -04:00
|
|
|
* Create an additional parser for atom or make it the ONLY parser
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Basic Auth, Delicious](delicious.rb)
|
|
|
|
* Basic Auth, shows how to merge those into options
|
|
|
|
* Uses `get` requests
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Passing Headers, User Agent](headers_and_user_agents.rb)
|
|
|
|
* Use the class method of Httparty
|
|
|
|
* Pass the User-Agent in the headers
|
|
|
|
* Uses `get` requests
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Basic Post Request](basic.rb)
|
|
|
|
* Httparty included into poro class
|
|
|
|
* Uses `post` requests
|
|
|
|
|
2014-09-04 20:12:19 -04:00
|
|
|
* [Access Rubyurl Shortener](rubyurl.rb)
|
2014-09-04 20:03:46 -04:00
|
|
|
* Httparty included into poro class
|
|
|
|
* Uses `post` requests
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Add a custom log file](logging.rb)
|
|
|
|
* create a log file and have httparty log requests
|
|
|
|
|
|
|
|
* [Accessing StackExchange](stackexchange.rb)
|
2014-09-04 20:06:58 -04:00
|
|
|
* Httparty included into poro class
|
2014-09-04 20:03:46 -04:00
|
|
|
* Creates methods for different endpoints
|
|
|
|
* Uses `get` requests
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Accessing Tripit](tripit_sign_in.rb)
|
2014-09-04 20:06:58 -04:00
|
|
|
* Httparty included into poro class
|
2014-09-04 20:03:46 -04:00
|
|
|
* Example of using `debug_output` to see headers/urls passed
|
|
|
|
* Getting and using Cookies
|
|
|
|
* Uses `get` requests
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Accessing Twitter](twitter.rb)
|
2014-09-04 20:06:58 -04:00
|
|
|
* Httparty included into poro class
|
2014-09-04 20:03:46 -04:00
|
|
|
* Basic Auth
|
2018-10-08 07:44:44 -04:00
|
|
|
* Loads settings from a config file
|
2014-09-04 20:03:46 -04:00
|
|
|
* Uses `get` requests
|
|
|
|
* Uses `post` requests
|
2018-10-08 07:44:44 -04:00
|
|
|
|
2014-09-04 20:03:46 -04:00
|
|
|
* [Accessing WhoIsMyRep](whoismyrep.rb)
|
2014-09-04 20:06:58 -04:00
|
|
|
* Httparty included into poro class
|
2018-10-08 07:44:44 -04:00
|
|
|
* Uses `get` requests
|
2014-09-04 20:06:58 -04:00
|
|
|
* Two ways to pass params to get, inline on the url or in query hash
|
2014-12-12 07:34:03 -05:00
|
|
|
|
|
|
|
* [Rescue Json Error](rescue_json.rb)
|
2016-07-12 15:19:49 -04:00
|
|
|
* Rescue errors due to parsing response
|
|
|
|
|
|
|
|
* [Download file using stream mode](stream_download.rb)
|
|
|
|
* Uses `get` requests
|
|
|
|
* Uses `stream_body` mode
|
2016-08-31 12:48:36 -04:00
|
|
|
* Download file without using the memory
|
2018-10-31 00:56:06 -04:00
|
|
|
|
|
|
|
* [Microsoft graph](microsoft_graph.rb)
|
|
|
|
* Basic Auth
|
|
|
|
* Uses `post` requests
|
|
|
|
* Uses multipart
|
|
|
|
|
|
|
|
* [Multipart](multipart.rb)
|
|
|
|
* Multipart data upload _(with and without file)_
|
|
|
|
|
|
|
|
* [Uploading File](body_stream.rb)
|
|
|
|
* Uses `body_stream` to upload file
|