httparty 0.13.1 → 0.13.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of httparty might be problematic. Click here for more details.

Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Guardfile +3 -3
  3. data/History +74 -11
  4. data/README.md +4 -1
  5. data/Rakefile +1 -2
  6. data/bin/httparty +4 -4
  7. data/examples/README.md +64 -0
  8. data/examples/aaws.rb +3 -3
  9. data/examples/basic.rb +5 -5
  10. data/examples/crack.rb +1 -1
  11. data/examples/delicious.rb +5 -5
  12. data/examples/headers_and_user_agents.rb +1 -1
  13. data/examples/logging.rb +38 -0
  14. data/examples/rubyurl.rb +1 -1
  15. data/examples/stackexchange.rb +1 -1
  16. data/examples/tripit_sign_in.rb +5 -5
  17. data/examples/twitter.rb +5 -5
  18. data/examples/whoismyrep.rb +1 -1
  19. data/features/steps/httparty_steps.rb +2 -2
  20. data/httparty.gemspec +2 -0
  21. data/lib/httparty.rb +35 -17
  22. data/lib/httparty/connection_adapter.rb +4 -2
  23. data/lib/httparty/cookie_hash.rb +1 -1
  24. data/lib/httparty/hash_conversions.rb +12 -12
  25. data/lib/httparty/logger/apache_logger.rb +1 -1
  26. data/lib/httparty/logger/logger.rb +1 -1
  27. data/lib/httparty/net_digest_auth.rb +4 -1
  28. data/lib/httparty/request.rb +41 -21
  29. data/lib/httparty/version.rb +1 -1
  30. data/spec/httparty/connection_adapter_spec.rb +52 -36
  31. data/spec/httparty/cookie_hash_spec.rb +8 -8
  32. data/spec/httparty/logger/apache_logger_spec.rb +29 -14
  33. data/spec/httparty/net_digest_auth_spec.rb +11 -0
  34. data/spec/httparty/parser_spec.rb +10 -10
  35. data/spec/httparty/request_spec.rb +209 -30
  36. data/spec/httparty/response_spec.rb +41 -41
  37. data/spec/httparty/ssl_spec.rb +4 -4
  38. data/spec/httparty_spec.rb +78 -59
  39. data/spec/support/ssl_test_helper.rb +6 -6
  40. data/spec/support/stub_response.rb +2 -2
  41. data/website/index.html +3 -3
  42. metadata +15 -14
  43. data/spec/spec.opts +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ce26387d700f484cf57204fb8257bee96a79694
4
- data.tar.gz: 6ba64cf5e2c870f84860b29b17fa1699480754d1
3
+ metadata.gz: 7c95cb69f9c1bafaf136df6ad12aa9b9447ad97f
4
+ data.tar.gz: c28653f64f4fd21a3538455e229df99e39775e23
5
5
  SHA512:
6
- metadata.gz: 727c7ec279835747b7da0fc3173fd7d3b260677f8eadb1a80251bbb093eb92f9e3fb999af539a55467b55aa3d119b78182497289b03cabf43026f8cdc594d900
7
- data.tar.gz: 015463cb6bb232327e126308257dccff62d08cde88eb7dd57730f9dad28626e685464dc030c0ca3b4048424316ae97676b0ea6738ca74541daf5777bf0aeff17
6
+ metadata.gz: 00ea60f1ee73a3c49b6f2a5be6cbe7e4bb18ee46b5517e8ffe6fb7de2d83fdfd122a986a57da4ec20a887e96711722fc7068e8c414faf530fbc50b68fe47c156
7
+ data.tar.gz: c15f982b49d90fe39fef463c1f12e8eec88b7a26466b0345fd963dbd8704c9a28d75cb4389889c013305f639f6470bc18c9d3c1d306b1799d12ce00f83fa7d65
data/Guardfile CHANGED
@@ -1,7 +1,7 @@
1
1
  rspec_options = {
2
- :version => 1,
3
- :all_after_pass => false,
4
- :all_on_start => false,
2
+ version: 1,
3
+ all_after_pass: false,
4
+ all_on_start: false,
5
5
  }
6
6
 
7
7
  guard 'rspec', rspec_options do
