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.
Files changed (79) hide show
  1. data/README.rdoc +26 -2
  2. data/VERSION +1 -1
  3. data/fb_graph.gemspec +41 -6
  4. data/lib/fb_graph/album.rb +1 -1
  5. data/lib/fb_graph/collection.rb +32 -0
  6. data/lib/fb_graph/comparison.rb +9 -0
  7. data/lib/fb_graph/connections/activities.rb +1 -1
  8. data/lib/fb_graph/connections/albums.rb +1 -1
  9. data/lib/fb_graph/connections/attending.rb +1 -1
  10. data/lib/fb_graph/connections/books.rb +1 -1
  11. data/lib/fb_graph/connections/comments.rb +1 -1
  12. data/lib/fb_graph/connections/declined.rb +1 -1
  13. data/lib/fb_graph/connections/events.rb +1 -1
  14. data/lib/fb_graph/connections/feed.rb +1 -1
  15. data/lib/fb_graph/connections/friends.rb +1 -1
  16. data/lib/fb_graph/connections/groups.rb +1 -1
  17. data/lib/fb_graph/connections/home.rb +1 -1
  18. data/lib/fb_graph/connections/interests.rb +1 -1
  19. data/lib/fb_graph/connections/invited.rb +1 -1
  20. data/lib/fb_graph/connections/likes.rb +1 -1
  21. data/lib/fb_graph/connections/links.rb +1 -1
  22. data/lib/fb_graph/connections/maybe.rb +1 -1
  23. data/lib/fb_graph/connections/members.rb +1 -1
  24. data/lib/fb_graph/connections/movies.rb +1 -1
  25. data/lib/fb_graph/connections/music.rb +1 -1
  26. data/lib/fb_graph/connections/noreply.rb +1 -1
  27. data/lib/fb_graph/connections/notes.rb +1 -1
  28. data/lib/fb_graph/connections/photos.rb +1 -1
  29. data/lib/fb_graph/connections/posts.rb +1 -1
  30. data/lib/fb_graph/connections/statuses.rb +1 -1
  31. data/lib/fb_graph/connections/tagged.rb +1 -1
  32. data/lib/fb_graph/connections/television.rb +1 -1
  33. data/lib/fb_graph/connections/videos.rb +1 -1
  34. data/lib/fb_graph/event.rb +3 -1
  35. data/lib/fb_graph/group.rb +4 -3
  36. data/lib/fb_graph/link.rb +1 -1
  37. data/lib/fb_graph/node.rb +6 -10
  38. data/lib/fb_graph/photo.rb +2 -12
  39. data/lib/fb_graph/post.rb +1 -1
  40. data/lib/fb_graph/tag.rb +14 -0
  41. data/lib/fb_graph/user.rb +2 -2
  42. data/lib/fb_graph/venue.rb +17 -0
  43. data/lib/fb_graph.rb +8 -1
  44. data/spec/fake_json/users/albums/matake_private.json +34 -0
  45. data/spec/fake_json/users/albums/matake_public.json +6 -0
  46. data/spec/fake_json/users/events/matake_private.json +71 -0
  47. data/spec/fake_json/users/events/matake_public.json +6 -0
  48. data/spec/fake_json/users/groups/matake_private.json +48 -0
  49. data/spec/fake_json/users/groups/matake_public.json +6 -0
  50. data/spec/fake_json/users/home/me_private.json +208 -131
  51. data/spec/fake_json/users/home/me_private_next.json +382 -0
  52. data/spec/fake_json/users/home/me_private_previous.json +36 -0
  53. data/spec/fb_graph/album_spec.rb +41 -0
  54. data/spec/fb_graph/collection_spec.rb +37 -0
  55. data/spec/fb_graph/connections/activities_spec.rb +4 -4
  56. data/spec/fb_graph/connections/albums_spec.rb +35 -0
  57. data/spec/fb_graph/connections/events_spec.rb +31 -0
  58. data/spec/fb_graph/connections/feed_spec.rb +2 -2
  59. data/spec/fb_graph/connections/friends_spec.rb +7 -7
  60. data/spec/fb_graph/connections/groups_spec.rb +28 -0
  61. data/spec/fb_graph/connections/home_spec.rb +13 -13
  62. data/spec/fb_graph/connections/likes_spec.rb +3 -3
  63. data/spec/fb_graph/connections/posts_spec.rb +2 -2
  64. data/spec/fb_graph/connections/statuses_spec.rb +6 -6
  65. data/spec/fb_graph/connections/tagged_spec.rb +2 -2
  66. data/spec/fb_graph/event_spec.rb +50 -0
  67. data/spec/fb_graph/group_spec.rb +46 -0
  68. data/spec/fb_graph/link_spec.rb +33 -0
  69. data/spec/fb_graph/node_spec.rb +3 -3
  70. data/spec/fb_graph/note_spec.rb +35 -0
  71. data/spec/fb_graph/page_spec.rb +3 -3
  72. data/spec/fb_graph/photo_spec.rb +58 -0
  73. data/spec/fb_graph/post_spec.rb +6 -0
  74. data/spec/fb_graph/status_spec.rb +31 -0
  75. data/spec/fb_graph/user_spec.rb +6 -6
  76. data/spec/fb_graph/video_spec.rb +37 -0
  77. metadata +41 -6
  78. data/lib/fb_graph/connections/collection.rb +0 -31
  79. data/spec/fb_graph/connections/collection_spec.rb +0 -15
@@ -0,0 +1,17 @@
1
+ module FbGraph
2
+ class Venue
3
+ include FbGraph::Comparison
4
+
5
+ attr_accessor :street, :city, :state, :zip, :country, :latitude, :longitude
6
+
7
+ def initialize(attriutes = {})
8
+ @street = attriutes[:street]
9
+ @city = attriutes[:city]
10
+ @state = attriutes[:state]
11
+ @zip = attriutes[:zip]
12
+ @country = attriutes[:country]
13
+ @latitude = attriutes[:latitude]
14
+ @longitude = attriutes[:longitude]
15
+ end
16
+ end
17
+ end
data/lib/fb_graph.rb CHANGED
@@ -21,14 +21,21 @@ module FbGraph
21
21
 
22
22
  end
23
23
 
24
- require 'fb_graph/node'
24
+ require 'fb_graph/comparison'
25
+ require 'fb_graph/collection'
25
26
  require 'fb_graph/connections'
26
27
 
28
+ require 'fb_graph/node'
27
29
  require 'fb_graph/album'
30
+ require 'fb_graph/event'
28
31
  require 'fb_graph/group'
32
+ require 'fb_graph/link'
33
+ require 'fb_graph/note'
29
34
  require 'fb_graph/page'
30
35
  require 'fb_graph/photo'
31
36
  require 'fb_graph/post'
32
37
  require 'fb_graph/status'
38
+ require 'fb_graph/tag'
33
39
  require 'fb_graph/user'
40
+ require 'fb_graph/venue'
34
41
  require 'fb_graph/video'
@@ -0,0 +1,34 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "id": "19351532276",
5
+ "from": {
6
+ "name": "Nov Matake",
7
+ "id": "579612276"
8
+ },
9
+ "name": "\u30e2\u30d0\u30a4\u30eb\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9",
10
+ "link": "http://www.facebook.com/album.php?aid=25463&id=579612276",
11
+ "privacy": "everyone",
12
+ "count": 3,
13
+ "created_time": "2008-07-27T11:38:15+0000",
14
+ "updated_time": "2009-02-07T16:09:53+0000"
15
+ },
16
+ {
17
+ "id": "579612276",
18
+ "from": {
19
+ "name": "Nov Matake",
20
+ "id": "579612276"
21
+ },
22
+ "name": "\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u5199\u771f",
23
+ "link": "http://www.facebook.com/album.php?aid=-3&id=579612276",
24
+ "privacy": "everyone",
25
+ "count": 4,
26
+ "created_time": "2007-11-29T08:29:10+0000",
27
+ "updated_time": "2009-01-23T07:38:21+0000"
28
+ }
29
+ ],
30
+ "paging": {
31
+ "previous": "https://graph.facebook.com/579612276/albums?token=2227470867%7C2.R9XAeEGAiuhhRCcZAgJzTA__.3600.1272362400-579612276%7ChajPs3sLZ2opsOA9TSEGEq-lBrE.&limit=25&since=2008-07-27T11%3A38%3A15%2B0000",
32
+ "next": "https://graph.facebook.com/579612276/albums?token=2227470867%7C2.R9XAeEGAiuhhRCcZAgJzTA__.3600.1272362400-579612276%7ChajPs3sLZ2opsOA9TSEGEq-lBrE.&limit=25&until=2007-11-29T08%3A29%3A10%2B0000"
33
+ }
34
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "error": {
3
+ "type": "OAuthAccessTokenException",
4
+ "message": "An access token is required to request this resource."
5
+ }
6
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "name": "The Loyal We @ Rainy Day Bookstore and Cafe",
5
+ "start_time": "2010-04-29T01:30:00+0000",
6
+ "end_time": "2010-04-29T04:30:00+0000",
7
+ "location": "Nishi Azabu",
8
+ "id": "116600818359630"
9
+ },
10
+ {
11
+ "name": "Smart Day 1 in \u9280\u5ea7",
12
+ "start_time": "2010-04-02T02:00:00+0000",
13
+ "end_time": "2010-04-02T03:00:00+0000",
14
+ "location": "\u9280\u5ea7\u3000\u30a2\u30c3\u30d7\u30eb\u30b9\u30c8\u30a2",
15
+ "id": "365881598945"
16
+ },
17
+ {
18
+ "name": "Tokyo 2.0 #31 - Mobile Web Convergence",
19
+ "start_time": "2010-02-09T03:00:00+0000",
20
+ "end_time": "2010-02-09T06:00:00+0000",
21
+ "location": "Super-Deluxe (www.super-deluxe.com)",
22
+ "id": "238616194462"
23
+ },
24
+ {
25
+ "name": "Hello 33. Sayonara Tokyo.",
26
+ "start_time": "2010-01-24T04:00:00+0000",
27
+ "end_time": "2010-01-24T16:00:00+0000",
28
+ "location": "Opus Aobadai #602 (Castelo Esperanto)",
29
+ "id": "256812599701"
30
+ },
31
+ {
32
+ "name": "Tokyo 2.0 #29 - Web Fair / \u30a6\u30a7\u30d6\u30d5\u30a7\u30a2",
33
+ "start_time": "2009-10-20T02:00:00+0000",
34
+ "end_time": "2009-10-20T05:30:00+0000",
35
+ "location": "Super-Deluxe (www.super-deluxe.com)",
36
+ "id": "158972432609"
37
+ },
38
+ {
39
+ "name": "Housewarming",
40
+ "start_time": "2009-06-13T22:00:00+0000",
41
+ "end_time": "2009-06-14T06:00:00+0000",
42
+ "location": "\u30b9\u30bf\u30fc\u30f4\u30a1\u30ec\u30a4II\uff12\uff10\uff13\u53f7\u5ba4",
43
+ "id": "99852142058"
44
+ },
45
+ {
46
+ "name": "RailsConf 2009",
47
+ "start_time": "2009-05-04T16:00:00+0000",
48
+ "end_time": "2009-05-08T00:00:00+0000",
49
+ "location": "Las Vegas Hilton",
50
+ "id": "35430263075"
51
+ },
52
+ {
53
+ "name": "Tokyo 2.0 #23 (April 13 2009) - The Sustainable Web (\u30a6\u30a8\u30d6\u3068\u30a8\u30b3)",
54
+ "start_time": "2009-04-14T01:30:00+0000",
55
+ "end_time": "2009-04-14T06:00:00+0000",
56
+ "location": "Super Deluxe (www.super-deluxe.com)",
57
+ "id": "70871098149"
58
+ },
59
+ {
60
+ "name": "Tokyo 2.0 #21 - Open Social App Dev & kakuteru.com",
61
+ "start_time": "2009-02-10T03:00:00+0000",
62
+ "end_time": "2009-02-10T06:00:00+0000",
63
+ "location": "Super Deluxe (www.super-deluxe.com)",
64
+ "id": "62495467768"
65
+ }
66
+ ],
67
+ "paging": {
68
+ "previous": "https://graph.facebook.com/579612276/events?token=2227470867%7C2.R9XAeEGAiuhhRCcZAgJzTA__.3600.1272362400-579612276%7ChajPs3sLZ2opsOA9TSEGEq-lBrE.&limit=25&since=2010-04-29T01%3A30%3A00%2B0000",
69
+ "next": "https://graph.facebook.com/579612276/events?token=2227470867%7C2.R9XAeEGAiuhhRCcZAgJzTA__.3600.1272362400-579612276%7ChajPs3sLZ2opsOA9TSEGEq-lBrE.&limit=25&until=2009-02-10T03%3A00%3A00%2B0000"
70
+ }
71
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "error": {
3
+ "type": "OAuthAccessTokenException",
4
+ "message": "An access token is required to request this resource."
5
+ }
6
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "name": "iPhone 3G S",
5
+ "id": "115286585902"
6
+ },
7
+ {
8
+ "name": "Poken Japan (Official Users Group)",
9
+ "id": "51965294478"
10
+ },
11
+ {
12
+ "name": "smart.fm",
13
+ "id": "54752017234"
14
+ },
15
+ {
16
+ "name": "Bank Band",
17
+ "id": "16258431443"
18
+ },
19
+ {
20
+ "name": "MR.CHILDREN (I <3 Mr.Children)",
21
+ "id": "2250506166"
22
+ },
23
+ {
24
+ "name": "Genetic Algorithm Group",
25
+ "id": "6356503081"
26
+ },
27
+ {
28
+ "name": "Doshisha High School",
29
+ "id": "22267475428"
30
+ },
31
+ {
32
+ "name": "Doshisha University",
33
+ "id": "2378965731"
34
+ },
35
+ {
36
+ "name": "Tokyo2Point0",
37
+ "id": "19217126672"
38
+ },
39
+ {
40
+ "name": "Facebook Developers",
41
+ "id": "2205007948"
42
+ },
43
+ {
44
+ "name": "iKnow!",
45
+ "id": "11414114965"
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "error": {
3
+ "type": "OAuthAccessTokenException",
4
+ "message": "An access token is required to request this resource."
5
+ }
6
+ }