devcycle-server-sdk 1.0.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.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +175 -0
  4. data/Rakefile +10 -0
  5. data/devcycle-server-sdk.gemspec +38 -0
  6. data/docs/DevcycleApi.md +289 -0
  7. data/docs/ErrorResponse.md +20 -0
  8. data/docs/Event.md +26 -0
  9. data/docs/Feature.md +26 -0
  10. data/docs/UserData.md +48 -0
  11. data/docs/Variable.md +24 -0
  12. data/examples/sinatra/Gemfile +6 -0
  13. data/examples/sinatra/Gemfile.lock +51 -0
  14. data/examples/sinatra/README.md +14 -0
  15. data/examples/sinatra/app.rb +47 -0
  16. data/git_push.sh +57 -0
  17. data/lib/devcycle-server-sdk/api/devcycle_api.rb +347 -0
  18. data/lib/devcycle-server-sdk/api_client.rb +390 -0
  19. data/lib/devcycle-server-sdk/api_error.rb +57 -0
  20. data/lib/devcycle-server-sdk/configuration.rb +278 -0
  21. data/lib/devcycle-server-sdk/models/error_response.rb +234 -0
  22. data/lib/devcycle-server-sdk/models/event.rb +264 -0
  23. data/lib/devcycle-server-sdk/models/feature.rb +313 -0
  24. data/lib/devcycle-server-sdk/models/inline_response201.rb +218 -0
  25. data/lib/devcycle-server-sdk/models/user_data.rb +447 -0
  26. data/lib/devcycle-server-sdk/models/user_data_and_events_body.rb +229 -0
  27. data/lib/devcycle-server-sdk/models/variable.rb +303 -0
  28. data/lib/devcycle-server-sdk/version.rb +15 -0
  29. data/lib/devcycle-server-sdk.rb +47 -0
  30. data/spec/api/devcycle_api_spec.rb +80 -0
  31. data/spec/api_client_spec.rb +226 -0
  32. data/spec/configuration_spec.rb +42 -0
  33. data/spec/models/error_response_spec.rb +40 -0
  34. data/spec/models/event_spec.rb +58 -0
  35. data/spec/models/feature_spec.rb +62 -0
  36. data/spec/models/inline_response201_spec.rb +34 -0
  37. data/spec/models/user_data_and_events_body_spec.rb +40 -0
  38. data/spec/models/user_data_spec.rb +128 -0
  39. data/spec/models/variable_spec.rb +56 -0
  40. data/spec/spec_helper.rb +111 -0
  41. metadata +134 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9724ae4c4241898d78424d62ec5153f8ee866315fdba153fe3e744639f8d8ea3
4
+ data.tar.gz: c3ccb44cd5347633ca37f4683eded5a55a072859a72527d03ee052a35040020e
5
+ SHA512:
6
+ metadata.gz: 3bf213b6acf6317956242ed995bc23f586f3b9df60ad5b19beed0861de447da408bd5e7e376425016466b52d89ff1e0c4a6042fc63b08b77a72d70b073642ceb
7
+ data.tar.gz: 342146317ceea77d9a3b67a27298772c674652c757c892e1a3a53a78135884cd83eff060065c10abbe1fc9e35402fe171aa8eb4ecc74388f32d5ebd6eaaa15c8
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/README.md ADDED
@@ -0,0 +1,175 @@
1
+ # devcycle-server-sdk
2
+
3
+ DevCycle - the Ruby gem for the DevCycle Bucketing API
4
+
5
+ Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs.
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: 1.0.0
10
+ - Package version: 1.0.0
11
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build devcycle-server-sdk.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./devcycle-server-sdk-1.0.0.gem
27
+ ```
28
+
29
+ (for development, run `gem install --dev ./devcycle-server-sdk-1.0.0.gem` to install the development dependencies)
30
+
31
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
+
33
+ Finally add this to the Gemfile:
34
+
35
+ gem 'devcycle-server-sdk', '~> 1.0.0'
36
+
37
+ ### Include the Ruby code directly
38
+
39
+ Include the Ruby code directly using `-I` as follows:
40
+
41
+ ```shell
42
+ ruby -Ilib script.rb
43
+ ```
44
+
45
+ ## Getting Started
46
+
47
+ Please follow the [installation](#installation) procedure and then run the following code:
48
+
49
+ ```ruby
50
+ # Load the gem
51
+ require 'devcycle-server-sdk'
52
+
53
+ # Setup authorization
54
+ DevCycle.configure do |config|
55
+ # Configure API key authorization
56
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
57
+ end
58
+
59
+ api_instance = DevCycle::DVCClient.new
60
+ user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
61
+
62
+ begin
63
+ #Get all features for user data
64
+ result = api_instance.get_features(user_data)
65
+ p result
66
+ rescue DevCycle::ApiError => e
67
+ puts "Exception when calling DVCClient->get_features: #{e}"
68
+ end
69
+
70
+ ```
71
+
72
+ ## Usage
73
+
74
+ ### Configure SDK
75
+ ```ruby
76
+ # Load the gem
77
+ require 'devcycle-server-sdk'
78
+
79
+ # Setup authorization
80
+ DevCycle.configure do |config|
81
+ # Configure API key authorization
82
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
83
+ end
84
+
85
+ api_instance = DevCycle::DVCClient.new
86
+ user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
87
+ ```
88
+
89
+ ### Get all features
90
+ ```ruby
91
+ begin
92
+ #Get all features for user data
93
+ result = api_instance.get_features(user_data)
94
+ p result
95
+ rescue DevCycle::ApiError => e
96
+ puts "Exception when calling DVCClient->get_features: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Get variable by key
101
+ ```ruby
102
+ begin
103
+ # Get value of given variable by key, using default value if segmentation is not passed or variable does not exit
104
+ result = api_instance.get_variable_by_key("variable-key", user_data, true)
105
+ p "Received value for #{result.key}: #{result.value}"
106
+ rescue DevCycle::ApiError => e
107
+ puts "Exception when calling DVCClient->get_variable_by_key: #{e}"
108
+ end
109
+ ```
110
+
111
+ ### Get all variables
112
+ ```ruby
113
+ begin
114
+ #Get all variables for user data
115
+ result = api_instance.get_variables(user_data)
116
+ p result
117
+ rescue DevCycle::ApiError => e
118
+ puts "Exception when calling DVCClient->get_variables: #{e}"
119
+ end
120
+ ```
121
+
122
+ ### Send events
123
+ ```ruby
124
+
125
+ event_data = DevCycle::Event.new({
126
+ type: "my-event",
127
+ target: "some_event_target",
128
+ value: 12,
129
+ meta_data: {
130
+ myKey: "my-value"
131
+ }
132
+ })
133
+
134
+ begin
135
+ # Post events for given user data
136
+ result = api_instance.track_event(user_data, event_data)
137
+ p result
138
+ rescue DevCycle::ApiError => e
139
+ puts "Exception when calling DVCClient->track_event: #{e}"
140
+ end
141
+ ```
142
+
143
+ ### Override Logger
144
+ To provide a custom logger, override the `logger` property of the SDK configuration.
145
+ ```ruby
146
+ DevCycle.configure do |config|
147
+ # Configure API key authorization
148
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
149
+
150
+ # Override the default logger
151
+ config.logger = MyLogger
152
+ end
153
+ ```
154
+
155
+ ### Troubleshooting
156
+ To see a detailed log of the requests being made to the DevCycle API, enable SDK debug logging:
157
+ ```ruby
158
+ DevCycle.configure do |config|
159
+ # Configure API key authorization
160
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
161
+
162
+ # Enable detailed debug logs of requests being sent to the DevCycle API
163
+ config.debugging = true
164
+ end
165
+ ```
166
+
167
+
168
+ ## Documentation for Models
169
+
170
+ - [DevCycle::ErrorResponse](docs/ErrorResponse.md)
171
+ - [DevCycle::Event](docs/Event.md)
172
+ - [DevCycle::Feature](docs/Feature.md)
173
+ - [DevCycle::UserData](docs/UserData.md)
174
+ - [DevCycle::Variable](docs/Variable.md)
175
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,38 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #DevCycle Bucketing API
5
+
6
+ #Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ OpenAPI Generator version: 5.3.0
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "devcycle-server-sdk/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "devcycle-server-sdk"
20
+ s.version = DevCycle::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["DevCycleHQ"]
23
+ s.email = ["support@devcycle.com"]
24
+ s.homepage = "https://openapi-generator.tech"
25
+ s.summary = "DevCycle Bucketing API Ruby Gem"
26
+ s.description = "Documents the DevCycle Bucketing API which provides and API interface to User Bucketing and for generated SDKs."
27
+ s.license = "MIT"
28
+ s.required_ruby_version = ">= 2.4"
29
+
30
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
31
+
32
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
33
+
34
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
35
+ s.test_files = `find spec/*`.split("\n")
36
+ s.executables = []
37
+ s.require_paths = ["lib"]
38
+ end
@@ -0,0 +1,289 @@
1
+ # DevCycle::DevcycleApi
2
+
3
+ All URIs are relative to *https://bucketing-api.devcycle.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_features**](DevcycleApi.md#get_features) | **POST** /v1/features | Get all features by key for user data |
8
+ | [**get_variable_by_key**](DevcycleApi.md#get_variable_by_key) | **POST** /v1/variables/{key} | Get variable by key for user data |
9
+ | [**get_variables**](DevcycleApi.md#get_variables) | **POST** /v1/variables | Get all variables by key for user data |
10
+ | [**post_events**](DevcycleApi.md#post_events) | **POST** /v1/track | Post events to DevCycle for user |
11
+
12
+
13
+ ## get_features
14
+
15
+ > <Hash<String, Feature>> get_features(user_data)
16
+
17
+ Get all features by key for user data
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'devcycle-server-sdk'
24
+ # setup authorization
25
+ DevCycle.configure do |config|
26
+ # Configure API key authorization: bearerAuth
27
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ # config.api_key_prefix['bearerAuth'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = DevCycle::DevcycleApi.new
33
+ user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
34
+
35
+ begin
36
+ # Get all features by key for user data
37
+ result = api_instance.get_features(user_data)
38
+ p result
39
+ rescue DevCycle::ApiError => e
40
+ puts "Error when calling DevcycleApi->get_features: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the get_features_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<Hash<String, Feature>>, Integer, Hash)> get_features_with_http_info(user_data)
49
+
50
+ ```ruby
51
+ begin
52
+ # Get all features by key for user data
53
+ data, status_code, headers = api_instance.get_features_with_http_info(user_data)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <Hash<String, Feature>>
57
+ rescue DevCycle::ApiError => e
58
+ puts "Error when calling DevcycleApi->get_features_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **user_data** | [**UserData**](UserData.md) | | |
67
+
68
+ ### Return type
69
+
70
+ [**Hash&lt;String, Feature&gt;**](Feature.md)
71
+
72
+ ### Authorization
73
+
74
+ [bearerAuth](../README.md#bearerAuth)
75
+
76
+ ### HTTP request headers
77
+
78
+ - **Content-Type**: application/json
79
+ - **Accept**: application/json
80
+
81
+
82
+ ## get_variable_by_key
83
+
84
+ > <Variable> get_variable_by_key(key, user_data)
85
+
86
+ Get variable by key for user data
87
+
88
+ ### Examples
89
+
90
+ ```ruby
91
+ require 'time'
92
+ require 'devcycle-server-sdk'
93
+ # setup authorization
94
+ DevCycle.configure do |config|
95
+ # Configure API key authorization: bearerAuth
96
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
97
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
98
+ # config.api_key_prefix['bearerAuth'] = 'Bearer'
99
+ end
100
+
101
+ api_instance = DevCycle::DevcycleApi.new
102
+ key = 'key_example' # String | Variable key
103
+ user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
104
+
105
+ begin
106
+ # Get variable by key for user data
107
+ result = api_instance.get_variable_by_key(key, user_data)
108
+ p result
109
+ rescue DevCycle::ApiError => e
110
+ puts "Error when calling DevcycleApi->get_variable_by_key: #{e}"
111
+ end
112
+ ```
113
+
114
+ #### Using the get_variable_by_key_with_http_info variant
115
+
116
+ This returns an Array which contains the response data, status code and headers.
117
+
118
+ > <Array(<Variable>, Integer, Hash)> get_variable_by_key_with_http_info(key, user_data)
119
+
120
+ ```ruby
121
+ begin
122
+ # Get variable by key for user data
123
+ data, status_code, headers = api_instance.get_variable_by_key_with_http_info(key, user_data)
124
+ p status_code # => 2xx
125
+ p headers # => { ... }
126
+ p data # => <Variable>
127
+ rescue DevCycle::ApiError => e
128
+ puts "Error when calling DevcycleApi->get_variable_by_key_with_http_info: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ | Name | Type | Description | Notes |
135
+ | ---- | ---- | ----------- | ----- |
136
+ | **key** | **String** | Variable key | |
137
+ | **user_data** | [**UserData**](UserData.md) | | |
138
+
139
+ ### Return type
140
+
141
+ [**Variable**](Variable.md)
142
+
143
+ ### Authorization
144
+
145
+ [bearerAuth](../README.md#bearerAuth)
146
+
147
+ ### HTTP request headers
148
+
149
+ - **Content-Type**: application/json
150
+ - **Accept**: application/json
151
+
152
+
153
+ ## get_variables
154
+
155
+ > <Hash<String, Variable>> get_variables(user_data)
156
+
157
+ Get all variables by key for user data
158
+
159
+ ### Examples
160
+
161
+ ```ruby
162
+ require 'time'
163
+ require 'devcycle-server-sdk'
164
+ # setup authorization
165
+ DevCycle.configure do |config|
166
+ # Configure API key authorization: bearerAuth
167
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
168
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
169
+ # config.api_key_prefix['bearerAuth'] = 'Bearer'
170
+ end
171
+
172
+ api_instance = DevCycle::DevcycleApi.new
173
+ user_data = DevCycle::UserData.new({user_id: 'user_id_example'}) # UserData |
174
+
175
+ begin
176
+ # Get all variables by key for user data
177
+ result = api_instance.get_variables(user_data)
178
+ p result
179
+ rescue DevCycle::ApiError => e
180
+ puts "Error when calling DevcycleApi->get_variables: #{e}"
181
+ end
182
+ ```
183
+
184
+ #### Using the get_variables_with_http_info variant
185
+
186
+ This returns an Array which contains the response data, status code and headers.
187
+
188
+ > <Array(<Hash<String, Variable>>, Integer, Hash)> get_variables_with_http_info(user_data)
189
+
190
+ ```ruby
191
+ begin
192
+ # Get all variables by key for user data
193
+ data, status_code, headers = api_instance.get_variables_with_http_info(user_data)
194
+ p status_code # => 2xx
195
+ p headers # => { ... }
196
+ p data # => <Hash<String, Variable>>
197
+ rescue DevCycle::ApiError => e
198
+ puts "Error when calling DevcycleApi->get_variables_with_http_info: #{e}"
199
+ end
200
+ ```
201
+
202
+ ### Parameters
203
+
204
+ | Name | Type | Description | Notes |
205
+ | ---- | ---- | ----------- | ----- |
206
+ | **user_data** | [**UserData**](UserData.md) | | |
207
+
208
+ ### Return type
209
+
210
+ [**Hash&lt;String, Variable&gt;**](Variable.md)
211
+
212
+ ### Authorization
213
+
214
+ [bearerAuth](../README.md#bearerAuth)
215
+
216
+ ### HTTP request headers
217
+
218
+ - **Content-Type**: application/json
219
+ - **Accept**: application/json
220
+
221
+
222
+ ## post_events
223
+
224
+ > <InlineResponse201> post_events(user_data_and_events_body)
225
+
226
+ Post events to DevCycle for user
227
+
228
+ ### Examples
229
+
230
+ ```ruby
231
+ require 'time'
232
+ require 'devcycle-server-sdk'
233
+ # setup authorization
234
+ DevCycle.configure do |config|
235
+ # Configure API key authorization: bearerAuth
236
+ config.api_key['bearerAuth'] = 'YOUR API KEY'
237
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
238
+ # config.api_key_prefix['bearerAuth'] = 'Bearer'
239
+ end
240
+
241
+ api_instance = DevCycle::DevcycleApi.new
242
+ user_data_and_events_body = DevCycle::UserDataAndEventsBody.new # UserDataAndEventsBody |
243
+
244
+ begin
245
+ # Post events to DevCycle for user
246
+ result = api_instance.post_events(user_data_and_events_body)
247
+ p result
248
+ rescue DevCycle::ApiError => e
249
+ puts "Error when calling DevcycleApi->post_events: #{e}"
250
+ end
251
+ ```
252
+
253
+ #### Using the post_events_with_http_info variant
254
+
255
+ This returns an Array which contains the response data, status code and headers.
256
+
257
+ > <Array(<InlineResponse201>, Integer, Hash)> post_events_with_http_info(user_data_and_events_body)
258
+
259
+ ```ruby
260
+ begin
261
+ # Post events to DevCycle for user
262
+ data, status_code, headers = api_instance.post_events_with_http_info(user_data_and_events_body)
263
+ p status_code # => 2xx
264
+ p headers # => { ... }
265
+ p data # => <InlineResponse201>
266
+ rescue DevCycle::ApiError => e
267
+ puts "Error when calling DevcycleApi->post_events_with_http_info: #{e}"
268
+ end
269
+ ```
270
+
271
+ ### Parameters
272
+
273
+ | Name | Type | Description | Notes |
274
+ | ---- | ---- | ----------- | ----- |
275
+ | **user_data_and_events_body** | [**UserDataAndEventsBody**](UserDataAndEventsBody.md) | | |
276
+
277
+ ### Return type
278
+
279
+ [**InlineResponse201**](InlineResponse201.md)
280
+
281
+ ### Authorization
282
+
283
+ [bearerAuth](../README.md#bearerAuth)
284
+
285
+ ### HTTP request headers
286
+
287
+ - **Content-Type**: application/json
288
+ - **Accept**: application/json
289
+
@@ -0,0 +1,20 @@
1
+ # DevCycle::ErrorResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | Error message | |
8
+ | **data** | **Object** | Additional error information detailing the error reasoning | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'devcycle-server-sdk'
14
+
15
+ instance = DevCycle::ErrorResponse.new(
16
+ message: null,
17
+ data: null
18
+ )
19
+ ```
20
+
data/docs/Event.md ADDED
@@ -0,0 +1,26 @@
1
+ # DevCycle::Event
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | Custom event type | |
8
+ | **target** | **String** | Custom event target / subject of event. Contextual to event type | [optional] |
9
+ | **date** | **Float** | Unix epoch time the event occurred according to client | [optional] |
10
+ | **value** | **Float** | Value for numerical events. Contextual to event type | [optional] |
11
+ | **meta_data** | **Object** | Extra JSON metadata for event. Contextual to event type | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'devcycle-server-sdk'
17
+
18
+ instance = DevCycle::Event.new(
19
+ type: null,
20
+ target: null,
21
+ date: null,
22
+ value: null,
23
+ meta_data: null
24
+ )
25
+ ```
26
+
data/docs/Feature.md ADDED
@@ -0,0 +1,26 @@
1
+ # DevCycle::Feature
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **_id** | **String** | unique database id | |
8
+ | **key** | **String** | Unique key by Project, can be used in the SDK / API to reference by &#39;key&#39; rather than _id. | |
9
+ | **type** | **String** | Feature type | |
10
+ | **_variation** | **String** | Bucketed feature variation | |
11
+ | **eval_reason** | **String** | Evaluation reasoning | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'devcycle-server-sdk'
17
+
18
+ instance = DevCycle::Feature.new(
19
+ _id: null,
20
+ key: null,
21
+ type: null,
22
+ _variation: null,
23
+ eval_reason: null
24
+ )
25
+ ```
26
+
data/docs/UserData.md ADDED
@@ -0,0 +1,48 @@
1
+ # DevCycle::UserData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **user_id** | **String** | Unique id to identify the user | |
8
+ | **email** | **String** | User&#39;s email used to identify the user on the dashboard / target audiences | [optional] |
9
+ | **name** | **String** | User&#39;s name used to identify the user on the dashboard / target audiences | [optional] |
10
+ | **language** | **String** | User&#39;s language in ISO 639-1 format | [optional] |
11
+ | **country** | **String** | User&#39;s country in ISO 3166 alpha-2 format | [optional] |
12
+ | **app_version** | **String** | App Version of the running application | [optional] |
13
+ | **app_build** | **String** | App Build number of the running application | [optional] |
14
+ | **custom_data** | **Object** | User&#39;s custom data to target the user with, data will be logged to DevCycle for use in dashboard. | [optional] |
15
+ | **private_custom_data** | **Object** | User&#39;s custom data to target the user with, data will not be logged to DevCycle only used for feature bucketing. | [optional] |
16
+ | **created_date** | **Float** | Date the user was created, Unix epoch timestamp format | [optional] |
17
+ | **last_seen_date** | **Float** | Date the user was created, Unix epoch timestamp format | [optional] |
18
+ | **platform** | **String** | Platform the Client SDK is running on | [optional] |
19
+ | **platform_version** | **String** | Version of the platform the Client SDK is running on | [optional] |
20
+ | **device_model** | **String** | User&#39;s device model | [optional] |
21
+ | **sdk_type** | **String** | DevCycle SDK type | [optional] |
22
+ | **sdk_version** | **String** | DevCycle SDK Version | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'devcycle-server-sdk'
28
+
29
+ instance = DevCycle::UserData.new(
30
+ user_id: null,
31
+ email: null,
32
+ name: null,
33
+ language: null,
34
+ country: null,
35
+ app_version: null,
36
+ app_build: null,
37
+ custom_data: null,
38
+ private_custom_data: null,
39
+ created_date: null,
40
+ last_seen_date: null,
41
+ platform: null,
42
+ platform_version: null,
43
+ device_model: null,
44
+ sdk_type: null,
45
+ sdk_version: null
46
+ )
47
+ ```
48
+
data/docs/Variable.md ADDED
@@ -0,0 +1,24 @@
1
+ # DevCycle::Variable
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **_id** | **String** | unique database id | |
8
+ | **key** | **String** | Unique key by Project, can be used in the SDK / API to reference by &#39;key&#39; rather than _id. | |
9
+ | **type** | **String** | Variable type | |
10
+ | **value** | **Object** | Variable value can be a string, number, boolean, or JSON | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'devcycle-server-sdk'
16
+
17
+ instance = DevCycle::Variable.new(
18
+ _id: null,
19
+ key: null,
20
+ type: null,
21
+ value: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'sinatra'
4
+ gem 'sinatra-contrib'
5
+ gem 'thin'
6
+ gem 'devcycle-server-sdk', path: '../../'