access 1.0.8 → 1.1.0
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/lib/access.rb +2 -0
- data/lib/access/api.rb +69 -11
- data/lib/access/autocomplete.rb +2 -0
- data/lib/access/category.rb +2 -0
- data/lib/access/config.rb +1 -0
- data/lib/access/error.rb +2 -0
- data/lib/access/location.rb +2 -0
- data/lib/access/oauth_application.rb +37 -0
- data/lib/access/offer.rb +1 -0
- data/lib/access/redeem.rb +2 -0
- data/lib/access/report.rb +1 -0
- data/lib/access/store.rb +2 -0
- data/lib/access/token.rb +5 -7
- data/lib/access/verify.rb +13 -0
- data/lib/access/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25f8be3a87de2c36b8f409fa33b74c5253e1f1f5
|
4
|
+
data.tar.gz: fd7dbfc14b4b73237998469d4a4655ee4cea0685
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 306c7cf380a584de635199746e03a0dc8143c26edfe8d8c1684bd1389a40c8c4de8291f2c31ad38cc2c560a8b9d85b8b2664d0ff9b5a1c5b1a499acaa7d2c634
|
7
|
+
data.tar.gz: 4565e37972e6f0091518608bb6855e4fb39080e2f988d4fe9fedbd3465925a04807e885639aa227c128ffcadda11199950294788792c4a10bfcb276006b3c820
|
data/lib/access.rb
CHANGED
@@ -13,7 +13,9 @@ require "access/location"
|
|
13
13
|
require "access/category"
|
14
14
|
require "access/autocomplete"
|
15
15
|
require "access/report"
|
16
|
+
require "access/oauth_application"
|
16
17
|
require "access/token"
|
18
|
+
require "access/verify"
|
17
19
|
require "access/redeem"
|
18
20
|
# require "access/member"
|
19
21
|
|
data/lib/access/api.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Access
|
2
2
|
class Api < Request
|
3
3
|
|
4
|
-
|
4
|
+
# Categories
|
5
5
|
def search_categories(options = {})
|
6
6
|
get("/categories", "offer", options)
|
7
7
|
end
|
@@ -10,6 +10,8 @@ module Access
|
|
10
10
|
get("/categories/#{category_id}", "offer", options)
|
11
11
|
end
|
12
12
|
|
13
|
+
|
14
|
+
# Offers
|
13
15
|
def search_offers(options={})
|
14
16
|
get("/offers", "offer", options)
|
15
17
|
end
|
@@ -18,6 +20,8 @@ module Access
|
|
18
20
|
get("/offers/#{offer_id}", "offer", options)
|
19
21
|
end
|
20
22
|
|
23
|
+
|
24
|
+
# Locations
|
21
25
|
def search_locations(options={})
|
22
26
|
get("/locations", "offer", options)
|
23
27
|
end
|
@@ -26,6 +30,8 @@ module Access
|
|
26
30
|
get("/locations/#{location_id}", "offer", options)
|
27
31
|
end
|
28
32
|
|
33
|
+
|
34
|
+
# Stores
|
29
35
|
def search_stores(options={})
|
30
36
|
get("/stores", "offer", options)
|
31
37
|
end
|
@@ -34,31 +40,82 @@ module Access
|
|
34
40
|
get("/stores/#{store_id}", "offer", options)
|
35
41
|
end
|
36
42
|
|
37
|
-
|
43
|
+
|
44
|
+
# Autocomplete
|
38
45
|
def autocomplete(options = {})
|
39
46
|
get("/autocomplete", "offer", options)
|
40
47
|
end
|
41
48
|
|
42
|
-
|
43
|
-
|
44
|
-
|
49
|
+
|
50
|
+
# Oauth Applications
|
51
|
+
def search_oauth_applications(options = {})
|
52
|
+
get('/oauth_applications', 'token', options)
|
53
|
+
end
|
54
|
+
|
55
|
+
def find_oauth_application(application_id, options = {})
|
56
|
+
get("/oauth_applications/#{application_id}", 'token', options)
|
57
|
+
end
|
58
|
+
|
59
|
+
def search_oauth_application_tokens(application_id, options = {})
|
60
|
+
get("/oauth_applications/#{application_id}/access_tokens", 'token', options)
|
61
|
+
end
|
62
|
+
|
63
|
+
def find_oauth_application_token(application_id, token_id, options = {})
|
64
|
+
get("/oauth_applications/#{application_id}/access_tokens/#{token_id}", 'token', options)
|
65
|
+
end
|
66
|
+
|
67
|
+
def create_oauth_application_token(application_id, options = {})
|
68
|
+
create("/oauth_applications/#{application_id}/access_tokens", 'token', options)
|
69
|
+
end
|
70
|
+
|
71
|
+
def create_oauth_application(options = {})
|
72
|
+
create("/oauth_applications", 'token', options)
|
45
73
|
end
|
46
74
|
|
47
|
-
def
|
48
|
-
|
75
|
+
def update_oauth_application(application_id, options = {})
|
76
|
+
put("/oauth_applications/#{application_id}", 'token', options)
|
77
|
+
end
|
78
|
+
|
79
|
+
def delete_oauth_application(application_id, options = {})
|
80
|
+
delete("/oauth_applications/#{application_id}", 'token', options)
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
# Access Tokens
|
85
|
+
def search_tokens(options = {})
|
86
|
+
get('/tokens', 'token', options)
|
87
|
+
end
|
88
|
+
|
89
|
+
def find_token(token, options = {}) # new verify_other
|
90
|
+
get("/tokens/#{token}", "token", options)
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
# Verify
|
95
|
+
def verify_token(options = {})
|
96
|
+
get('/token', 'verify', options)
|
49
97
|
end
|
50
98
|
|
51
99
|
def verify_filter(options = {})
|
52
|
-
get(
|
100
|
+
get('/filter', 'verify', options)
|
53
101
|
end
|
54
102
|
|
55
|
-
|
103
|
+
# def verify(options = {})
|
104
|
+
# get("/verify", "token", options)
|
105
|
+
# end
|
106
|
+
|
107
|
+
# def verify_filter(options = {})
|
108
|
+
# get("/filter", "token", options)
|
109
|
+
# end
|
110
|
+
|
111
|
+
|
112
|
+
# Redeem
|
56
113
|
def redeem_offer(offer_key, redeem_type = nil, options = {})
|
57
114
|
get("/redeem/#{offer_key}/#{redeem_type}", "redeem", options)
|
58
115
|
end
|
59
116
|
|
60
|
-
###report
|
61
117
|
|
118
|
+
# Report
|
62
119
|
def all_usage(options = {})
|
63
120
|
get("/all_usage", "report", options)
|
64
121
|
end
|
@@ -71,7 +128,8 @@ module Access
|
|
71
128
|
get("/usage/#{token}", "report", options)
|
72
129
|
end
|
73
130
|
|
74
|
-
|
131
|
+
|
132
|
+
# Member
|
75
133
|
|
76
134
|
end
|
77
135
|
end
|
data/lib/access/autocomplete.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
module Access
|
2
2
|
class Autocomplete
|
3
|
+
|
3
4
|
def self.search(options = {})
|
4
5
|
Access::Api.new.autocomplete options
|
5
6
|
end
|
@@ -19,5 +20,6 @@ module Access
|
|
19
20
|
def self.search_locations(options = {})
|
20
21
|
Access::Api.new.autocomplete options.merge(resources: 'locations')
|
21
22
|
end
|
23
|
+
|
22
24
|
end
|
23
25
|
end
|
data/lib/access/category.rb
CHANGED
data/lib/access/config.rb
CHANGED
data/lib/access/error.rb
CHANGED
data/lib/access/location.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
module Access
|
2
|
+
class OauthApplication
|
3
|
+
|
4
|
+
def self.search(options = {})
|
5
|
+
Access::Api.new.search_oauth_applications options
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.find(application_id, options = {})
|
9
|
+
Access::Api.new.find_oauth_application application_id, options
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.search_tokens(application_id, options = {})
|
13
|
+
Access::Api.new.search_oauth_application_tokens application_id, options
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.find_token(application_id, token_id, options = {})
|
17
|
+
Access::Api.new.find_oauth_application_token application_id, token_id, options
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.create_token(application_id, options = {})
|
21
|
+
Access::Api.new.create_oauth_application_token application_id, options
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.create(options = {})
|
25
|
+
Access::Api.new.create_oauth_application options
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.update(application_id, options = {})
|
29
|
+
Access::Api.new.update_oauth_application application_id, options
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.delete(application_id, options = {})
|
33
|
+
Access::Api.new.delete_oauth_application application_id, options
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
data/lib/access/offer.rb
CHANGED
data/lib/access/redeem.rb
CHANGED
data/lib/access/report.rb
CHANGED
data/lib/access/store.rb
CHANGED
data/lib/access/token.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
module Access
|
2
2
|
class Token
|
3
|
-
def self.verify(options = {})
|
4
|
-
Access::Api.new.verify options
|
5
|
-
end
|
6
3
|
|
7
|
-
def self.
|
8
|
-
Access::Api.new.
|
4
|
+
def self.search(options = {})
|
5
|
+
Access::Api.new.search_tokens options
|
9
6
|
end
|
10
7
|
|
11
|
-
def self.
|
12
|
-
Access::Api.new.
|
8
|
+
def self.find(token, options = {})
|
9
|
+
Access::Api.new.find_token token, options
|
13
10
|
end
|
11
|
+
|
14
12
|
end
|
15
13
|
end
|
data/lib/access/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: access
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Eggett
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-04
|
13
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -147,12 +147,14 @@ files:
|
|
147
147
|
- lib/access/error.rb
|
148
148
|
- lib/access/location.rb
|
149
149
|
- lib/access/member.rb
|
150
|
+
- lib/access/oauth_application.rb
|
150
151
|
- lib/access/offer.rb
|
151
152
|
- lib/access/redeem.rb
|
152
153
|
- lib/access/report.rb
|
153
154
|
- lib/access/request.rb
|
154
155
|
- lib/access/store.rb
|
155
156
|
- lib/access/token.rb
|
157
|
+
- lib/access/verify.rb
|
156
158
|
- lib/access/version.rb
|
157
159
|
- test/offers/offer_test.rb
|
158
160
|
- test/test_helper.rb
|