mambanation 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 16
3
+ :patch: 17
4
4
  :build:
5
5
  :major: 0
data/lib/mambanation.rb CHANGED
@@ -73,8 +73,6 @@ module MambaNation
73
73
 
74
74
  def self.parse(response)
75
75
  Yajl::Parser.parse(response.body)
76
- rescue Yajl::ParseError => e
77
- raise_errors(e)
78
76
  end
79
77
 
80
78
  def self.mash(obj)
@@ -37,7 +37,7 @@ module MambaNation
37
37
  alias_method :user_by_id, :user
38
38
 
39
39
  def user_set_websession(id, credentials)
40
- perform_post("/users/#{id.to_i}/update_websession", :query => { :user_credentials => credentials })
40
+ perform_post("/users/#{id.to_i}/update_websession", :body => { :user => { :user_credentials => credentials }})
41
41
  end
42
42
 
43
43
  #
@@ -140,16 +140,16 @@ module MambaNation
140
140
  #
141
141
  # Posts
142
142
  #
143
- def user_posts(id,app_id)
144
- perform_get("/users/#{id.to_i}/posts.json", :query => { :fb_application_id => app_id })
145
- end
143
+ def posts(id, query = {})
144
+ perform_get("/posts/#{id}.json", :query => query)
145
+ end
146
146
 
147
- def create_post(id, app_id, post)
148
- perform_post("/posts", :body => { :post => post , :user_id => id , :fb_sig_app_id => app_id})
147
+ def user_posts(id, app_id, query = {})
148
+ perform_get("/users/#{id.to_i}/posts.json", :query => ({ :fb_application_id => app_id }.merge(query)))
149
149
  end
150
150
 
151
- def posts(id, query = {})
152
- perform_get("/posts/#{id}.json", :query => query)
151
+ def create_post(id, app_id, post)
152
+ perform_post("/posts", :body => { :post => post , :user_id => id , :fb_sig_app_id => app_id})
153
153
  end
154
154
 
155
155
  def publish_post(id, stream_id)
@@ -166,27 +166,27 @@ module MambaNation
166
166
  #
167
167
  # Users System Messages
168
168
  #
169
- def user_system_messages(id)
170
- perform_get("/users/#{id.to_i}/system_messages.json")
169
+ def user_system_messages(id, query = {})
170
+ perform_get("/users/#{id.to_i}/system_messages.json", :query => query)
171
171
  end
172
172
 
173
- def user_unread_system_messages(id)
174
- perform_get("/users/#{id.to_i}/unread_system_messages.json")
173
+ def user_unread_system_messages(id, query = {})
174
+ perform_get("/users/#{id.to_i}/unread_system_messages.json", :query => query)
175
175
  end
176
176
 
177
177
  def read_user_message(id, message_id)
178
- perform_post("/users/#{id.to_i}/messages/#{message_id.to_i}/read.json")
178
+ perform_post("/users/#{id.to_i}/messages/#{message_id.to_i}/read.json", :body => {})
179
179
  end
180
180
 
181
181
  #
182
182
  # User Announcements
183
183
  #
184
- def announcements(id)
185
- perform_get("/users/#{id.to_i}/announcements.json")
184
+ def announcements(id, query = {})
185
+ perform_get("/users/#{id.to_i}/announcements.json", :query => query)
186
186
  end
187
187
 
188
- def read_user_announcement(id, announcement_id)
189
- perform_put("/users/#{id.to_i}/announcements/#{announcement_id.to_i}/read.json")
188
+ def read_user_announcement(id, announcement_id, query = {})
189
+ perform_put("/users/#{id.to_i}/announcements/#{announcement_id.to_i}/read.json", :query => query)
190
190
  end
191
191
 
192
192
  protected
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mambanation
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 16
10
- version: 0.1.16
9
+ - 17
10
+ version: 0.1.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Van de Wyngaert
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-08-26 00:00:00 +02:00
20
+ date: 2010-08-30 00:00:00 +02:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -229,8 +229,8 @@ signing_key:
229
229
  specification_version: 3
230
230
  summary: wrapper for mambanation-api
231
231
  test_files:
232
- - test/mambanation_test.rb
233
- - test/mambanation/request_test.rb
234
232
  - test/mambanation/base_test.rb
235
233
  - test/mambanation/httpauth_test.rb
234
+ - test/mambanation/request_test.rb
235
+ - test/mambanation_test.rb
236
236
  - test/test_helper.rb