data/History CHANGED
@@ -1,8 +1,72 @@
1
- == 0.10.1 2013-01-26
1
+ == 0.13.2
2
+ * minor improvement
3
+ * [Set correct path on redirect to filename](https://github.com/jnunemaker/httparty/pull/337)
4
+ * ensure logger works with curl format
2
5
 
6
+ == 0.13.1 2014-04-08
7
+ * new
8
+ * [Added ability to specify a body_stream in HttpRequest](https://github.com/jnunemaker/httparty/pull/275)
9
+ * [Added read_timeout and open_timeout options](https://github.com/jnunemaker/httparty/pull/278)
10
+ * change
11
+ * [Initialize HTTParty requests with an URI object and a String](https://github.com/jnunemaker/httparty/pull/274)
12
+ * minor improvement
13
+ * [Add stackexchange API example](https://github.com/jnunemaker/httparty/pull/280)
14
+
15
+ == 0.13.0 2014-02-14
16
+ * new
17
+ * [Add CSV support](https://github.com/jnunemaker/httparty/pull/269)
18
+ * [Allows PKCS12 client certificates](https://github.com/jnunemaker/httparty/pull/246)
19
+ * bug fix
20
+ * [Digest auth no longer fails when multiple headers are sent by the server](https://github.com/jnunemaker/httparty/pull/272)
21
+ * [Use 'Basement.copy' when calling 'HTTParty.copy'](https://github.com/jnunemaker/httparty/pull/268)
22
+ * [No longer appends ampersand when queries are embedded in paths](https://github.com/jnunemaker/httparty/pull/252)
23
+ * change
24
+ * [Merge - instead of overwrite - default headers with request provided headers](https://github.com/jnunemaker/httparty/pull/270)
25
+ * [Modernize respond_to implementations to support second param](https://github.com/jnunemaker/httparty/pull/264)
26
+ * [Sort query parameters by key before processing](https://github.com/jnunemaker/httparty/pull/245)
27
+ * minor improvement
28
+ * [Add HTTParty::Error base class](https://github.com/jnunemaker/httparty/pull/260)
29
+
30
+ == 0.12.0 2013-10-10
3
31
  * new
4
- * [added support for MOVE requests](https://github.com/jnunemaker/httparty/pull/183)
5
- * [bump multi xml version](https://github.com/jnunemaker/httparty/pull/181)
32
+ * [Added initial logging support](https://github.com/jnunemaker/httparty/pull/243)
33
+ * [Add support for local host and port binding](https://github.com/jnunemaker/httparty/pull/238)
34
+ * [content_type_charset_support](https://github.com/jnunemaker/httparty/commit/82e351f0904e8ecc856015ff2854698a2ca47fbc)
35
+ * bug fix
36
+ * [No longer attempt to decompress the body on HEAD requests](https://github.com/jnunemaker/httparty/commit/f2b8cc3d49e0e9363d7054b14f30c340d7b8e7f1)
37
+ * [Adding java check in aliasing of multiple choices](https://github.com/jnunemaker/httparty/pull/204/commits)
38
+ * change
39
+ * [MIME-type files of javascript are returned as a string instead of JSON](https://github.com/jnunemaker/httparty/pull/239)
40
+ * [Made SSL connections use the system certificate store by default](https://github.com/jnunemaker/httparty/pull/226)
41
+ * [Do not pass proxy options to Net::HTTP connection if not specified](https://github.com/jnunemaker/httparty/pull/222)
42
+ * [Replace multi_json with stdlib json](https://github.com/jnunemaker/httparty/pull/214)
43
+ * [Require Ruby >= 1.9.3]
44
+ * [Response returns array of returned cookie strings](https://github.com/jnunemaker/httparty/pull/218)
45
+ * [Allow '=' within value of a cookie]
46
+ * minor improvements
47
+ * [Improve documentation of ssl_ca_file, ssl_ca_path](https://github.com/jnunemaker/httparty/pull/223)
48
+ * [Fix example URLs](https://github.com/jnunemaker/httparty/pull/232)
49
+
50
+ == 0.11.0 2013-04-10
51
+ * new
52
+ * [Add COPY http request handling](https://github.com/jnunemaker/httparty/pull/190)
53
+ * [Ruby 2.0 tests](https://github.com/jnunemaker/httparty/pull/194)
54
+ * [Ruby >= 2.0.0 support both multiple_choice? and multiple_choices?]
55
+ * bug fix
56
+ * [Maintain blocks passed to 'perform' in redirects](https://github.com/jnunemaker/httparty/pull/191)
57
+ * [Fixed nc value being quoted, this was against spec](https://github.com/jnunemaker/httparty/pull/196)
58
+ * [Request#uri no longer duplicates non-relative-path params](https://github.com/jnunemaker/httparty/pull/189)
59
+ * change
60
+ * [Client-side-only cookie attributes are removed: case-insensitive](https://github.com/jnunemaker/httparty/pull/188)
61
+
62
+ == 0.10.2 2013-01-26
63
+ * bug fix
64
+ * [hash_conversions misnamed variable](https://github.com/jnunemaker/httparty/pull/187)
65
+
66
+ == 0.10.1 2013-01-26
67
+ * new
68
+ * [Added support for MOVE requests](https://github.com/jnunemaker/httparty/pull/183)
69
+ * [Bump multi xml version](https://github.com/jnunemaker/httparty/pull/181)
6
70
 
7
71
  == 0.10.0 2013-01-10
8
72
  * changes
@@ -12,7 +76,6 @@
12
76
  * new
13
77
  * [support for connection adapters](https://github.com/jnunemaker/httparty/pull/157)
14
78
  * [allow ssl_version on ruby 1.9](https://github.com/jnunemaker/httparty/pull/159)
15
-
16
79
  * bug fixes
17
80
  * [don't treat port 4430 as ssl](https://github.com/jnunemaker/httparty/commit/a296b1c97f83d7dcc6ef85720a43664c265685ac)
18
81
  * [deep clone default options](https://github.com/jnunemaker/httparty/commit/f74227d30f9389b4b23a888c9af49fb9b8248e1f)
@@ -167,7 +230,7 @@
167
230
 
168
231
  * minor enhancements
169
232
  * Timeout option added; will raise a Timeout::Error after the timeout has elapsed (attack). Closes #17
170
- HTTParty.get "http://github.com", :timeout => 1
233
+ HTTParty.get "http://github.com", timeout: 1
171
234
  * Building gem with Jeweler
172
235
 
173
236
  == 0.4.4 2009-07-19
@@ -282,20 +345,20 @@
282
345
  == 0.1.3 2008-08-22
283
346
 
284
347
  * 3 major enhancements:
285
- * Added http_proxy key for setting proxy server and port (francxk@gmail.com)
286
- * Now raises exception when http error occurs (francxk@gmail.com)
287
- * Changed auto format detection from file extension to response content type (Jay Pignata)
348
+ * Added http_proxy key for setting proxy server and port (francxk@gmail.com)
349
+ * Now raises exception when http error occurs (francxk@gmail.com)
350
+ * Changed auto format detection from file extension to response content type (Jay Pignata)
288
351
 
289
352
  == 0.1.2 2008-08-09
290
353
 
291
354
  * 1 major enhancement:
292
- * default_params were not being appended to query string if option[:query] was blank
355
+ * default_params were not being appended to query string if option[:query] was blank
293
356
 
294
357
  == 0.1.1 2008-07-30
295
358
 
296
359
  * 2 major enhancement:
297
- * Added :basic_auth key for options when making a request
298
- * :query and :body both now work with query string or hash
360
+ * Added :basic_auth key for options when making a request
361
+ * :query and :body both now work with query string or hash
299
362
 
300
363
  == 0.1.0 2008-07-27
301
364
 
data/README.md CHANGED
@@ -28,7 +28,7 @@ class StackExchange
28
28
  base_uri 'api.stackexchange.com'
29
29
 
30
30
  def initialize(service, page)
31
- @options = { :query => {:site => service, :page => page} }
31
+ @options = { query: {site: service, page: page} }
32
32
  end
33
33
 
34
34
  def questions
@@ -68,7 +68,10 @@ httparty "https://api.stackexchange.com/2.2/questions?site=stackoverflow"
68
68
  ## Contributing
69
69
 
70
70
  * Fork the project.
71
+ * Run `bundle`
72
+ * Run `bundle exec rake`
71
73
  * Make your feature addition or bug fix.
72
74
  * Add tests for it. This is important so I don't break it in a future version unintentionally.
75
+ * Run `bundle exec rake` (No, REALLY :))
73
76
  * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull)
74
77
  * Send me a pull request. Bonus points for topic branches.
data/Rakefile CHANGED
@@ -3,10 +3,9 @@ Spec::Rake::SpecTask.new(:spec) do |spec|
3
3
  spec.ruby_opts << '-rubygems'
4
4
  spec.libs << 'lib' << 'spec'
5
5
  spec.spec_files = FileList['spec/**/*_spec.rb']
6
- spec.spec_opts = ['--options', 'spec/spec.opts']
7
6
  end
8
7
 
9
8
  require 'cucumber/rake/task'
10
9
  Cucumber::Rake::Task.new(:features)
11
10
 
12
- task :default => [:spec, :features]
11
+ task default: [:spec, :features]
@@ -7,9 +7,9 @@ $:.unshift(File.join(File.dirname(__FILE__), "/../lib"))
7
7
  require "httparty"
8
8
 
9
9
  opts = {
10
- :action => :get,
11
- :headers => {},
12
- :verbose => false
10
+ action: :get,
11
+ headers: {},
12
+ verbose: false
13
13
  }
14
14
 
15
15
  OptionParser.new do |o|
@@ -51,7 +51,7 @@ OptionParser.new do |o|
51
51
  o.on("-u", "--user [CREDS]", "Use basic authentication. Value should be user:password") do |u|
52
52
  abort "Invalid credentials format. Must be user:password" unless u =~ /.*:.+/
53
53
  user, password = u.split(':')
54
- opts[:basic_auth] = { :username => user, :password => password }
54
+ opts[:basic_auth] = { username: user, password: password }
55
55
  end
56
56
 
57
57
  o.on("-r", "--response-code", "Command fails if response code >= 400") do
@@ -0,0 +1,64 @@
1
+ ## Examples
2
+
3
+ * [Amazon Book Search](aaws.rb)
4
+ * Httparty included into poro class
5
+ * Uses `get` requests
6
+ * Transforms query params to uppercased params
7
+
8
+ * [Google Search](google.rb)
9
+ * Httparty included into poro class
10
+ * Uses `get` requests
11
+
12
+ * [Crack Custom Parser](crack.rb)
13
+ * Creates a custom parser for XML using crack gem
14
+ * Uses `get` request
15
+
16
+ * [Create HTML Nokogiri parser](nokogiri_html_parser.rb)
17
+ * Adds Html as a format
18
+ * passed the body of request to Nokogiri
19
+
20
+ * [More Custom Parsers](custom_parsers.rb)
21
+ * Create an additional parser for atom or make it the ONLY parser
22
+
23
+ * [Basic Auth, Delicious](delicious.rb)
24
+ * Basic Auth, shows how to merge those into options
25
+ * Uses `get` requests
26
+
27
+ * [Passing Headers, User Agent](headers_and_user_agents.rb)
28
+ * Use the class method of Httparty
29
+ * Pass the User-Agent in the headers
30
+ * Uses `get` requests
31
+
32
+ * [Basic Post Request](basic.rb)
33
+ * Httparty included into poro class
34
+ * Uses `post` requests
35
+
36
+ * [Access Rubyurl Shortener](rubyurl.rb)
37
+ * Httparty included into poro class
38
+ * Uses `post` requests
39
+
40
+ * [Add a custom log file](logging.rb)
41
+ * create a log file and have httparty log requests
42
+
43
+ * [Accessing StackExchange](stackexchange.rb)
44
+ * Httparty included into poro class
45
+ * Creates methods for different endpoints
46
+ * Uses `get` requests
47
+
48
+ * [Accessing Tripit](tripit_sign_in.rb)
49
+ * Httparty included into poro class
50
+ * Example of using `debug_output` to see headers/urls passed
51
+ * Getting and using Cookies
52
+ * Uses `get` requests
53
+
54
+ * [Accessing Twitter](twitter.rb)
55
+ * Httparty included into poro class
56
+ * Basic Auth
57
+ * Loads settings from a config file
58
+ * Uses `get` requests
59
+ * Uses `post` requests
60
+
61
+ * [Accessing WhoIsMyRep](whoismyrep.rb)
62
+ * Httparty included into poro class
63
+ * Uses `get` requests
64
+ * Two ways to pass params to get, inline on the url or in query hash
@@ -10,10 +10,10 @@ module AAWS
10
10
  class Book
11
11
  include HTTParty
12
12
  base_uri 'http://ecs.amazonaws.com'
13
- default_params :Service => 'AWSECommerceService', :Operation => 'ItemSearch', :SearchIndex => 'Books'
13
+ default_params Service: 'AWSECommerceService', Operation: 'ItemSearch', SearchIndex: 'Books'
14
14
 
15
15
  def initialize(key)
16
- self.class.default_params :AWSAccessKeyId => key
16
+ self.class.default_params AWSAccessKeyId: key
17
17
  end
18
18
 
19
19
  def search(options={})
@@ -29,4 +29,4 @@ module AAWS
29
29
  end
30
30
 
31
31
  aaws = AAWS::Book.new(config[:access_key])
32
- pp aaws.search(:query => {:title => 'Ruby On Rails'})
32
+ pp aaws.search(query: {title: 'Ruby On Rails'})
@@ -16,11 +16,11 @@ class Partay
16
16
  end
17
17
 
18
18
  options = {
19
- :body => {
20
- :pear => { # your resource
21
- :foo => '123', # your columns/data
22
- :bar => 'second',
23
- :baz => 'last thing'
19
+ body: {
20
+ pear: { # your resource
21
+ foo: '123', # your columns/data
22
+ bar: 'second',
23
+ baz: 'last thing'
24
24
  }
25
25
  }
26
26
  }
@@ -16,4 +16,4 @@ class Rep
16
16
  end
17
17
 
18
18
  pp Rep.get('http://whoismyrepresentative.com/getall_mems.php?zip=46544')
19
- pp Rep.get('http://whoismyrepresentative.com/getall_mems.php', :query => {:zip => 46544})
19
+ pp Rep.get('http://whoismyrepresentative.com/getall_mems.php', query: {zip: 46544})
@@ -8,16 +8,16 @@ class Delicious
8
8
  base_uri 'https://api.del.icio.us/v1'
9
9
 
10
10
  def initialize(u, p)
11
- @auth = {:username => u, :password => p}
11
+ @auth = {username: u, password: p}
12
12
  end
13
13
 
14
14
  # query params that filter the posts are:
15
15
  # tag (optional). Filter by this tag.
16
16
  # dt (optional). Filter by this date (CCYY-MM-DDThh:mm:ssZ).
17
17
  # url (optional). Filter by this url.
18
- # ie: posts(:query => {:tag => 'ruby'})
18
+ # ie: posts(query: {tag: 'ruby'})
19
19
  def posts(options={})
20
- options.merge!({:basic_auth => @auth})
20
+ options.merge!({basic_auth: @auth})
21
21
  self.class.get('/posts/get', options)
22
22
  end
23
23
 
@@ -25,13 +25,13 @@ class Delicious
25
25
  # tag (optional). Filter by this tag.
26
26
  # count (optional). Number of items to retrieve (Default:15, Maximum:100).
27
27
  def recent(options={})
28
- options.merge!({:basic_auth => @auth})
28
+ options.merge!({basic_auth: @auth})
29
29
  self.class.get('/posts/recent', options)
30
30
  end
31
31
  end
32
32
 
33
33
  delicious = Delicious.new(config['username'], config['password'])
34
- pp delicious.posts(:query => {:tag => 'ruby'})
34
+ pp delicious.posts(query: {tag: 'ruby'})
35
35
  pp delicious.recent
36
36
 
37
37
  delicious.recent['posts']['post'].each { |post| puts post['href'] }
@@ -3,4 +3,4 @@
3
3
  require 'httparty'
4
4
 
5
5
  APPLICATION_NAME = "Httparty"
6
- response = HTTParty.get('http://example.com', :headers => {"User-Agent" => APPLICATION_NAME})
6
+ response = HTTParty.get('http://example.com', headers: {"User-Agent" => APPLICATION_NAME})
@@ -0,0 +1,38 @@
1
+ dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require File.join(dir, 'httparty')
3
+ require 'logger'
4
+ require 'pp'
5
+
6
+ my_logger = Logger.new "httparty.log"
7
+
8
+ my_logger.info "Logging can be used on the main HTTParty class. It logs redirects too."
9
+ HTTParty.get "http://google.com", logger: my_logger
10
+
11
+ my_logger.info '*'*70
12
+
13
+ my_logger.info "It can be used also on a custom class."
14
+
15
+ class Google
16
+ include HTTParty
17
+ logger ::Logger.new "httparty.log"
18
+ end
19
+
20
+ Google.get "http://google.com"
21
+
22
+ my_logger.info '*'*70
23
+
24
+ my_logger.info "The default formatter is :apache. The :curl formatter can also be used."
25
+ my_logger.info "You can tell wich method to call on the logger too. It is info by default."
26
+ HTTParty.get "http://google.com", logger: my_logger, log_level: :debug, log_format: :curl
27
+
28
+
29
+ my_logger.info '*'*70
30
+
31
+ my_logger.info "These configs are also available on custom classes."
32
+ class Google
33
+ include HTTParty
34
+ logger ::Logger.new("httparty.log"), :debug, :curl
35
+ end
36
+
37
+ Google.get "http://google.com"
38
+
@@ -7,7 +7,7 @@ class Rubyurl
7
7
  base_uri 'rubyurl.com'
8
8
 
9
9
  def self.shorten( website_url )
10
- post( '/api/links.json', :query => { :link => { :website_url => website_url } } )
10
+ post( '/api/links.json', query: { link: { website_url: website_url } } )
11
11
  end
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ class StackExchange
7
7
  base_uri 'api.stackexchange.com'
8
8
 
9
9
  def initialize(service, page)
10
- @options = { :query => {:site => service, :page => page} }
10
+ @options = { query: {site: service, page: page} }
11
11
  end
12
12
 
13
13
  def questions
@@ -11,17 +11,17 @@ class TripIt
11
11
  response = self.class.get('/account/login')
12
12
  response = self.class.post(
13
13
  '/account/login',
14
- :body => {
15
- :login_email_address => email,
16
- :login_password => password
14
+ body: {
15
+ login_email_address: email,
16
+ login_password: password
17
17
  },
18
- :headers => {'Cookie' => response.headers['Set-Cookie']}
18
+ headers: {'Cookie' => response.headers['Set-Cookie']}
19
19
  )
20
20
  @cookie = response.request.options[:headers]['Cookie']
21
21
  end
22
22
 
23
23
  def account_settings
24
- self.class.get('/account/edit', :headers => {'Cookie' => @cookie})
24
+ self.class.get('/account/edit', headers: {'Cookie' => @cookie})
25
25
  end
26
26
 
27
27
  def logged_in?
@@ -8,24 +8,24 @@ class Twitter
8
8
  base_uri 'twitter.com'
9
9
 
10
10
  def initialize(u, p)
11
- @auth = {:username => u, :password => p}
11
+ @auth = {username: u, password: p}
12
12
  end
13
13
 
14
14
  # which can be :friends, :user or :public
15
15
  # options[:query] can be things like since, since_id, count, etc.
16
16
  def timeline(which=:friends, options={})
17
- options.merge!({:basic_auth => @auth})
17
+ options.merge!({basic_auth: @auth})
18
18
  self.class.get("/statuses/#{which}_timeline.json", options)
19
19
  end
20
20
 
21
21
  def post(text)
22
- options = { :query => {:status => text}, :basic_auth => @auth }
22
+ options = { query: {status: text}, basic_auth: @auth }
23
23
  self.class.post('/statuses/update.json', options)
24
24
  end
25
25
  end
26
26
 
27
27
  twitter = Twitter.new(config['email'], config['password'])
28
28
  pp twitter.timeline
29
- # pp twitter.timeline(:friends, :query => {:since_id => 868482746})
30
- # pp twitter.timeline(:friends, :query => 'since_id=868482746')
29
+ # pp twitter.timeline(:friends, query: {since_id: 868482746})
30
+ # pp twitter.timeline(:friends, query: 'since_id=868482746')
31
31
  # pp twitter.post('this is a test of 0.2.0')