fql 0.3.0 → 0.3.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.
- checksums.yaml +4 -4
- data/README.markdown +1 -1
- data/lib/fql.rb +3 -1
- data/lib/fql/version.rb +1 -1
- data/spec/fql_spec.rb +1 -1
- data/spec/support/vcr_cassettes/invalid_token.yml +5 -5
- data/spec/support/vcr_cassettes/multi_query.yml +5 -5
- data/spec/support/vcr_cassettes/single_query.yml +5 -5
- data/spec/support/vcr_cassettes/single_quoted_query.yml +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de29eca1c52302f3b64915a3c6fc43a5839e1965
|
4
|
+
data.tar.gz: 4544f6e975c0311a83069c53c41b7d487ae91b4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e92daeb67ecd82ebb9b7da4f7a8b163143358b8e994ac7770994470fd469227afec402cb0e2b4b4e1594936ba694516bb037706812d6f1b755e300be53c7345
|
7
|
+
data.tar.gz: 4ffb5a0b8b2e84779c4026b6c932cffc5a98c5952869c9c5a7147a18ac023d8c283e788c744cd53f534057f34f7b2c9a44218167416333ff18d22e14ea57ebb7
|
data/README.markdown
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Fql
|
2
2
|
|
3
|
-
[](https://codeclimate.com/github/mcls/fql)
|
3
|
+
[](https://travis-ci.org/mcls/fql) [](https://codeclimate.com/github/mcls/fql)
|
4
4
|
|
5
5
|
Easily execute FQL queries with this gem.
|
6
6
|
|
data/lib/fql.rb
CHANGED
@@ -17,7 +17,7 @@ module Fql
|
|
17
17
|
#
|
18
18
|
# Exampe: a multi query with an access_token
|
19
19
|
#
|
20
|
-
# options = { :access_token => "fb_access_token" }
|
20
|
+
# options = { :access_token => "fb_access_token", :appsecret_proof => "appsecret_proof" }
|
21
21
|
# Fql.execute({
|
22
22
|
# "query1" => "SELECT uid, rsvp_status FROM event_member WHERE eid = 12345678",
|
23
23
|
# "query2" => "SELECT name FROM profile WHERE id IN (SELECT uid FROM #query1)"
|
@@ -37,6 +37,8 @@ module Fql
|
|
37
37
|
def make_url(fql_query, options = {})
|
38
38
|
url = self::BASE_URL + URI.encode(fql_query.compose)
|
39
39
|
url += URI.encode("&access_token=#{options[:access_token]}") if options && options[:access_token]
|
40
|
+
url += URI.encode("&appsecret_proof=#{options[:appsecret_proof]}") if options && options[:appsecret_proof]
|
41
|
+
|
40
42
|
URI.parse url
|
41
43
|
end
|
42
44
|
|
data/lib/fql/version.rb
CHANGED
data/spec/fql_spec.rb
CHANGED
@@ -34,7 +34,7 @@ describe Fql do
|
|
34
34
|
query = { "likes1" => "SELECT user_id FROM like WHERE post_id = '204418407569_10151239646912570'",
|
35
35
|
"likes2" => "SELECT user_id FROM like WHERE post_id = '204418407569_10151239646912570'" }
|
36
36
|
VCR.use_cassette('single_quoted_query') do
|
37
|
-
expect{ subject.execute query }.to_not raise_error
|
37
|
+
expect{ subject.execute query }.to_not raise_error
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -31,11 +31,11 @@ http_interactions:
|
|
31
31
|
Www-Authenticate:
|
32
32
|
- OAuth "Facebook Platform" "invalid_token" "Invalid OAuth access token."
|
33
33
|
X-Fb-Rev:
|
34
|
-
- '
|
34
|
+
- '998703'
|
35
35
|
X-Fb-Debug:
|
36
|
-
-
|
36
|
+
- eVhFwyy8TtmCqmWaH9zYUNloZs2D/TQkLY7pcYnQcyg=
|
37
37
|
Date:
|
38
|
-
-
|
38
|
+
- Thu, 07 Nov 2013 21:09:44 GMT
|
39
39
|
Connection:
|
40
40
|
- keep-alive
|
41
41
|
Content-Length:
|
@@ -44,5 +44,5 @@ http_interactions:
|
|
44
44
|
encoding: UTF-8
|
45
45
|
string: '{"error":{"message":"Invalid OAuth access token.","type":"OAuthException","code":190}}'
|
46
46
|
http_version:
|
47
|
-
recorded_at:
|
48
|
-
recorded_with: VCR 2.
|
47
|
+
recorded_at: Thu, 07 Nov 2013 21:09:57 GMT
|
48
|
+
recorded_with: VCR 2.6.0
|
@@ -31,11 +31,11 @@ http_interactions:
|
|
31
31
|
Pragma:
|
32
32
|
- no-cache
|
33
33
|
X-Fb-Rev:
|
34
|
-
- '
|
34
|
+
- '998703'
|
35
35
|
X-Fb-Debug:
|
36
|
-
-
|
36
|
+
- MVbUS26dzcFwwBfd2+h3YNuliISZqwY2coOAuDcKcpE=
|
37
37
|
Date:
|
38
|
-
-
|
38
|
+
- Thu, 07 Nov 2013 21:09:43 GMT
|
39
39
|
Connection:
|
40
40
|
- keep-alive
|
41
41
|
Content-Length:
|
@@ -45,5 +45,5 @@ http_interactions:
|
|
45
45
|
string: '{"data":[{"name":"query1","fql_result_set":[{"uid":4}]},{"name":"query2","fql_result_set":[{"name":"Mark
|
46
46
|
Zuckerberg"}]}]}'
|
47
47
|
http_version:
|
48
|
-
recorded_at:
|
49
|
-
recorded_with: VCR 2.
|
48
|
+
recorded_at: Thu, 07 Nov 2013 21:09:57 GMT
|
49
|
+
recorded_with: VCR 2.6.0
|
@@ -31,11 +31,11 @@ http_interactions:
|
|
31
31
|
Pragma:
|
32
32
|
- no-cache
|
33
33
|
X-Fb-Rev:
|
34
|
-
- '
|
34
|
+
- '998703'
|
35
35
|
X-Fb-Debug:
|
36
|
-
-
|
36
|
+
- qWYcRFfl4KSWeQwZcUiyfyKiGWFkT4ILjo00/v5yUDE=
|
37
37
|
Date:
|
38
|
-
-
|
38
|
+
- Thu, 07 Nov 2013 21:09:43 GMT
|
39
39
|
Connection:
|
40
40
|
- keep-alive
|
41
41
|
Content-Length:
|
@@ -44,5 +44,5 @@ http_interactions:
|
|
44
44
|
encoding: UTF-8
|
45
45
|
string: '{"data":[{"name":"Mark Zuckerberg"}]}'
|
46
46
|
http_version:
|
47
|
-
recorded_at:
|
48
|
-
recorded_with: VCR 2.
|
47
|
+
recorded_at: Thu, 07 Nov 2013 21:09:56 GMT
|
48
|
+
recorded_with: VCR 2.6.0
|
@@ -31,11 +31,11 @@ http_interactions:
|
|
31
31
|
Pragma:
|
32
32
|
- no-cache
|
33
33
|
X-Fb-Rev:
|
34
|
-
- '
|
34
|
+
- '998703'
|
35
35
|
X-Fb-Debug:
|
36
|
-
-
|
36
|
+
- PxXox0ebxZKXKhgZTyRgb30AlQ81SanESH28Q85uzMs=
|
37
37
|
Date:
|
38
|
-
-
|
38
|
+
- Thu, 07 Nov 2013 21:09:43 GMT
|
39
39
|
Connection:
|
40
40
|
- keep-alive
|
41
41
|
Content-Length:
|
@@ -44,5 +44,5 @@ http_interactions:
|
|
44
44
|
encoding: UTF-8
|
45
45
|
string: '{"data":[{"name":"likes1","fql_result_set":[{"user_id":100001275762888}]},{"name":"likes2","fql_result_set":[{"user_id":100001275762888}]}]}'
|
46
46
|
http_version:
|
47
|
-
recorded_at:
|
48
|
-
recorded_with: VCR 2.
|
47
|
+
recorded_at: Thu, 07 Nov 2013 21:09:57 GMT
|
48
|
+
recorded_with: VCR 2.6.0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Claes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.0.
|
126
|
+
rubygems_version: 2.0.7
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Facebook Query Language library
|