rubytter 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rubytter.rb +61 -61
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.3.0
data/lib/rubytter.rb CHANGED
@@ -31,7 +31,7 @@ class Rubytter
31
31
  end
32
32
 
33
33
  def setup(options)
34
- @host = options[:host] || 'twitter.com'
34
+ @host = options[:host] || 'api.twitter.com'
35
35
  @header = {'User-Agent' => "Rubytter/#{VERSION} (http://github.com/jugyo/rubytter)"}
36
36
  @header.merge!(options[:header]) if options[:header]
37
37
  @app_name = options[:app_name]
@@ -42,65 +42,65 @@ class Rubytter
42
42
  def self.api_settings
43
43
  # method name path for API http method
44
44
  "
45
- update_status /statuses/update post
46
- remove_status /statuses/destroy/%s delete
47
- public_timeline /statuses/public_timeline
48
- home_timeline /statuses/home_timeline
49
- friends_timeline /statuses/friends_timeline
50
- replies /statuses/replies
51
- mentions /statuses/mentions
52
- user_timeline /statuses/user_timeline/%s
53
- show /statuses/show/%s
54
- friends /statuses/friends/%s
55
- followers /statuses/followers/%s
56
- retweet /statuses/retweet/%s post
57
- retweets /statuses/retweets/%s
58
- retweeted_by_me /statuses/retweeted_by_me
59
- retweeted_to_me /statuses/retweeted_to_me
60
- retweets_of_me /statuses/retweets_of_me
61
- user /users/show/%s
62
- direct_messages /direct_messages
63
- sent_direct_messages /direct_messages/sent
64
- send_direct_message /direct_messages/new post
65
- remove_direct_message /direct_messages/destroy/%s delete
66
- follow /friendships/create/%s post
67
- leave /friendships/destroy/%s delete
68
- friendship_exists /friendships/exists
69
- followers_ids /followers/ids/%s
70
- friends_ids /friends/ids/%s
71
- favorites /favorites/%s
72
- favorite /favorites/create/%s post
73
- remove_favorite /favorites/destroy/%s delete
74
- verify_credentials /account/verify_credentials get
75
- end_session /account/end_session post
76
- update_delivery_device /account/update_delivery_device post
77
- update_profile_colors /account/update_profile_colors post
78
- limit_status /account/rate_limit_status
79
- update_profile /account/update_profile post
80
- enable_notification /notifications/follow/%s post
81
- disable_notification /notifications/leave/%s post
82
- block /blocks/create/%s post
83
- unblock /blocks/destroy/%s delete
84
- block_exists /blocks/exists/%s get
85
- blocking /blocks/blocking get
86
- blocking_ids /blocks/blocking/ids get
87
- saved_searches /saved_searches get
88
- saved_search /saved_searches/show/%s get
89
- create_saved_search /saved_searches/create post
90
- remove_saved_search /saved_searches/destroy/%s delete
91
- create_list /:user/lists post
92
- update_list /:user/lists/%s put
93
- delete_list /:user/lists/%s delete
94
- lists /%s/lists
95
- lists_followers /%s/lists/memberships
96
- list_statuses /%s/lists/%s/statuses
97
- list /%s/lists/%s
98
- list_members /%s/%s/members
99
- add_member_to_list /:user/%s/members post
100
- remove_member_from_list /:user/%s/members delete
101
- list_following /%s/%s/subscribers
102
- follow_list /%s/%s/subscribers post
103
- remove_list /%s/%s/subscribers delete
45
+ update_status /1/statuses/update post
46
+ remove_status /1/statuses/destroy/%s delete
47
+ public_timeline /1/statuses/public_timeline
48
+ home_timeline /1/statuses/home_timeline
49
+ friends_timeline /1/statuses/friends_timeline
50
+ replies /1/statuses/replies
51
+ mentions /1/statuses/mentions
52
+ user_timeline /1/statuses/user_timeline/%s
53
+ show /1/statuses/show/%s
54
+ friends /1/statuses/friends/%s
55
+ followers /1/statuses/followers/%s
56
+ retweet /1/statuses/retweet/%s post
57
+ retweets /1/statuses/retweets/%s
58
+ retweeted_by_me /1/statuses/retweeted_by_me
59
+ retweeted_to_me /1/statuses/retweeted_to_me
60
+ retweets_of_me /1/statuses/retweets_of_me
61
+ user /1/users/show/%s
62
+ direct_messages /1/direct_messages
63
+ sent_direct_messages /1/direct_messages/sent
64
+ send_direct_message /1/direct_messages/new post
65
+ remove_direct_message /1/direct_messages/destroy/%s delete
66
+ follow /1/friendships/create/%s post
67
+ leave /1/friendships/destroy/%s delete
68
+ friendship_exists /1/friendships/exists
69
+ followers_ids /1/followers/ids/%s
70
+ friends_ids /1/friends/ids/%s
71
+ favorites /1/favorites/%s
72
+ favorite /1/favorites/create/%s post
73
+ remove_favorite /1/favorites/destroy/%s delete
74
+ verify_credentials /1/account/verify_credentials get
75
+ end_session /1/account/end_session post
76
+ update_delivery_device /1/account/update_delivery_device post
77
+ update_profile_colors /1/account/update_profile_colors post
78
+ limit_status /1/account/rate_limit_status
79
+ update_profile /1/account/update_profile post
80
+ enable_notification /1/notifications/follow/%s post
81
+ disable_notification /1/notifications/leave/%s post
82
+ block /1/blocks/create/%s post
83
+ unblock /1/blocks/destroy/%s delete
84
+ block_exists /1/blocks/exists/%s get
85
+ blocking /1/blocks/blocking get
86
+ blocking_ids /1/blocks/blocking/ids get
87
+ saved_searches /1/saved_searches get
88
+ saved_search /1/saved_searches/show/%s get
89
+ create_saved_search /1/saved_searches/create post
90
+ remove_saved_search /1/saved_searches/destroy/%s delete
91
+ create_list /1/:user/lists post
92
+ update_list /1/:user/lists/%s put
93
+ delete_list /1/:user/lists/%s delete
94
+ lists /1/%s/lists
95
+ lists_followers /1/%s/lists/memberships
96
+ list_statuses /1/%s/lists/%s/statuses
97
+ list /1/%s/lists/%s
98
+ list_members /1/%s/%s/members
99
+ add_member_to_list /1/:user/%s/members post
100
+ remove_member_from_list /1/:user/%s/members delete
101
+ list_following /1/%s/%s/subscribers
102
+ follow_list /1/%s/%s/subscribers post
103
+ remove_list /1/%s/%s/subscribers delete
104
104
  ".strip.split("\n").map{|line| line.strip.split(/\s+/)}
105
105
  end
106
106
 
@@ -203,7 +203,7 @@ class Rubytter
203
203
  param_str = '?' + to_param_str(params.merge({:q => query}))
204
204
  path = path + param_str unless param_str.empty?
205
205
  req = create_request(Net::HTTP::Get.new(path))
206
- structize(http_request("api.#{@host}", req))
206
+ structize(http_request(@host, req))
207
207
  end
208
208
 
209
209
  def search_result_to_hash(json)
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 1
7
- - 2
8
- - 2
9
- version: 1.2.2
7
+ - 3
8
+ - 0
9
+ version: 1.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - jugyo
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-13 00:00:00 +09:00
17
+ date: 2010-05-11 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency