moomerman-twitter_oauth 0.1.11 → 0.1.14

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.
Files changed (2) hide show
  1. data/lib/twitter_oauth/favorites.rb +20 -0
  2. metadata +2 -1
@@ -0,0 +1,20 @@
1
+ module TwitterOAuth
2
+ class Client
3
+
4
+ def favorites(page=1)
5
+ oauth_response = access_token.get("/favorites.json?page=#{page}")
6
+ JSON.parse(oauth_response.body)
7
+ end
8
+
9
+ def favorite
10
+ oauth_response = access_token.post("/favorites/create/#{id}.json")
11
+ JSON.parse(oauth_response.body)
12
+ end
13
+
14
+ def unfavorite
15
+ oauth_response = access_token.post("/favorites/destroy/#{id}.json")
16
+ JSON.parse(oauth_response.body)
17
+ end
18
+
19
+ end
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moomerman-twitter_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Taylor
@@ -53,6 +53,7 @@ files:
53
53
  - lib/twitter_oauth/friendships.rb
54
54
  - lib/twitter_oauth/notifications.rb
55
55
  - lib/twitter_oauth/user.rb
56
+ - lib/twitter_oauth/favorites.rb
56
57
  has_rdoc: false
57
58
  homepage: http://github.com/moomerman/twitter_oauth
58
59
  post_install_message: