mambanation 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/lib/mambanation/base.rb +30 -27
- data/lib/mambanation/httpauth.rb +11 -12
- data/lib/mambanation/request.rb +18 -19
- data/lib/mambanation.rb +3 -4
- data/test/fixtures/mission_families.json +1 -1
- data/test/fixtures/mission_statuses.json +1 -1
- data/test/fixtures/posts.json +30 -30
- data/test/fixtures/publish_post.json +8 -8
- data/test/fixtures/user.json +32 -1
- data/test/fixtures/user_error.json +1 -1
- data/test/fixtures/user_posts.json +62 -62
- metadata +5 -5
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ Jeweler::Tasks.new do |gem|
|
|
6
6
|
gem.summary = %Q{wrapper for mambanation-api}
|
7
7
|
gem.email = ["jeremyvdw@gmail.com", "sbellity@gmail.com", "tian.jiang01@gmail.com"]
|
8
8
|
gem.homepage = "https://github.com/mimesis/mambanation-wrapper"
|
9
|
-
gem.authors = ["
|
9
|
+
gem.authors = ["Jérémy Van de Wyngaert", "Stéphane Bellity", "Tian Jiang"]
|
10
10
|
gem.files = FileList["[A-Z]*", "{lib,test}/**/*"]
|
11
11
|
|
12
12
|
gem.add_dependency("hashie", "= 0.4.0")
|
data/VERSION.yml
CHANGED
data/lib/mambanation/base.rb
CHANGED
@@ -11,6 +11,11 @@ module MambaNation
|
|
11
11
|
@fbs_cookies = fbs_cookies
|
12
12
|
end
|
13
13
|
|
14
|
+
# Class method to fetch current user based on cookie
|
15
|
+
def self.current_user(client, fbs_cookies)
|
16
|
+
MambaNation::Base.new(client, fbs_cookies).current_user
|
17
|
+
end
|
18
|
+
|
14
19
|
#
|
15
20
|
# Famous
|
16
21
|
#
|
@@ -18,8 +23,8 @@ module MambaNation
|
|
18
23
|
perform_get("/users/famous.json", :query => query)
|
19
24
|
end
|
20
25
|
|
21
|
-
def current_user
|
22
|
-
perform_get("/users/me") unless fbs_cookies.nil?
|
26
|
+
def current_user(query = {})
|
27
|
+
perform_get("/users/me", :query => query) unless fbs_cookies.nil?
|
23
28
|
end
|
24
29
|
|
25
30
|
def user_by_facebook_id(facebook_id, query = {})
|
@@ -30,21 +35,20 @@ module MambaNation
|
|
30
35
|
perform_get("/users/find_by?facebook_id=#{email}", :query => query)
|
31
36
|
end
|
32
37
|
|
33
|
-
# Options: user_id, facebook_id
|
34
38
|
def user(id, query = {})
|
35
39
|
perform_get("/users/#{id.to_i}.json", :query => query)
|
36
40
|
end
|
37
41
|
alias_method :user_by_id, :user
|
38
42
|
|
39
|
-
def user_set_websession(id, credentials)
|
40
|
-
perform_post("/users/#{id.to_i}/update_websession", :body => { :user => { :user_credentials => credentials }})
|
43
|
+
def user_set_websession(id, credentials, query = {})
|
44
|
+
perform_post("/users/#{id.to_i}/update_websession", :body => { :user => { :user_credentials => credentials } }.merge(query))
|
41
45
|
end
|
42
46
|
|
43
47
|
#
|
44
48
|
# User actions
|
45
49
|
#
|
46
|
-
def user_last_login(id)
|
47
|
-
perform_get("/users/#{id.to_i}/last_login.json")
|
50
|
+
def user_last_login(id, query = {})
|
51
|
+
perform_get("/users/#{id.to_i}/last_login.json", :query => query)
|
48
52
|
end
|
49
53
|
|
50
54
|
def user_chats(id, query = {})
|
@@ -73,7 +77,7 @@ module MambaNation
|
|
73
77
|
|
74
78
|
# Options: user_id, :limit
|
75
79
|
def user_media(id, query = {})
|
76
|
-
perform_get("/users/#{id.to_i}/media.json", :query => query)
|
80
|
+
perform_get("/users/#{id.to_i}/media.json", :query => {}.merge(query))
|
77
81
|
end
|
78
82
|
|
79
83
|
# Options: user_id, facebook_id
|
@@ -85,8 +89,8 @@ module MambaNation
|
|
85
89
|
# Facets
|
86
90
|
#
|
87
91
|
# Options: facet_id
|
88
|
-
def facet(id)
|
89
|
-
perform_get("/facets/#{id.to_i}.json")
|
92
|
+
def facet(id, query = {})
|
93
|
+
perform_get("/facets/#{id.to_i}.json", :query => query)
|
90
94
|
end
|
91
95
|
|
92
96
|
def famous_facets(query = {})
|
@@ -120,9 +124,8 @@ module MambaNation
|
|
120
124
|
#
|
121
125
|
# Mission Statuses
|
122
126
|
#
|
123
|
-
|
124
|
-
|
125
|
-
perform_get("/users/#{user_id.to_i}/mission_status/#{mission_id}.json", :query => query)
|
127
|
+
def mission_status(id, mission_id, query = {})
|
128
|
+
perform_get("/users/#{id.to_i}/mission_status/#{mission_id}.json", :query => query)
|
126
129
|
end
|
127
130
|
|
128
131
|
def mission_statuses(id, query = {})
|
@@ -133,8 +136,8 @@ module MambaNation
|
|
133
136
|
perform_get("/users/#{id.to_i}/missions_family_statuses.json", :query => query)
|
134
137
|
end
|
135
138
|
|
136
|
-
def mission_start!(id, mission_id)
|
137
|
-
perform_put("/users/#{id.to_i}/mission_statuses/#{mission_id.to_i}/start")
|
139
|
+
def mission_start!(id, mission_id, query = {})
|
140
|
+
perform_put("/users/#{id.to_i}/mission_statuses/#{mission_id.to_i}/start", :query => {}.merge(query))
|
138
141
|
end
|
139
142
|
|
140
143
|
#
|
@@ -148,19 +151,19 @@ module MambaNation
|
|
148
151
|
perform_get("/users/#{id.to_i}/posts.json", :query => { :application_id => application_id }.merge(query))
|
149
152
|
end
|
150
153
|
|
151
|
-
def create_post(id, post, application_id)
|
152
|
-
perform_post("/posts", :body => { :user_id => id, :post => post, :application_id => application_id })
|
154
|
+
def create_post(id, post, application_id, query = {})
|
155
|
+
perform_post("/posts", :body => { :user_id => id, :post => post, :application_id => application_id }.merge(query))
|
153
156
|
end
|
154
157
|
|
155
|
-
def publish_post(id, stream_id)
|
156
|
-
perform_post("/posts/#{id}/publish.json", :body => { :post => { :stream_id => stream_id } })
|
158
|
+
def publish_post(id, stream_id, query = {})
|
159
|
+
perform_post("/posts/#{id}/publish.json", :body => { :post => { :stream_id => stream_id } }.merge(query))
|
157
160
|
end
|
158
161
|
|
159
162
|
#
|
160
163
|
# Roles
|
161
164
|
#
|
162
|
-
def user_roles(id)
|
163
|
-
perform_get("/users/#{id.to_i}/roles.json")
|
165
|
+
def user_roles(id, query = {})
|
166
|
+
perform_get("/users/#{id.to_i}/roles.json", :query => query)
|
164
167
|
end
|
165
168
|
|
166
169
|
#
|
@@ -174,8 +177,8 @@ module MambaNation
|
|
174
177
|
perform_get("/users/#{id.to_i}/unread_system_messages.json", :query => query)
|
175
178
|
end
|
176
179
|
|
177
|
-
def read_user_message(id, message_id)
|
178
|
-
perform_post("/users/#{id.to_i}/messages/#{message_id.to_i}/read.json", :body => {})
|
180
|
+
def read_user_message(id, message_id, query = {})
|
181
|
+
perform_post("/users/#{id.to_i}/messages/#{message_id.to_i}/read.json", :body => {}.merge(query))
|
179
182
|
end
|
180
183
|
|
181
184
|
#
|
@@ -199,11 +202,11 @@ module MambaNation
|
|
199
202
|
else 'application/octet-stream'
|
200
203
|
end
|
201
204
|
end
|
202
|
-
|
205
|
+
|
203
206
|
def mime_type(f) self.class.mime_type(f) end
|
204
|
-
|
207
|
+
|
205
208
|
CRLF = "\r\n"
|
206
|
-
|
209
|
+
|
207
210
|
def self.build_multipart_bodies(parts)
|
208
211
|
boundary = Time.now.to_i.to_s(16)
|
209
212
|
body = ""
|
@@ -225,7 +228,7 @@ module MambaNation
|
|
225
228
|
:headers => {"Content-Type" => "multipart/form-data; boundary=#{boundary}"}
|
226
229
|
}
|
227
230
|
end
|
228
|
-
|
231
|
+
|
229
232
|
def build_multipart_bodies(parts) self.class.build_multipart_bodies(parts) end
|
230
233
|
|
231
234
|
private
|
data/lib/mambanation/httpauth.rb
CHANGED
@@ -1,49 +1,48 @@
|
|
1
1
|
module MambaNation
|
2
2
|
class HTTPAuth
|
3
3
|
include HTTParty
|
4
|
-
|
4
|
+
|
5
5
|
format :plain
|
6
|
-
|
6
|
+
|
7
7
|
attr_reader :username, :password, :options
|
8
|
-
|
8
|
+
|
9
9
|
def initialize(username, password, options={})
|
10
10
|
|
11
11
|
@username, @password = username, password
|
12
12
|
@options = { :ssl => false, :timeout => 100 }.merge(options)
|
13
13
|
options[:api_endpoint] ||= "api.mambanation.com"
|
14
|
-
|
14
|
+
|
15
15
|
if options[:api_version] == false
|
16
16
|
version_path = "2"
|
17
17
|
else
|
18
18
|
options[:api_version] ||= API_VERSION
|
19
19
|
version_path = "#{options[:api_version]}"
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
self.class.base_uri "http#{'s' if options[:ssl]}://#{options[:api_endpoint]}/v#{version_path}"
|
23
23
|
self.class.default_timeout options[:timeout] if options[:timeout]
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def get(uri, headers={})
|
27
27
|
self.class.get(uri, :headers => headers, :basic_auth => basic_auth)
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def post(uri, body={}, headers={})
|
31
31
|
self.class.post(uri, :body => body, :headers => headers, :basic_auth => basic_auth)
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
def put(uri, body={}, headers={})
|
35
35
|
self.class.put(uri, :body => body, :headers => headers, :basic_auth => basic_auth)
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
def delete(uri, body={}, headers={})
|
39
39
|
self.class.delete(uri, :body => body, :headers => headers, :basic_auth => basic_auth)
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
private
|
43
|
-
|
43
|
+
|
44
44
|
def basic_auth
|
45
45
|
@basic_auth ||= {:username => @username, :password => @password}
|
46
46
|
end
|
47
|
-
|
48
47
|
end
|
49
48
|
end
|
data/lib/mambanation/request.rb
CHANGED
@@ -1,72 +1,71 @@
|
|
1
1
|
module MambaNation
|
2
2
|
class Request
|
3
3
|
extend Forwardable
|
4
|
-
|
4
|
+
|
5
5
|
def self.get(client, path, options={})
|
6
6
|
new(client, :get, path, options).perform
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
def self.post(client, path, options={})
|
10
10
|
new(client, :post, path, options).perform
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
def self.put(client, path, options={})
|
14
14
|
options[:body] ||= ""
|
15
15
|
new(client, :put, path, options).perform
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def self.delete(client, path, options={})
|
19
19
|
new(client, :delete, path, options).perform
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
attr_reader :client, :method, :path, :options
|
23
|
-
|
23
|
+
|
24
24
|
def_delegators :client, :get, :post, :put, :delete
|
25
|
-
|
25
|
+
|
26
26
|
def initialize(client, method, path, options={})
|
27
27
|
@client, @method, @path, @options = client, method, path, options
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def uri
|
31
31
|
@uri ||= begin
|
32
32
|
uri = URI.parse(path)
|
33
|
-
|
33
|
+
|
34
34
|
if options[:query] && options[:query] != {}
|
35
35
|
uri.query = to_query(options[:query])
|
36
36
|
end
|
37
|
-
|
37
|
+
|
38
38
|
uri.to_s
|
39
39
|
end
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
def perform
|
43
43
|
MambaNation.make_friendly(send("perform_#{method}"))
|
44
44
|
end
|
45
|
-
|
45
|
+
|
46
46
|
private
|
47
|
-
|
47
|
+
|
48
48
|
def perform_get
|
49
49
|
get(uri, options[:headers])
|
50
50
|
end
|
51
|
-
|
51
|
+
|
52
52
|
def perform_post
|
53
53
|
post(uri, options[:body], options[:headers])
|
54
54
|
end
|
55
|
-
|
55
|
+
|
56
56
|
def perform_put
|
57
57
|
put(uri, options[:body], options[:headers])
|
58
58
|
end
|
59
|
-
|
59
|
+
|
60
60
|
def perform_delete
|
61
61
|
delete(uri, options[:headers])
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
def to_query(options)
|
65
65
|
options.inject([]) do |collection, opt|
|
66
66
|
collection << "#{opt[0]}=#{opt[1]}"
|
67
67
|
collection
|
68
68
|
end * '&'
|
69
69
|
end
|
70
|
-
|
71
70
|
end
|
72
|
-
end
|
71
|
+
end
|
data/lib/mambanation.rb
CHANGED
@@ -6,7 +6,6 @@ require "yajl"
|
|
6
6
|
module MambaNation
|
7
7
|
include HTTParty
|
8
8
|
API_VERSION = "2".freeze
|
9
|
-
format :json
|
10
9
|
|
11
10
|
class MambaNationError < StandardError
|
12
11
|
attr_reader :data
|
@@ -70,11 +69,11 @@ module MambaNation
|
|
70
69
|
raise Unavailable, "(#{response.code}): #{response.message}"
|
71
70
|
end
|
72
71
|
end
|
73
|
-
|
72
|
+
|
74
73
|
def self.parse(response)
|
75
74
|
Yajl::Parser.parse(response.body)
|
76
75
|
end
|
77
|
-
|
76
|
+
|
78
77
|
def self.mash(obj)
|
79
78
|
if obj.is_a?(Array)
|
80
79
|
obj.map{|item| make_mash_with_consistent_hash(item)}
|
@@ -84,7 +83,7 @@ module MambaNation
|
|
84
83
|
obj
|
85
84
|
end
|
86
85
|
end
|
87
|
-
|
86
|
+
|
88
87
|
# Lame workaround for the fact that mash doesn't hash correctly
|
89
88
|
def self.make_mash_with_consistent_hash(obj)
|
90
89
|
m = Hashie::Mash.new(obj)
|
data/test/fixtures/posts.json
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
2
|
+
"created_at": 1267107614,
|
3
|
+
"published_streams": {
|
4
|
+
"100000436786256": "100000436786256_105254089499150"
|
5
|
+
},
|
6
|
+
"updated_at": 1267107616,
|
7
|
+
"action_links": {
|
8
|
+
"0": {
|
9
|
+
"href": "http://apps.facebook.com/mambatemplate?post_id={{post_id}}",
|
10
|
+
"text": "Reply !"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
"attachment": {
|
14
|
+
"href": "http://api.sandbox.mambanation.com:3001/v1/",
|
15
|
+
"name": "NEWYEAR",
|
16
|
+
"media": [{
|
17
|
+
"expanded_width": "320",
|
18
|
+
"swfsrc": "http://api.sandbox.mambanation.com/flv_player.swf?flv=http://d387vg9sga25dr.cloudfront.net/video/1da41a11cf6570642ba9d7c91f2c48_NEWYEAR.flv",
|
19
|
+
"imgsrc": "http://d387vg9sga25dr.cloudfront.net/preview/1da41a11cf6570642ba9d7c91f2c48_NEWYEAR.png",
|
20
|
+
"type": "flash",
|
21
|
+
"expanded_height": "260"
|
22
|
+
}]
|
23
|
+
},
|
24
|
+
"_id": "4b86871ed45037109900001c",
|
25
|
+
"fb_application_id": "293415521400",
|
26
|
+
"uid": "100000436786256",
|
27
|
+
"other": {
|
28
|
+
"example": "1234"
|
29
|
+
},
|
30
|
+
"message": "hihihi",
|
31
|
+
"target_ids": ["100000436786256"]
|
32
32
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
message: 'message perso',
|
3
|
-
attachment: {
|
2
|
+
"message": 'message perso',
|
3
|
+
"attachment": {
|
4
4
|
'name': 'titre',
|
5
5
|
'href': 'url',
|
6
6
|
'caption': 'sous-titre',
|
@@ -21,22 +21,22 @@
|
|
21
21
|
'expanded_height': '200'
|
22
22
|
}]
|
23
23
|
},
|
24
|
-
action_links : [{
|
24
|
+
"action_links" : [{
|
25
25
|
'text':'action_links_text',
|
26
26
|
'href':'link_appli'
|
27
27
|
}],
|
28
|
-
uid: MambaNation.userId,
|
29
|
-
target_ids: {
|
30
|
-
uid001 : {
|
28
|
+
"uid": MambaNation.userId,
|
29
|
+
"target_ids": {
|
30
|
+
"uid001" : {
|
31
31
|
VAR_1 : 'Texte de remplacement',
|
32
32
|
VAR_2 : 'UserSpecificVar'
|
33
33
|
},
|
34
|
-
uid002 : {
|
34
|
+
"uid002" : {
|
35
35
|
VAR_1 : 'Texte de remplacement',
|
36
36
|
VAR_2 : 'UserSpecificVar'
|
37
37
|
}
|
38
38
|
},
|
39
|
-
other: {
|
39
|
+
"other": {
|
40
40
|
'anythingelse' : 'some_text_to_save',
|
41
41
|
'anythingelse' : 'some_text_to_save'
|
42
42
|
}
|
data/test/fixtures/user.json
CHANGED
@@ -1 +1,32 @@
|
|
1
|
-
{
|
1
|
+
{
|
2
|
+
"mamba_level": 1,
|
3
|
+
"facebook_id": 1474761574,
|
4
|
+
"points_to_next_level": 150,
|
5
|
+
"websession_id": 4,
|
6
|
+
"applications": {
|
7
|
+
},
|
8
|
+
"avatar": {
|
9
|
+
"name": "b1276619510847471",
|
10
|
+
"updated_at": 1276619510,
|
11
|
+
"gender": null,
|
12
|
+
"id": 4,
|
13
|
+
"type": null,
|
14
|
+
"fingerprint": null
|
15
|
+
},
|
16
|
+
"gender": null,
|
17
|
+
"id": 4,
|
18
|
+
"media": [
|
19
|
+
],
|
20
|
+
"percent_of_current_level": 0,
|
21
|
+
"blings": 0,
|
22
|
+
"last_name": null,
|
23
|
+
"posts": {
|
24
|
+
"count_received": 0,
|
25
|
+
"count_sent": 0
|
26
|
+
},
|
27
|
+
"mamba_points": 0,
|
28
|
+
"status": "active",
|
29
|
+
"vibes": "-",
|
30
|
+
"email": "tian.jiang01@gmail.com",
|
31
|
+
"first_name": null
|
32
|
+
}
|
@@ -1,70 +1,70 @@
|
|
1
1
|
{
|
2
|
-
sent: [
|
2
|
+
"sent": [
|
3
3
|
{
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
4
|
+
"created_at": 1267107614,
|
5
|
+
"published_streams": {
|
6
|
+
"100000436786256": "100000436786256_105254089499150"
|
7
|
+
},
|
8
|
+
"updated_at": 1267107616,
|
9
|
+
"action_links": {
|
10
|
+
"0": {
|
11
|
+
"href": "http://apps.facebook.com/mambatemplate?post_id={{post_id}}",
|
12
|
+
"text": "Reply !"
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"attachment": {
|
16
|
+
"href": "http://api.sandbox.mambanation.com:3001/v1/",
|
17
|
+
"name": "NEWYEAR",
|
18
|
+
"media": [{
|
19
|
+
"expanded_width": "320",
|
20
|
+
"swfsrc": "http://api.sandbox.mambanation.com/flv_player.swf?flv=http://d387vg9sga25dr.cloudfront.net/video/1da41a11cf6570642ba9d7c91f2c48_NEWYEAR.flv",
|
21
|
+
"imgsrc": "http://d387vg9sga25dr.cloudfront.net/preview/1da41a11cf6570642ba9d7c91f2c48_NEWYEAR.png",
|
22
|
+
"type": "flash",
|
23
|
+
"expanded_height": "260"
|
24
|
+
}]
|
25
|
+
},
|
26
|
+
"_id": "4b86871ed45037109900001c",
|
27
|
+
"fb_application_id": "293415521400",
|
28
|
+
"uid": "100000436786256",
|
29
|
+
"other": {
|
30
|
+
"example": "1234"
|
31
|
+
},
|
32
|
+
"message": "hihihi",
|
33
|
+
"target_ids": ["100000436786256"]
|
34
34
|
}
|
35
35
|
], // list of posts sent by the user
|
36
|
-
received: [
|
36
|
+
"received": [
|
37
37
|
{
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
38
|
+
"created_at": 1267107614,
|
39
|
+
"published_streams": {
|
40
|
+
"100000436786256": "100000436786256_105254089499150"
|
41
|
+
},
|
42
|
+
"updated_at": 1267107616,
|
43
|
+
"action_links": {
|
44
|
+
"0": {
|
45
|
+
"href": "http://apps.facebook.com/mambatemplate?post_id={{post_id}}",
|
46
|
+
"text": "Reply !"
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"attachment": {
|
50
|
+
"href": "http://api.sandbox.mambanation.com:3001/v1/",
|
51
|
+
"name": "NEWYEAR",
|
52
|
+
"media": [{
|
53
|
+
"expanded_width": "320",
|
54
|
+
"swfsrc": "http://api.sandbox.mambanation.com/flv_player.swf?flv=http://d387vg9sga25dr.cloudfront.net/video/1da41a11cf6570642ba9d7c91f2c48_NEWYEAR.flv",
|
55
|
+
"imgsrc": "http://d387vg9sga25dr.cloudfront.net/preview/1da41a11cf6570642ba9d7c91f2c48_NEWYEAR.png",
|
56
|
+
"type": "flash",
|
57
|
+
"expanded_height": "260"
|
58
|
+
}]
|
59
|
+
},
|
60
|
+
"_id": "4b86871ed45037109900001c",
|
61
|
+
"fb_application_id": "293415521400",
|
62
|
+
"uid": "100000436786256",
|
63
|
+
"other": {
|
64
|
+
"example": "1234"
|
65
|
+
},
|
66
|
+
"message": "hihihi",
|
67
|
+
"target_ids": ["100000436786256"]
|
68
68
|
}
|
69
69
|
] // list of posts received by the user
|
70
70
|
}
|
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mambanation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 51
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 20
|
10
|
+
version: 0.1.20
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- "J\xC3\xA9r\xC3\xA9my Van de Wyngaert"
|
14
14
|
- "St\xC3\xA9phane Bellity"
|
15
15
|
- Tian Jiang
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-09-
|
20
|
+
date: 2010-09-24 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|