fbgraph 0.0.9 → 0.1.1
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.
- data.tar.gz.sig +0 -0
- data/Manifest +0 -1
- data/Rakefile +2 -2
- data/fbgraph.gemspec +9 -3
- data/lib/fbgraph/base.rb +14 -3
- data/lib/fbgraph/selection.rb +2 -2
- metadata +29 -5
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/Manifest
CHANGED
data/Rakefile
CHANGED
@@ -2,13 +2,13 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('fbgraph', '0.
|
5
|
+
Echoe.new('fbgraph', '0.1.1') do |p|
|
6
6
|
p.description = "A Gem for Facebook Open Graph API"
|
7
7
|
p.url = "http://github.com/nsanta/fbgraph"
|
8
8
|
p.author = "Nicolas Santa"
|
9
9
|
p.email = "nicolas55ar@gmail.com"
|
10
10
|
p.ignore_pattern = ["tmp/*", "script/*"]
|
11
|
-
|
11
|
+
p.development_dependencies = ['echoe', 'rspec']
|
12
12
|
p.runtime_dependencies = ['oauth2' , 'json', 'hashie']
|
13
13
|
end
|
14
14
|
|
data/fbgraph.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{fbgraph}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.1.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Nicolas Santa"]
|
9
9
|
s.cert_chain = ["/home/nicolas/certs/gem-public_cert.pem"]
|
10
|
-
s.date = %q{2010-
|
10
|
+
s.date = %q{2010-08-20}
|
11
11
|
s.description = %q{A Gem for Facebook Open Graph API}
|
12
12
|
s.email = %q{nicolas55ar@gmail.com}
|
13
13
|
s.extra_rdoc_files = ["README", "README.textile", "TODO.list", "lib/fbgraph.rb", "lib/fbgraph/authorization.rb", "lib/fbgraph/base.rb", "lib/fbgraph/client.rb", "lib/fbgraph/realtime.rb", "lib/fbgraph/search.rb", "lib/fbgraph/selection.rb"]
|
14
|
-
s.files = ["Manifest", "README", "README.textile", "Rakefile", "TODO.list", "
|
14
|
+
s.files = ["Manifest", "README", "README.textile", "Rakefile", "TODO.list", "lib/fbgraph.rb", "lib/fbgraph/authorization.rb", "lib/fbgraph/base.rb", "lib/fbgraph/client.rb", "lib/fbgraph/realtime.rb", "lib/fbgraph/search.rb", "lib/fbgraph/selection.rb", "specs/lib/fbauth/authorization_spec.rb", "specs/lib/fbauth/base_spec.rb", "specs/lib/fbauth/client_spec.rb", "specs/lib/fbauth/realtime_spec.rb", "specs/lib/fbauth/search_spec.rb", "specs/lib/fbauth/selection_spec.rb", "specs/spec_helper.rb", "fbgraph.gemspec"]
|
15
15
|
s.homepage = %q{http://github.com/nsanta/fbgraph}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fbgraph", "--main", "README"]
|
17
17
|
s.require_paths = ["lib"]
|
@@ -28,14 +28,20 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_runtime_dependency(%q<oauth2>, [">= 0"])
|
29
29
|
s.add_runtime_dependency(%q<json>, [">= 0"])
|
30
30
|
s.add_runtime_dependency(%q<hashie>, [">= 0"])
|
31
|
+
s.add_development_dependency(%q<echoe>, [">= 0"])
|
32
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
31
33
|
else
|
32
34
|
s.add_dependency(%q<oauth2>, [">= 0"])
|
33
35
|
s.add_dependency(%q<json>, [">= 0"])
|
34
36
|
s.add_dependency(%q<hashie>, [">= 0"])
|
37
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
38
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
35
39
|
end
|
36
40
|
else
|
37
41
|
s.add_dependency(%q<oauth2>, [">= 0"])
|
38
42
|
s.add_dependency(%q<json>, [">= 0"])
|
39
43
|
s.add_dependency(%q<hashie>, [">= 0"])
|
44
|
+
s.add_dependency(%q<echoe>, [">= 0"])
|
45
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
40
46
|
end
|
41
47
|
end
|
data/lib/fbgraph/base.rb
CHANGED
@@ -22,7 +22,7 @@ module FBGraph
|
|
22
22
|
return self
|
23
23
|
end
|
24
24
|
|
25
|
-
def params=
|
25
|
+
def params=(ps)
|
26
26
|
@params = ps
|
27
27
|
return self
|
28
28
|
end
|
@@ -31,7 +31,7 @@ module FBGraph
|
|
31
31
|
@params
|
32
32
|
end
|
33
33
|
|
34
|
-
def param
|
34
|
+
def param(pm)
|
35
35
|
@params.merge!(pm)
|
36
36
|
return self
|
37
37
|
end
|
@@ -53,7 +53,7 @@ module FBGraph
|
|
53
53
|
@params.merge!(data)
|
54
54
|
uri = build_open_graph_path(@objects , @connection_type)
|
55
55
|
puts "FBGRAPH [POST]: #{uri}"
|
56
|
-
result = @client.consumer.post(uri , @params)
|
56
|
+
result = @client.consumer.post(uri , @params , multipart_header)
|
57
57
|
return parse_json(result, parsed)
|
58
58
|
end
|
59
59
|
|
@@ -86,5 +86,16 @@ module FBGraph
|
|
86
86
|
request
|
87
87
|
end
|
88
88
|
|
89
|
+
def multipart_header
|
90
|
+
if multipart?
|
91
|
+
header = {"Content-Disposition" => "form-data", "name" => "control-name"}
|
92
|
+
end
|
93
|
+
header || {}
|
94
|
+
end
|
95
|
+
|
96
|
+
def multipart?
|
97
|
+
%w(photos).include?(@connection_type) || %w(photo post).include?(@objects)
|
98
|
+
end
|
99
|
+
|
89
100
|
end
|
90
101
|
end
|
data/lib/fbgraph/selection.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module FBGraph
|
2
2
|
class Selection < Base
|
3
3
|
|
4
|
-
OBJECTS = %w(user album event group link note page photo post status video).freeze
|
4
|
+
OBJECTS = %w(user album event group link note page photo post status video comment checkin).freeze
|
5
5
|
|
6
6
|
CONNECTION_TYPES = %w(home photos comments feed noreply
|
7
7
|
maybe invited attending declined picture
|
8
8
|
members tagged links groups albums
|
9
9
|
statuses videos notes posts events friends
|
10
10
|
activities interests music books movies television
|
11
|
-
likes inbox outbox updates).freeze
|
11
|
+
likes inbox outbox updates accounts chekins).freeze
|
12
12
|
|
13
13
|
OBJECTS.each do |object|
|
14
14
|
class_eval <<-METHOD
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Nicolas Santa
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
urUszHKBS/vEBMuC
|
36
36
|
-----END CERTIFICATE-----
|
37
37
|
|
38
|
-
date: 2010-
|
38
|
+
date: 2010-08-20 00:00:00 -03:00
|
39
39
|
default_executable:
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -74,6 +74,30 @@ dependencies:
|
|
74
74
|
version: "0"
|
75
75
|
type: :runtime
|
76
76
|
version_requirements: *id003
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: echoe
|
79
|
+
prerelease: false
|
80
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
type: :development
|
88
|
+
version_requirements: *id004
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rspec
|
91
|
+
prerelease: false
|
92
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
version: "0"
|
99
|
+
type: :development
|
100
|
+
version_requirements: *id005
|
77
101
|
description: A Gem for Facebook Open Graph API
|
78
102
|
email: nicolas55ar@gmail.com
|
79
103
|
executables: []
|
@@ -97,7 +121,6 @@ files:
|
|
97
121
|
- README.textile
|
98
122
|
- Rakefile
|
99
123
|
- TODO.list
|
100
|
-
- fbgraph.gemspec
|
101
124
|
- lib/fbgraph.rb
|
102
125
|
- lib/fbgraph/authorization.rb
|
103
126
|
- lib/fbgraph/base.rb
|
@@ -112,6 +135,7 @@ files:
|
|
112
135
|
- specs/lib/fbauth/search_spec.rb
|
113
136
|
- specs/lib/fbauth/selection_spec.rb
|
114
137
|
- specs/spec_helper.rb
|
138
|
+
- fbgraph.gemspec
|
115
139
|
has_rdoc: true
|
116
140
|
homepage: http://github.com/nsanta/fbgraph
|
117
141
|
licenses: []
|
metadata.gz.sig
CHANGED
Binary file
|