mini_fb 1.1.2 → 1.1.3
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/lib/mini_fb.rb +18 -16
- metadata +4 -4
data/lib/mini_fb.rb
CHANGED
@@ -340,7 +340,7 @@ module MiniFB
|
|
340
340
|
def rest(api_method, options={})
|
341
341
|
MiniFB.rest(@access_token, api_method, session_options(options))
|
342
342
|
end
|
343
|
-
|
343
|
+
|
344
344
|
# Returns a GraphObject for the given id
|
345
345
|
def graph_object(id)
|
346
346
|
MiniFB::GraphObject.new(self, id)
|
@@ -352,10 +352,10 @@ module MiniFB
|
|
352
352
|
end
|
353
353
|
|
354
354
|
private
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
355
|
+
def session_options(options)
|
356
|
+
(options[:params] ||= {})[:locale] ||= @locale
|
357
|
+
options
|
358
|
+
end
|
359
359
|
end
|
360
360
|
|
361
361
|
# Wraps a graph object for easily accessing its connections
|
@@ -380,7 +380,9 @@ module MiniFB
|
|
380
380
|
@object.metadata.connections.keys
|
381
381
|
end
|
382
382
|
|
383
|
-
|
383
|
+
unless RUBY_VERSION =~ /1\.9/
|
384
|
+
undef :id, :type
|
385
|
+
end
|
384
386
|
|
385
387
|
def methods
|
386
388
|
super + @object.keys.include?(key) + connections.include?(key)
|
@@ -503,18 +505,18 @@ module MiniFB
|
|
503
505
|
# MiniFB.multifql(access_token, { :statuses => "SELECT status_id, message FROM status WHERE uid = 12345",
|
504
506
|
# :privacy => "SELECT object_id, description FROM privacy WHERE object_id IN (SELECT status_id FROM #statuses)" })
|
505
507
|
def self.multifql(access_token, fql_queries, options={})
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
508
|
+
url = "https://api.facebook.com/method/fql.multiquery"
|
509
|
+
params = options[:params] || {}
|
510
|
+
params["access_token"] = "#{(access_token)}"
|
511
|
+
params["metadata"] = "1" if options[:metadata]
|
512
|
+
params["queries"] = JSON[fql_queries]
|
513
|
+
params[:format] = "JSON"
|
514
|
+
options[:params] = params
|
515
|
+
return fetch(url, options)
|
514
516
|
end
|
515
|
-
|
517
|
+
|
516
518
|
# Uses new Oauth 2 authentication against old Facebook REST API
|
517
|
-
|
519
|
+
# options:
|
518
520
|
# - params: Any additional parameters you would like to submit
|
519
521
|
def self.rest(access_token, api_method, options={})
|
520
522
|
url = "https://api.facebook.com/method/#{api_method}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_fb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 3
|
10
|
+
version: 1.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis Reeder
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-07 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|