twitter_oauth 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,5 +38,16 @@ module TwitterOAuth
38
38
  post('/account/update_profile_colors.json', colors)
39
39
  end
40
40
 
41
+ # Sets values that users are able to set under the "Account" tab of their settings page.
42
+ # Valid parameters are:
43
+ # :name Full name associated with the profile. Maximum of 20 characters.
44
+ # :url URL associated with the profile. Will be prepended with "http://" if not present. Maximum of 100 characters.
45
+ # :location The city or country describing where the user of the account is located. The contents are not normalized
46
+ # or geocoded in any way. Maximum of 30 characters.
47
+ # :description A description of the user owning the account. Maximum of 160 characters.
48
+ def update_profile(params)
49
+ post('/account/update_profile', params)
50
+ end
51
+
41
52
  end
42
53
  end
@@ -1,9 +1,12 @@
1
1
  module TwitterOAuth
2
2
  class Client
3
3
 
4
- # Returns a list of the 20 most recent direct messages sent to the authenticating user.
5
- def messages(page=1)
6
- get("/direct_messages.json?page=#{page}")
4
+ # Return the most recent direct messages sent to the authenticating user.
5
+ # By default, returns the last 20. See http://apiwiki.twitter.com/Twitter-REST-API-Method:-direct_messages
6
+ # for other options
7
+ def messages(options={})
8
+ args = options.map{|k,v| "#{k}=#{v}"}.join('&')
9
+ get("/direct_messages.json?#{args}")
7
10
  end
8
11
 
9
12
  # Returns a list of the 20 most recent direct messages sent by the authenticating user.
@@ -5,7 +5,7 @@ module TwitterOAuth
5
5
 
6
6
  def search(q, options={})
7
7
  options[:page] ||= 1
8
- options[:per_page] ||= 20
8
+ options[:rpp] ||= 20
9
9
  options[:q] = URI.escape(q)
10
10
  args = options.map{|k,v| "#{k}=#{v}"}.join('&')
11
11
  search_get("/search.json?#{args}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-02-22 00:00:00 +00:00
12
+ date: 2010-04-27 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency