fb_graph 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +26 -2
- data/VERSION +1 -1
- data/fb_graph.gemspec +41 -6
- data/lib/fb_graph/album.rb +1 -1
- data/lib/fb_graph/collection.rb +32 -0
- data/lib/fb_graph/comparison.rb +9 -0
- data/lib/fb_graph/connections/activities.rb +1 -1
- data/lib/fb_graph/connections/albums.rb +1 -1
- data/lib/fb_graph/connections/attending.rb +1 -1
- data/lib/fb_graph/connections/books.rb +1 -1
- data/lib/fb_graph/connections/comments.rb +1 -1
- data/lib/fb_graph/connections/declined.rb +1 -1
- data/lib/fb_graph/connections/events.rb +1 -1
- data/lib/fb_graph/connections/feed.rb +1 -1
- data/lib/fb_graph/connections/friends.rb +1 -1
- data/lib/fb_graph/connections/groups.rb +1 -1
- data/lib/fb_graph/connections/home.rb +1 -1
- data/lib/fb_graph/connections/interests.rb +1 -1
- data/lib/fb_graph/connections/invited.rb +1 -1
- data/lib/fb_graph/connections/likes.rb +1 -1
- data/lib/fb_graph/connections/links.rb +1 -1
- data/lib/fb_graph/connections/maybe.rb +1 -1
- data/lib/fb_graph/connections/members.rb +1 -1
- data/lib/fb_graph/connections/movies.rb +1 -1
- data/lib/fb_graph/connections/music.rb +1 -1
- data/lib/fb_graph/connections/noreply.rb +1 -1
- data/lib/fb_graph/connections/notes.rb +1 -1
- data/lib/fb_graph/connections/photos.rb +1 -1
- data/lib/fb_graph/connections/posts.rb +1 -1
- data/lib/fb_graph/connections/statuses.rb +1 -1
- data/lib/fb_graph/connections/tagged.rb +1 -1
- data/lib/fb_graph/connections/television.rb +1 -1
- data/lib/fb_graph/connections/videos.rb +1 -1
- data/lib/fb_graph/event.rb +3 -1
- data/lib/fb_graph/group.rb +4 -3
- data/lib/fb_graph/link.rb +1 -1
- data/lib/fb_graph/node.rb +6 -10
- data/lib/fb_graph/photo.rb +2 -12
- data/lib/fb_graph/post.rb +1 -1
- data/lib/fb_graph/tag.rb +14 -0
- data/lib/fb_graph/user.rb +2 -2
- data/lib/fb_graph/venue.rb +17 -0
- data/lib/fb_graph.rb +8 -1
- data/spec/fake_json/users/albums/matake_private.json +34 -0
- data/spec/fake_json/users/albums/matake_public.json +6 -0
- data/spec/fake_json/users/events/matake_private.json +71 -0
- data/spec/fake_json/users/events/matake_public.json +6 -0
- data/spec/fake_json/users/groups/matake_private.json +48 -0
- data/spec/fake_json/users/groups/matake_public.json +6 -0
- data/spec/fake_json/users/home/me_private.json +208 -131
- data/spec/fake_json/users/home/me_private_next.json +382 -0
- data/spec/fake_json/users/home/me_private_previous.json +36 -0
- data/spec/fb_graph/album_spec.rb +41 -0
- data/spec/fb_graph/collection_spec.rb +37 -0
- data/spec/fb_graph/connections/activities_spec.rb +4 -4
- data/spec/fb_graph/connections/albums_spec.rb +35 -0
- data/spec/fb_graph/connections/events_spec.rb +31 -0
- data/spec/fb_graph/connections/feed_spec.rb +2 -2
- data/spec/fb_graph/connections/friends_spec.rb +7 -7
- data/spec/fb_graph/connections/groups_spec.rb +28 -0
- data/spec/fb_graph/connections/home_spec.rb +13 -13
- data/spec/fb_graph/connections/likes_spec.rb +3 -3
- data/spec/fb_graph/connections/posts_spec.rb +2 -2
- data/spec/fb_graph/connections/statuses_spec.rb +6 -6
- data/spec/fb_graph/connections/tagged_spec.rb +2 -2
- data/spec/fb_graph/event_spec.rb +50 -0
- data/spec/fb_graph/group_spec.rb +46 -0
- data/spec/fb_graph/link_spec.rb +33 -0
- data/spec/fb_graph/node_spec.rb +3 -3
- data/spec/fb_graph/note_spec.rb +35 -0
- data/spec/fb_graph/page_spec.rb +3 -3
- data/spec/fb_graph/photo_spec.rb +58 -0
- data/spec/fb_graph/post_spec.rb +6 -0
- data/spec/fb_graph/status_spec.rb +31 -0
- data/spec/fb_graph/user_spec.rb +6 -6
- data/spec/fb_graph/video_spec.rb +37 -0
- metadata +41 -6
- data/lib/fb_graph/connections/collection.rb +0 -31
- data/spec/fb_graph/connections/collection_spec.rb +0 -15
@@ -0,0 +1,382 @@
|
|
1
|
+
{
|
2
|
+
"data": [
|
3
|
+
{
|
4
|
+
"id": "777639200_118115764872899",
|
5
|
+
"from": {
|
6
|
+
"name": "Masahiro Kiura",
|
7
|
+
"id": "777639200"
|
8
|
+
},
|
9
|
+
"message": "\u307b\u3093\u3068\u3069\u3046\u3067\u3082\u3044\u3044\u306a\u3002",
|
10
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
11
|
+
"attribution": "Twitter",
|
12
|
+
"privacy": {
|
13
|
+
"value": "EVERYONE"
|
14
|
+
},
|
15
|
+
"created_time": "2010-04-27T11:06:29+0000",
|
16
|
+
"updated_time": "2010-04-27T11:06:29+0000"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"id": "777639200_121792391167959",
|
20
|
+
"from": {
|
21
|
+
"name": "Masahiro Kiura",
|
22
|
+
"id": "777639200"
|
23
|
+
},
|
24
|
+
"message": "\u67d4\u8edf\u5264\u3042\u304b\u3061\u3083\u3093\u306e\u306b\u3082\u3044\u3044\u306e\uff1f",
|
25
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
26
|
+
"attribution": "Twitter",
|
27
|
+
"privacy": {
|
28
|
+
"value": "EVERYONE"
|
29
|
+
},
|
30
|
+
"created_time": "2010-04-27T11:06:23+0000",
|
31
|
+
"updated_time": "2010-04-27T11:06:23+0000"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"id": "777639200_116916928335988",
|
35
|
+
"from": {
|
36
|
+
"name": "Masahiro Kiura",
|
37
|
+
"id": "777639200"
|
38
|
+
},
|
39
|
+
"message": "\u3061\u3087\u3063\u3068\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u4f7f\u3044\u5fc3\u5730\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u3001\u7121\u99c4\u306b\u3064\u3076\u3084\u304d\u307e\u3059\u3002",
|
40
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
41
|
+
"attribution": "Twitter",
|
42
|
+
"privacy": {
|
43
|
+
"value": "EVERYONE"
|
44
|
+
},
|
45
|
+
"created_time": "2010-04-27T11:06:05+0000",
|
46
|
+
"updated_time": "2010-04-27T11:06:05+0000"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"id": "777639200_101923626519257",
|
50
|
+
"from": {
|
51
|
+
"name": "Masahiro Kiura",
|
52
|
+
"id": "777639200"
|
53
|
+
},
|
54
|
+
"message": "\u3044\u3044\u756a\u7d44\u3001\u5168\u7136\u3084\u3063\u3066\u306a\u3044\u306a\u4eca\u65e5",
|
55
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
56
|
+
"attribution": "Twitter",
|
57
|
+
"privacy": {
|
58
|
+
"value": "EVERYONE"
|
59
|
+
},
|
60
|
+
"created_time": "2010-04-27T11:05:37+0000",
|
61
|
+
"updated_time": "2010-04-27T11:05:37+0000"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"id": "777639200_116670965019598",
|
65
|
+
"from": {
|
66
|
+
"name": "Masahiro Kiura",
|
67
|
+
"id": "777639200"
|
68
|
+
},
|
69
|
+
"message": "\u3044\u3044\u3088\u3046\u306a\u6c17\u3082\u3059\u308b\u3093\u3060\u3051\u3069\u306a\u3041\u3002",
|
70
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
71
|
+
"attribution": "Twitter",
|
72
|
+
"privacy": {
|
73
|
+
"value": "EVERYONE"
|
74
|
+
},
|
75
|
+
"created_time": "2010-04-27T11:03:12+0000",
|
76
|
+
"updated_time": "2010-04-27T11:03:12+0000"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"id": "777639200_105825516127925",
|
80
|
+
"from": {
|
81
|
+
"name": "Masahiro Kiura",
|
82
|
+
"id": "777639200"
|
83
|
+
},
|
84
|
+
"message": "\u6253\u3061\u3084\u3059\u3044\u3053\u3068\u306f\u6253\u3061\u3084\u3059\u3044\u3002",
|
85
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
86
|
+
"attribution": "Twitter",
|
87
|
+
"privacy": {
|
88
|
+
"value": "EVERYONE"
|
89
|
+
},
|
90
|
+
"created_time": "2010-04-27T11:03:10+0000",
|
91
|
+
"updated_time": "2010-04-27T11:03:10+0000"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"id": "777639200_121356571209375",
|
95
|
+
"from": {
|
96
|
+
"name": "Masahiro Kiura",
|
97
|
+
"id": "777639200"
|
98
|
+
},
|
99
|
+
"message": "\u3053\u308c\u3063\u3066\u3069\u3046\u306a\u3093\u3060\u308d\u3046\u306a\u3041\u3002",
|
100
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
101
|
+
"attribution": "Twitter",
|
102
|
+
"privacy": {
|
103
|
+
"value": "EVERYONE"
|
104
|
+
},
|
105
|
+
"created_time": "2010-04-27T11:03:02+0000",
|
106
|
+
"updated_time": "2010-04-27T11:03:02+0000"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"id": "777639200_118551491504314",
|
110
|
+
"from": {
|
111
|
+
"name": "Masahiro Kiura",
|
112
|
+
"id": "777639200"
|
113
|
+
},
|
114
|
+
"message": "\u3061\u3087\u3063\u3068\u4e45\u3057\u3076\u308a\u306b\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u9055\u3046\u306e\u306b\u5909\u3048\u3066\u307f\u305f\u3067\u3059\u3088\u3002HHK\u4f7f\u3044\u6613\u304b\u3063\u305f\u3093\u3060\u3051\u3069\u306d\u3047\u3002",
|
115
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
116
|
+
"attribution": "Twitter",
|
117
|
+
"privacy": {
|
118
|
+
"value": "EVERYONE"
|
119
|
+
},
|
120
|
+
"created_time": "2010-04-27T11:02:56+0000",
|
121
|
+
"updated_time": "2010-04-27T11:02:56+0000"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"id": "777639200_114676648563836",
|
125
|
+
"from": {
|
126
|
+
"name": "Masahiro Kiura",
|
127
|
+
"id": "777639200"
|
128
|
+
},
|
129
|
+
"message": "\u304a\uff4b",
|
130
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
131
|
+
"attribution": "Twitter",
|
132
|
+
"privacy": {
|
133
|
+
"value": "EVERYONE"
|
134
|
+
},
|
135
|
+
"created_time": "2010-04-27T11:02:38+0000",
|
136
|
+
"updated_time": "2010-04-27T11:02:38+0000"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"id": "777639200_121491227866338",
|
140
|
+
"from": {
|
141
|
+
"name": "Masahiro Kiura",
|
142
|
+
"id": "777639200"
|
143
|
+
},
|
144
|
+
"message": "\u307b\u3052\u307b\u3052",
|
145
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
146
|
+
"attribution": "Twitter",
|
147
|
+
"privacy": {
|
148
|
+
"value": "EVERYONE"
|
149
|
+
},
|
150
|
+
"created_time": "2010-04-27T11:02:37+0000",
|
151
|
+
"updated_time": "2010-04-27T11:02:37+0000"
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"id": "777639200_114161865283186",
|
155
|
+
"from": {
|
156
|
+
"name": "Masahiro Kiura",
|
157
|
+
"id": "777639200"
|
158
|
+
},
|
159
|
+
"message": "\u3054\u306f\u3093\u3060\u3093\u3002",
|
160
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
161
|
+
"attribution": "Twitter",
|
162
|
+
"privacy": {
|
163
|
+
"value": "EVERYONE"
|
164
|
+
},
|
165
|
+
"created_time": "2010-04-27T11:00:25+0000",
|
166
|
+
"updated_time": "2010-04-27T11:00:25+0000"
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"id": "633309292_116476715048088",
|
170
|
+
"from": {
|
171
|
+
"name": "Eiji Kitamura",
|
172
|
+
"id": "633309292"
|
173
|
+
},
|
174
|
+
"message": "\u6700\u8fd1\u3088\u304fMac\u304c\u30d5\u30ea\u30fc\u30ba\u3059\u308b\u306e\u3060\u304c\u3001\u3069\u3046\u3084\u3089Google\u65e5\u672c\u8a9e\u5165\u529b\u304c\u66f4\u65b0\u3059\u308b\u5ea6\u306b\u518d\u8d77\u52d5\u3057\u308d\u3068\u8a00\u3063\u3066\u308b\u306e\u304c\u539f\u56e0\u3089\u3057\u3044\u3002\u4ed6\u306b\u305d\u3046\u3044\u3046\u4eba\u3044\u307e\u305b\u3093\u304b\uff1f",
|
175
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
176
|
+
"attribution": "Twitter",
|
177
|
+
"privacy": {
|
178
|
+
"value": "EVERYONE"
|
179
|
+
},
|
180
|
+
"created_time": "2010-04-27T10:54:57+0000",
|
181
|
+
"updated_time": "2010-04-27T10:54:57+0000"
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"id": "1474924531_114883358542875",
|
185
|
+
"from": {
|
186
|
+
"name": "Yoshinori Ueno",
|
187
|
+
"id": "1474924531"
|
188
|
+
},
|
189
|
+
"message": "\u30de\u30ea\u30e2\u306b\u30ab\u30a8\u30eb \u53ef\u611b\u3044\u3002\u3002 http://www.hokkaido-np.co.jp/news/environment/228286.html",
|
190
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
191
|
+
"attribution": "Twitter",
|
192
|
+
"privacy": {
|
193
|
+
"value": "EVERYONE"
|
194
|
+
},
|
195
|
+
"created_time": "2010-04-27T10:53:57+0000",
|
196
|
+
"updated_time": "2010-04-27T10:53:57+0000"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"id": "777639200_116641488357224",
|
200
|
+
"from": {
|
201
|
+
"name": "Masahiro Kiura",
|
202
|
+
"id": "777639200"
|
203
|
+
},
|
204
|
+
"message": "\u5e30\u5b85\u76f4\u5f8c\u306b\u5b85\u6025\u4fbf\u304c\u304d\u3066\u3001\u9ed2\u732b\u3068\u4f50\u5ddd\u304c\u3046\u3061\u306e\u7384\u95a2\u306b\u5217\u3092\u4f5c\u3063\u305f\u3002",
|
205
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
206
|
+
"attribution": "Twitter",
|
207
|
+
"privacy": {
|
208
|
+
"value": "EVERYONE"
|
209
|
+
},
|
210
|
+
"created_time": "2010-04-27T10:41:23+0000",
|
211
|
+
"updated_time": "2010-04-27T10:41:23+0000"
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"id": "653755498_122141547799908",
|
215
|
+
"from": {
|
216
|
+
"name": "Tetsuhiro Yoshida",
|
217
|
+
"id": "653755498"
|
218
|
+
},
|
219
|
+
"message": "\u307b\u3093\u3067Yahoo\u30e2\u30d0\u30b2\u30fc\u306bSoftBank\u304c\u63d0\u643a\u767a\u8868\u3057\u305fZynga\u30a2\u30d7\u30ea\u304c\u51fa\u308b\u3068",
|
220
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
221
|
+
"attribution": "Twitter",
|
222
|
+
"privacy": {
|
223
|
+
"value": "EVERYONE"
|
224
|
+
},
|
225
|
+
"created_time": "2010-04-27T10:40:30+0000",
|
226
|
+
"updated_time": "2010-04-27T10:40:30+0000"
|
227
|
+
},
|
228
|
+
{
|
229
|
+
"id": "788861822_121184657898324",
|
230
|
+
"from": {
|
231
|
+
"name": "Kim Ahlstr\u00f6m",
|
232
|
+
"id": "788861822"
|
233
|
+
},
|
234
|
+
"message": "Wow, Spotify just killed the music parts of iTunes. http://bit.ly/9BM7d7 #kickass",
|
235
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
236
|
+
"attribution": "Twitter",
|
237
|
+
"privacy": {
|
238
|
+
"value": "EVERYONE"
|
239
|
+
},
|
240
|
+
"created_time": "2010-04-27T10:29:45+0000",
|
241
|
+
"updated_time": "2010-04-27T10:29:45+0000",
|
242
|
+
"likes": 1
|
243
|
+
},
|
244
|
+
{
|
245
|
+
"id": "606229899_120881954591362",
|
246
|
+
"from": {
|
247
|
+
"name": "Tomoya Hayakawa",
|
248
|
+
"id": "606229899"
|
249
|
+
},
|
250
|
+
"message": "RT @mikeexpo: \u30a2\u30c9\u30d0\u30f3\u30c6\u30c3\u30b8\u3001\u30c0\u30a4\u30a8\u30fc\u682a\u3092\u5168\u682a\u58f2\u5374\u3000\u30c9\u30a4\u30c4\u8a3c\u5238\u306b \u65e5\u672c\u7d4c\u6e08\u65b0\u805e http://bit.ly/9SG1fE",
|
251
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
252
|
+
"attribution": "Twitter",
|
253
|
+
"privacy": {
|
254
|
+
"value": "EVERYONE"
|
255
|
+
},
|
256
|
+
"created_time": "2010-04-27T10:18:29+0000",
|
257
|
+
"updated_time": "2010-04-27T10:18:29+0000"
|
258
|
+
},
|
259
|
+
{
|
260
|
+
"id": "613044973_121899901155100",
|
261
|
+
"from": {
|
262
|
+
"name": "Sachie Takahashi",
|
263
|
+
"id": "613044973"
|
264
|
+
},
|
265
|
+
"message": "Join me at \"J-Seed Ventures networking event\" on May 19th. RSVP at http://twvt.us/JSeedVenturesEvent #JSeedVentures #twvt",
|
266
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
267
|
+
"attribution": "Twitter",
|
268
|
+
"privacy": {
|
269
|
+
"value": "EVERYONE"
|
270
|
+
},
|
271
|
+
"created_time": "2010-04-27T10:13:45+0000",
|
272
|
+
"updated_time": "2010-04-27T10:13:45+0000"
|
273
|
+
},
|
274
|
+
{
|
275
|
+
"id": "777639200_117184428305318",
|
276
|
+
"from": {
|
277
|
+
"name": "Masahiro Kiura",
|
278
|
+
"id": "777639200"
|
279
|
+
},
|
280
|
+
"message": "\u4eca\u65e5\u4ed5\u4e8b\u4e2d\u306b\u52e7\u8a98\u7684\u306a\u96fb\u8a71\u304c\u304b\u304b\u3063\u3066\u304d\u3066\u3001\u300c\u305d\u3046\u306a\u3093\u3067\u3059\u304b\u30fc\u300d\u3063\u3066\u76f8\u3065\u3061\u309210\u56de\u304f\u3089\u3044\u3057\u3066\u304b\u3089\u3001\u300c\u3044\u3048\u3001\u3044\u308a\u307e\u305b\u3093\u3002\u300d\u3063\u3066\u3044\u3046\u3060\u3051\u306e\u7c21\u5358\u306a\u53d7\u3051\u7b54\u3048\u3092\u3057\u306a\u304c\u3089\u4ed5\u4e8b\u3057\u3066\u305f\u3002",
|
281
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
282
|
+
"attribution": "Twitter",
|
283
|
+
"privacy": {
|
284
|
+
"value": "EVERYONE"
|
285
|
+
},
|
286
|
+
"created_time": "2010-04-27T10:03:38+0000",
|
287
|
+
"updated_time": "2010-04-27T10:03:38+0000"
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"id": "777639200_112429208792512",
|
291
|
+
"from": {
|
292
|
+
"name": "Masahiro Kiura",
|
293
|
+
"id": "777639200"
|
294
|
+
},
|
295
|
+
"message": "\u9000\u793e\u306a\u3046\u3002",
|
296
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
297
|
+
"attribution": "Twitter",
|
298
|
+
"privacy": {
|
299
|
+
"value": "EVERYONE"
|
300
|
+
},
|
301
|
+
"created_time": "2010-04-27T10:00:31+0000",
|
302
|
+
"updated_time": "2010-04-27T10:00:31+0000"
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"id": "653755498_115783435111015",
|
306
|
+
"from": {
|
307
|
+
"name": "Tetsuhiro Yoshida",
|
308
|
+
"id": "653755498"
|
309
|
+
},
|
310
|
+
"message": "\u30d0\u30fc\u30c1\u30e3\u30eb\u30b0\u30e9\u30d5\u306ePC\u7248\u30bd\u30fc\u30b7\u30e3\u30eb\u30b2\u30fc\u30e0\u3063\u3066\u3069\u3093\u306a\u3075\u3046\u306b\u306a\u308b\u306e\u304b\u697d\u3057\u307f (#yahoojapan live at http://ustre.am/gCSi )",
|
311
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
312
|
+
"attribution": "Twitter",
|
313
|
+
"privacy": {
|
314
|
+
"value": "EVERYONE"
|
315
|
+
},
|
316
|
+
"created_time": "2010-04-27T09:57:38+0000",
|
317
|
+
"updated_time": "2010-04-27T09:57:38+0000"
|
318
|
+
},
|
319
|
+
{
|
320
|
+
"id": "579612276_112370818802159",
|
321
|
+
"from": {
|
322
|
+
"name": "Nov Matake",
|
323
|
+
"id": "579612276"
|
324
|
+
},
|
325
|
+
"message": "Nov Matake test",
|
326
|
+
"privacy": {
|
327
|
+
"value": "EVERYONE"
|
328
|
+
},
|
329
|
+
"created_time": "2010-04-27T09:57:10+0000",
|
330
|
+
"updated_time": "2010-04-27T09:57:10+0000"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"id": "808548986_116290555067577",
|
334
|
+
"from": {
|
335
|
+
"name": "Motoi Sato",
|
336
|
+
"id": "808548986"
|
337
|
+
},
|
338
|
+
"message": "\u30bd\u30d5\u30c8\u30d0\u30f3\u30af\u304c\u52d5\u3044\u3066\u3044\u307e\u3059\uff1a\u3010\u5642\u3011Facebook\u6700\u5927\u306e\u30bd\u30fc\u30b7\u30e3\u30eb\u30a2\u30d7\u30ea\u4f01\u696d\u300cZynga\u300d\u304c\u30bd\u30d5\u30c8\u30d0\u30f3\u30af\u3068\u63d0\u643a\u3092\u691c\u8a0e http://bit.ly/biWhAc",
|
339
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
340
|
+
"attribution": "Twitter",
|
341
|
+
"privacy": {
|
342
|
+
"value": "EVERYONE"
|
343
|
+
},
|
344
|
+
"created_time": "2010-04-27T09:50:26+0000",
|
345
|
+
"updated_time": "2010-04-27T09:50:26+0000"
|
346
|
+
},
|
347
|
+
{
|
348
|
+
"id": "808548986_112269285479932",
|
349
|
+
"from": {
|
350
|
+
"name": "Motoi Sato",
|
351
|
+
"id": "808548986"
|
352
|
+
},
|
353
|
+
"message": "\u56fd\u5185\u3067Twitter\u304cmixi\u3092\u8ffd\u3044\u629c\u304f\u65e5\u304c\u8fd1\u3044\u304b\u3082\u3057\u308c\u306a\u3044 http://bit.ly/dvEMOz",
|
354
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
355
|
+
"attribution": "Twitter",
|
356
|
+
"privacy": {
|
357
|
+
"value": "EVERYONE"
|
358
|
+
},
|
359
|
+
"created_time": "2010-04-27T09:44:37+0000",
|
360
|
+
"updated_time": "2010-04-27T09:44:37+0000"
|
361
|
+
},
|
362
|
+
{
|
363
|
+
"id": "653755498_114953171869071",
|
364
|
+
"from": {
|
365
|
+
"name": "Tetsuhiro Yoshida",
|
366
|
+
"id": "653755498"
|
367
|
+
},
|
368
|
+
"message": "mixi\u306f\u30bd\u30fc\u30b7\u30e3\u30eb\u30b0\u30e9\u30d5\u91cd\u8996\u3060\u304c\u3001\u30e4\u30d5\u30fc\u30e2\u30d0\u30b2\u30fc\u306f\u30b2\u30fc\u30e0\u306b\u7279\u5316\u3057\u3066\u3044\u308b\u306e\u304c\u5f37\u307f\u3002 (#yahoojapan live at http://ustre.am/gCSi )",
|
369
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
370
|
+
"attribution": "Twitter",
|
371
|
+
"privacy": {
|
372
|
+
"value": "EVERYONE"
|
373
|
+
},
|
374
|
+
"created_time": "2010-04-27T09:44:28+0000",
|
375
|
+
"updated_time": "2010-04-27T09:44:28+0000"
|
376
|
+
}
|
377
|
+
],
|
378
|
+
"paging": {
|
379
|
+
"previous": "https://graph.facebook.com/579612276/home?token=2227470867%7C2.WUnvvW0Q_ksjjVOCIEkEiQ__.3600.1272380400-579612276%7CSkfo-M8-vpId32OYv6xLZFlsToY.&limit=25&since=2010-04-27T11%3A06%3A29%2B0000",
|
380
|
+
"next": "https://graph.facebook.com/579612276/home?token=2227470867%7C2.WUnvvW0Q_ksjjVOCIEkEiQ__.3600.1272380400-579612276%7CSkfo-M8-vpId32OYv6xLZFlsToY.&limit=25&until=2010-04-27T09%3A44%3A28%2B0000"
|
381
|
+
}
|
382
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"data": [
|
3
|
+
{
|
4
|
+
"id": "777639200_116576368363574",
|
5
|
+
"from": {
|
6
|
+
"name": "Masahiro Kiura",
|
7
|
+
"id": "777639200"
|
8
|
+
},
|
9
|
+
"message": "\u3046\u30fc\u3093\u3001NHK\u306e\u30c9\u30e9\u30de\u5fae\u5999",
|
10
|
+
"icon": "http://photos-h.ak.fbcdn.net/photos-ak-sf2p/v43/23/2231777543/app_2_2231777543_2528.gif",
|
11
|
+
"attribution": "Twitter",
|
12
|
+
"privacy": {
|
13
|
+
"value": "EVERYONE"
|
14
|
+
},
|
15
|
+
"created_time": "2010-04-27T13:23:08+0000",
|
16
|
+
"updated_time": "2010-04-27T13:23:08+0000"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"id": "579612276_112198302151897",
|
20
|
+
"from": {
|
21
|
+
"name": "Nov Matake",
|
22
|
+
"id": "579612276"
|
23
|
+
},
|
24
|
+
"message": "test test test",
|
25
|
+
"privacy": {
|
26
|
+
"value": "EVERYONE"
|
27
|
+
},
|
28
|
+
"created_time": "2010-04-27T13:10:56+0000",
|
29
|
+
"updated_time": "2010-04-27T13:10:56+0000"
|
30
|
+
}
|
31
|
+
],
|
32
|
+
"paging": {
|
33
|
+
"previous": "https://graph.facebook.com/579612276/home?token=2227470867%7C2.WUnvvW0Q_ksjjVOCIEkEiQ__.3600.1272380400-579612276%7CSkfo-M8-vpId32OYv6xLZFlsToY.&limit=25&since=2010-04-27T13%3A23%3A08%2B0000",
|
34
|
+
"next": "https://graph.facebook.com/579612276/home?token=2227470867%7C2.WUnvvW0Q_ksjjVOCIEkEiQ__.3600.1272380400-579612276%7CSkfo-M8-vpId32OYv6xLZFlsToY.&limit=25&until=2010-04-27T13%3A10%3A56%2B0000"
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../spec_helper')
|
2
|
+
|
3
|
+
describe FbGraph::Album, '#new' do
|
4
|
+
|
5
|
+
it 'should setup all supported attributes' do
|
6
|
+
attributes = {
|
7
|
+
:id => '12345',
|
8
|
+
:from => {
|
9
|
+
:id => '23456',
|
10
|
+
:name => 'nov matake'
|
11
|
+
},
|
12
|
+
:name => 'album 1',
|
13
|
+
:description => 'an album for fb_graph test',
|
14
|
+
:location => 'Tokyo, Japan',
|
15
|
+
:link => 'http://www.facebook.com/album/12345',
|
16
|
+
:count => 10,
|
17
|
+
:created_time => '2009-12-29T15:24:50+0000',
|
18
|
+
:updated_time => '2010-01-02T15:37:41+0000'
|
19
|
+
}
|
20
|
+
album = FbGraph::Album.new(attributes.delete(:id), attributes)
|
21
|
+
album.identifier.should == '12345'
|
22
|
+
album.from.should == FbGraph::User.new('23456', :name => 'nov matake')
|
23
|
+
album.name.should == 'album 1'
|
24
|
+
album.description.should == 'an album for fb_graph test'
|
25
|
+
album.location.should == 'Tokyo, Japan'
|
26
|
+
album.link.should == 'http://www.facebook.com/album/12345'
|
27
|
+
album.count.should == 10
|
28
|
+
album.created_time.should == '2009-12-29T15:24:50+0000'
|
29
|
+
album.updated_time.should == '2010-01-02T15:37:41+0000'
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'should support page as from' do
|
33
|
+
page_album = FbGraph::Album.new('12345', :from => {
|
34
|
+
:id => '23456',
|
35
|
+
:name => 'Smart.fm',
|
36
|
+
:category => 'Web Site'
|
37
|
+
})
|
38
|
+
page_album.from.should == FbGraph::Page.new('23456', :name => 'Smart.fm', :category => 'Web Site')
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../spec_helper')
|
2
|
+
|
3
|
+
describe FbGraph::Collection, '#new' do
|
4
|
+
before(:all) do
|
5
|
+
fake_json(:get, 'platform/statuses?token=token', 'pages/statuses/platform_private')
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should return an array with pagination info' do
|
9
|
+
statuses = FbGraph::Page.new('platform', :token => 'token').statuses
|
10
|
+
statuses.should be_kind_of(Array)
|
11
|
+
statuses.previous.should be_kind_of(Hash)
|
12
|
+
statuses.next.should be_kind_of(Hash)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe FbGraph::Collection do
|
17
|
+
before(:all) do
|
18
|
+
fake_json(:get, 'me/home?token=token', 'users/home/me_private')
|
19
|
+
fake_json(:get, 'me/home?limit=25&since=2010-04-27T13%3A06%3A14%2B0000&token=token', 'users/home/me_private_previous')
|
20
|
+
fake_json(:get, 'me/home?limit=25&token=token&until=2010-04-27T11%3A07%3A48%2B0000', 'users/home/me_private_next')
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should ' do
|
24
|
+
me = FbGraph::User.new('me', :token => 'token')
|
25
|
+
posts = me.home
|
26
|
+
puts posts.previous.inspect, posts.next.inspect
|
27
|
+
previous_posts = me.home(posts.previous)
|
28
|
+
next_posts = me.home(posts.next)
|
29
|
+
posts.first.created_time.should == '2010-04-27T13:06:14+0000'
|
30
|
+
posts.last.created_time.should == '2010-04-27T11:07:48+0000'
|
31
|
+
previous_posts.first.created_time.should == '2010-04-27T13:23:08+0000'
|
32
|
+
previous_posts.last.created_time.should == '2010-04-27T13:10:56+0000'
|
33
|
+
next_posts.first.created_time.should == '2010-04-27T11:06:29+0000'
|
34
|
+
next_posts.last.created_time.should == '2010-04-27T09:44:28+0000'
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -4,17 +4,17 @@ describe FbGraph::Connections::Activities, '#activities' do
|
|
4
4
|
describe 'when included by FbGraph::User' do
|
5
5
|
before(:all) do
|
6
6
|
fake_json(:get, 'arjun/activities', 'users/activities/arjun_public')
|
7
|
-
fake_json(:get, 'arjun/activities?
|
7
|
+
fake_json(:get, 'arjun/activities?token=token', 'users/activities/arjun_private')
|
8
8
|
end
|
9
9
|
|
10
|
-
it 'should raise FbGraph::Unauthorized when no
|
10
|
+
it 'should raise FbGraph::Unauthorized when no token given' do
|
11
11
|
lambda do
|
12
12
|
FbGraph::User.new('arjun').activities
|
13
13
|
end.should raise_exception(FbGraph::Unauthorized)
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'should return liked pages' do
|
17
|
-
activities = FbGraph::User.new('arjun', :
|
17
|
+
activities = FbGraph::User.new('arjun', :token => 'token').activities
|
18
18
|
activities.first.should == FbGraph::Page.new(
|
19
19
|
'378209722137',
|
20
20
|
:name => 'Doing Things at the Last Minute',
|
@@ -25,4 +25,4 @@ describe FbGraph::Connections::Activities, '#activities' do
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
-
end
|
28
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../../spec_helper')
|
2
|
+
|
3
|
+
describe FbGraph::Connections::Albums, '#albums' do
|
4
|
+
describe 'when included by FbGraph::User' do
|
5
|
+
before(:all) do
|
6
|
+
fake_json(:get, 'matake/albums', 'users/albums/matake_public')
|
7
|
+
fake_json(:get, 'matake/albums?token=token', 'users/albums/matake_private')
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should raise FbGraph::Unauthorized when no token given' do
|
11
|
+
lambda do
|
12
|
+
FbGraph::User.new('matake').albums
|
13
|
+
end.should raise_exception(FbGraph::Unauthorized)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should return liked pages' do
|
17
|
+
albums = FbGraph::User.new('matake', :token => 'token').albums
|
18
|
+
albums.first.should == FbGraph::Album.new(
|
19
|
+
'19351532276',
|
20
|
+
:from => {
|
21
|
+
:id => '579612276',
|
22
|
+
:name => 'Nov Matake'
|
23
|
+
},
|
24
|
+
:name => 'モバイルアップロード',
|
25
|
+
:link => 'http://www.facebook.com/album.php?aid=25463&id=579612276',
|
26
|
+
:count => 3,
|
27
|
+
:created_time => '2008-07-27T11:38:15+0000',
|
28
|
+
:updated_time => '2009-02-07T16:09:53+0000'
|
29
|
+
)
|
30
|
+
albums.each do |album|
|
31
|
+
album.should be_instance_of(FbGraph::Album)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), '../../spec_helper')
|
2
|
+
|
3
|
+
describe FbGraph::Connections::Events, '#events' do
|
4
|
+
describe 'when included by FbGraph::User' do
|
5
|
+
before(:all) do
|
6
|
+
fake_json(:get, 'matake/events', 'users/events/matake_public')
|
7
|
+
fake_json(:get, 'matake/events?token=token', 'users/events/matake_private')
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should raise FbGraph::Unauthorized when no token given' do
|
11
|
+
lambda do
|
12
|
+
FbGraph::User.new('matake').events
|
13
|
+
end.should raise_exception(FbGraph::Unauthorized)
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should return public own posts even when token is not given' do
|
17
|
+
events = FbGraph::User.new('matake', :token => 'token').events
|
18
|
+
events.first.should == FbGraph::Event.new(
|
19
|
+
'116600818359630',
|
20
|
+
:name => 'The Loyal We @ Rainy Day Bookstore and Cafe',
|
21
|
+
:start_time => '2010-04-29T01:30:00+0000',
|
22
|
+
:end_time => '2010-04-29T04:30:00+0000',
|
23
|
+
:location => 'Nishi Azabu'
|
24
|
+
)
|
25
|
+
events.each do |event|
|
26
|
+
event.should be_instance_of(FbGraph::Event)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -4,10 +4,10 @@ describe FbGraph::Connections::Feed, '#feed' do
|
|
4
4
|
describe 'when included by FbGraph::User' do
|
5
5
|
before(:all) do
|
6
6
|
fake_json(:get, 'arjun/feed', 'users/feed/arjun_public')
|
7
|
-
fake_json(:get, 'arjun/feed?
|
7
|
+
fake_json(:get, 'arjun/feed?token=token', 'users/feed/arjun_private')
|
8
8
|
end
|
9
9
|
|
10
|
-
it 'should return public wall posts even when
|
10
|
+
it 'should return public wall posts even when token is not given' do
|
11
11
|
posts = FbGraph::User.new('arjun').feed
|
12
12
|
posts.first.should == FbGraph::Post.new(
|
13
13
|
'7901103_121392141207495',
|
@@ -4,12 +4,12 @@ describe FbGraph::Connections::Friends, '#friends' do
|
|
4
4
|
describe 'when included by FbGraph::User' do
|
5
5
|
before(:all) do
|
6
6
|
fake_json(:get, 'me/friends', 'users/friends/me_public')
|
7
|
-
fake_json(:get, 'me/friends?
|
7
|
+
fake_json(:get, 'me/friends?token=token', 'users/friends/me_private')
|
8
8
|
fake_json(:get, 'arjun/friends', 'users/friends/arjun_public')
|
9
|
-
fake_json(:get, 'arjun/friends?
|
9
|
+
fake_json(:get, 'arjun/friends?token=token', 'users/friends/arjun_private')
|
10
10
|
end
|
11
11
|
|
12
|
-
it 'should raise FbGraph::Exception when no
|
12
|
+
it 'should raise FbGraph::Exception when no token given' do
|
13
13
|
lambda do
|
14
14
|
FbGraph::User.new('arjun').friends
|
15
15
|
end.should raise_exception(FbGraph::Exception)
|
@@ -17,18 +17,18 @@ describe FbGraph::Connections::Friends, '#friends' do
|
|
17
17
|
|
18
18
|
it 'should raise FbGraph::Exception when identifier is not me' do
|
19
19
|
lambda do
|
20
|
-
FbGraph::User.new('arjun', :
|
20
|
+
FbGraph::User.new('arjun', :token => 'token').friends
|
21
21
|
end.should raise_exception(FbGraph::Exception)
|
22
22
|
end
|
23
23
|
|
24
|
-
it 'should raise FbGraph::NotFound when identifier is me and no
|
24
|
+
it 'should raise FbGraph::NotFound when identifier is me and no token is given' do
|
25
25
|
lambda do
|
26
26
|
FbGraph::User.new('me').friends
|
27
27
|
end.should raise_exception(FbGraph::NotFound)
|
28
28
|
end
|
29
29
|
|
30
|
-
it 'should return posts when identifier is me and
|
31
|
-
users = FbGraph::User.new('me', :
|
30
|
+
it 'should return posts when identifier is me and token is given' do
|
31
|
+
users = FbGraph::User.new('me', :token => 'token').friends
|
32
32
|
users.first.should == FbGraph::User.new(
|
33
33
|
'6401',
|
34
34
|
:name => 'Kirk McMurray'
|