access 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a380f7289531e8baf917caac649c3ce3f3c173bc
4
- data.tar.gz: 265330a086488c160e104055b39a73f8336d70b2
3
+ metadata.gz: b6cc51d6e304ed05d48f23fec9984b1c60b01474
4
+ data.tar.gz: 16c0985b95ba5d94b49a6b227a8ec34de5e37308
5
5
  SHA512:
6
- metadata.gz: 8810ebe3496b8ebee037d4f44f99c466afa4759aa6be8b2606662c330a865aa5e0410822919afbef13f5e5177c279a3394bb77420db8d91d52cbdc23836107d5
7
- data.tar.gz: 2ce9b3ced0966f98b827f8184d0ef24e0a3140fc5e560a38e4ddb55fadabec4954beb4297c9d4e41adfc606bedca1b77e97a92c13bb7727e650a63e4bc234424
6
+ metadata.gz: 0015ee31ae23ee73648f18042c79709a1de33edb0b9a98c2cb4d778cc3b2e9daf1944e24cfdf7cdde272d0ea2625ab524b8b65ca4929fffa5a45256efb02d028
7
+ data.tar.gz: f6497472d4e4939d4a76ad1343bb07dff5408eaa70c3a414808e7f4e4e54fa6d86b9447c5e04e49818ac3e10d0168cbd06cb68aa00ed6e85b361962963fc4ea5
data/README.md CHANGED
@@ -24,65 +24,104 @@ Or install it yourself as:
24
24
 
25
25
  You can configure the following options:
26
26
 
27
- - `access_token` Required
28
- - `format` Set as "json" or "xml". Default is "json"
29
- - `api_environment` Set as "staging" or "production". Default is "staging"
30
- - `api_version` "v1" is default.
31
- - `hashify` Returns the results all using Hashie::Mash if "true", Default is "false"
27
+ - `access_token` **Required**
28
+ - `format`: Set as `'json'` or `'xml'`. Default is `'json'`
29
+ - `api_environment`: Set as `'staging'` or `'production'`. Default is `'staging'`
30
+ - `api_version`: `'v1'` is default.
31
+ - `hashify` Returns the results all using Hashie::Mash if `'true'`, Default is `'false'`
32
32
 
33
- You can set these buy creating environment variables called:
33
+ #### Config via Environment Variables
34
+
35
+ You can set config settings by creating environment variables called:
34
36
 
35
37
  `ENV['ACCESS_TOKEN']`, `ENV['ACCESS_FORMAT']`, `ENV['ACCESS_ENVIRONMENT']`, `ENV['ACCESS_VERSION']`, `ENV['ACCESS_HASHIFY']`
36
38
 
37
- or create an initializer file and set your config
39
+ #### Config via Initializer
38
40
 
39
- ```
41
+ You can also create an initializer file to set up a config
42
+
43
+ ```ruby
40
44
  Access.configure do |config|
41
45
  config.access_token = ENV['ACCESS_TOKEN']
42
- config.hashify = "true"
46
+ config.hashify = 'true'
43
47
  end
44
48
  ```
45
49
 
46
50
  You can also set them one at a time
47
51
 
48
- `Access.config.format = 'xml`
52
+ `Access.config.format = 'xml'`
49
53
 
50
54
  ###Making Calls
51
55
 
52
56
  ####Offer
53
57
 
54
- `Access::Offer.search options`
55
- `Access::Offer.find offer_key options` *member_key required*
58
+ ```ruby
59
+ Access::Offer.search options
60
+ ```
61
+
62
+ ```ruby
63
+ Access::Offer.find **offer_key** options, member_key: **your-member-key**
64
+ ```
56
65
 
57
66
  ####Store
58
67
 
59
- `Access::Store.search options`
60
- `Access::Store.find store_key options`
68
+ ```ruby
69
+ Access::Store.search options
70
+ ```
71
+
72
+ ```ruby
73
+ Access::Store.find store_key options
74
+ ```
61
75
 
62
76
  ####Location
63
77
 
64
- `Access::Location.search options`
65
- `Access::Location.find location_key options`
78
+ ```ruby
79
+ Access::Location.search options
80
+ ```
81
+
82
+ ```ruby
83
+ Access::Location.find location_key options
84
+ ```
66
85
 
67
86
  ####Category
68
87
 
69
- `Access::Category.search options`
70
- `Access::Category.find key options`
88
+ ```ruby
89
+ Access::Category.search options
90
+ ```
91
+
92
+ ```ruby
93
+ Access::Category.find key options
94
+ ```
71
95
 
72
96
  ####Report
73
97
 
74
- `Access::Report.usage options`
75
- `Access::Report.usage token options`
98
+ ```ruby
99
+ Access::Report.usage options
100
+ ```
101
+
102
+ ```ruby
103
+ Access::Report.usage token options
104
+ ```
76
105
 
77
106
  ####Token
78
107
 
79
- `Access::Token.verify options`
80
- `Access::Token.verify_other token options`
108
+ ```ruby
109
+ Access::Token.verify options
110
+ ```
111
+
112
+ ```ruby
113
+ Access::Token.verify_other token options
114
+ ```
81
115
 
82
116
  ####Redeem
83
117
 
84
- `Access::Redeem.redeem_offer key nil options` *member_key required*
85
- `Access::Redeem.redeem_offer key redeem_type options` *member_key required*
118
+ ```ruby
119
+ Access::Redeem.redeem_offer key nil options` *member_key required
120
+ ```
121
+
122
+ ```ruby
123
+ Access::Redeem.redeem_offer key redeem_type options` *member_key required
124
+ ```
86
125
 
87
126
  ####Member
88
127
 
@@ -57,6 +57,12 @@ module Access
57
57
  get("/usage/#{token}", "report", options)
58
58
  end
59
59
 
60
+
61
+ ###filter
62
+ def verify_filter(options = {})
63
+ get("/verify-filter", options)
64
+ end
65
+
60
66
  ###member
61
67
 
62
68
  end
@@ -0,0 +1,7 @@
1
+ module Access
2
+ class Filter
3
+ def self.verify(options = {})
4
+ Access::Api.new.verify_filter options
5
+ end
6
+ end
7
+ end
@@ -1,4 +1,4 @@
1
1
  module Access
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
4
4
 
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.1
4
+ version: 1.0.2
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-01-14 00:00:00.000000000 Z
13
+ date: 2015-01-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -143,6 +143,7 @@ files:
143
143
  - lib/access/api.rb
144
144
  - lib/access/category.rb
145
145
  - lib/access/config.rb
146
+ - lib/access/filter.rb
146
147
  - lib/access/location.rb
147
148
  - lib/access/member.rb
148
149
  - lib/access/offer.rb