launchdarkly_api 2.0.3 → 2.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +83 -92
  3. data/docs/CustomProperties.md +7 -0
  4. data/docs/CustomProperty.md +9 -0
  5. data/docs/CustomPropertyValues.md +7 -0
  6. data/docs/Environment.md +1 -0
  7. data/docs/{EnvironmentBody.md → EnvironmentPost.md} +1 -1
  8. data/docs/EnvironmentsApi.md +2 -2
  9. data/docs/FeatureFlag.md +2 -0
  10. data/docs/FeatureFlagBody.md +1 -0
  11. data/docs/FeatureFlagConfig.md +1 -0
  12. data/docs/FeatureFlagStatus.md +1 -1
  13. data/docs/FeatureFlagsApi.md +8 -3
  14. data/docs/Project.md +1 -0
  15. data/docs/ProjectBody.md +1 -0
  16. data/docs/Rule.md +1 -0
  17. data/docs/UserFlagSettings.md +1 -1
  18. data/launchdarkly_api.gemspec +2 -2
  19. data/lib/launchdarkly_api.rb +5 -2
  20. data/lib/launchdarkly_api/api/audit_log_api.rb +1 -1
  21. data/lib/launchdarkly_api/api/custom_roles_api.rb +1 -1
  22. data/lib/launchdarkly_api/api/environments_api.rb +1 -1
  23. data/lib/launchdarkly_api/api/feature_flags_api.rb +10 -6
  24. data/lib/launchdarkly_api/api/projects_api.rb +1 -1
  25. data/lib/launchdarkly_api/api/root_api.rb +1 -1
  26. data/lib/launchdarkly_api/api/team_members_api.rb +1 -1
  27. data/lib/launchdarkly_api/api/user_segments_api.rb +1 -1
  28. data/lib/launchdarkly_api/api/user_settings_api.rb +1 -1
  29. data/lib/launchdarkly_api/api/users_api.rb +1 -1
  30. data/lib/launchdarkly_api/api/webhooks_api.rb +1 -1
  31. data/lib/launchdarkly_api/api_client.rb +1 -1
  32. data/lib/launchdarkly_api/api_error.rb +1 -1
  33. data/lib/launchdarkly_api/configuration.rb +1 -1
  34. data/lib/launchdarkly_api/models/action.rb +1 -1
  35. data/lib/launchdarkly_api/models/actions.rb +1 -1
  36. data/lib/launchdarkly_api/models/audit_log_entries.rb +1 -1
  37. data/lib/launchdarkly_api/models/audit_log_entry.rb +1 -1
  38. data/lib/launchdarkly_api/models/audit_log_entry_target.rb +1 -1
  39. data/lib/launchdarkly_api/models/clause.rb +1 -1
  40. data/lib/launchdarkly_api/models/custom_properties.rb +179 -0
  41. data/lib/launchdarkly_api/models/custom_property.rb +203 -0
  42. data/lib/launchdarkly_api/models/custom_property_values.rb +179 -0
  43. data/lib/launchdarkly_api/models/custom_role.rb +1 -1
  44. data/lib/launchdarkly_api/models/custom_role_body.rb +1 -1
  45. data/lib/launchdarkly_api/models/custom_role_key_or_id.rb +1 -1
  46. data/lib/launchdarkly_api/models/custom_roles.rb +1 -1
  47. data/lib/launchdarkly_api/models/environment.rb +17 -5
  48. data/lib/launchdarkly_api/models/{environment_body.rb → environment_post.rb} +2 -2
  49. data/lib/launchdarkly_api/models/fallthrough.rb +1 -1
  50. data/lib/launchdarkly_api/models/feature_flag.rb +20 -2
  51. data/lib/launchdarkly_api/models/feature_flag_body.rb +12 -2
  52. data/lib/launchdarkly_api/models/feature_flag_config.rb +13 -2
  53. data/lib/launchdarkly_api/models/feature_flag_status.rb +2 -2
  54. data/lib/launchdarkly_api/models/feature_flag_statuses.rb +1 -1
  55. data/lib/launchdarkly_api/models/feature_flags.rb +1 -1
  56. data/lib/launchdarkly_api/models/id.rb +1 -1
  57. data/lib/launchdarkly_api/models/link.rb +1 -1
  58. data/lib/launchdarkly_api/models/links.rb +1 -1
  59. data/lib/launchdarkly_api/models/member.rb +1 -1
  60. data/lib/launchdarkly_api/models/members.rb +1 -1
  61. data/lib/launchdarkly_api/models/members_body.rb +1 -1
  62. data/lib/launchdarkly_api/models/patch_comment.rb +1 -1
  63. data/lib/launchdarkly_api/models/patch_operation.rb +1 -1
  64. data/lib/launchdarkly_api/models/policy.rb +1 -1
  65. data/lib/launchdarkly_api/models/prerequisite.rb +1 -1
  66. data/lib/launchdarkly_api/models/project.rb +17 -5
  67. data/lib/launchdarkly_api/models/project_body.rb +16 -5
  68. data/lib/launchdarkly_api/models/projects.rb +1 -1
  69. data/lib/launchdarkly_api/models/resource.rb +1 -1
  70. data/lib/launchdarkly_api/models/resources.rb +1 -1
  71. data/lib/launchdarkly_api/models/role.rb +1 -1
  72. data/lib/launchdarkly_api/models/rollout.rb +1 -1
  73. data/lib/launchdarkly_api/models/rule.rb +11 -2
  74. data/lib/launchdarkly_api/models/statement.rb +1 -1
  75. data/lib/launchdarkly_api/models/statements.rb +1 -1
  76. data/lib/launchdarkly_api/models/target.rb +1 -1
  77. data/lib/launchdarkly_api/models/user.rb +1 -1
  78. data/lib/launchdarkly_api/models/user_flag_setting.rb +1 -1
  79. data/lib/launchdarkly_api/models/user_flag_settings.rb +5 -3
  80. data/lib/launchdarkly_api/models/user_record.rb +1 -1
  81. data/lib/launchdarkly_api/models/user_segment.rb +1 -1
  82. data/lib/launchdarkly_api/models/user_segment_body.rb +1 -1
  83. data/lib/launchdarkly_api/models/user_segment_rule.rb +1 -1
  84. data/lib/launchdarkly_api/models/user_segments.rb +1 -1
  85. data/lib/launchdarkly_api/models/user_settings_body.rb +1 -1
  86. data/lib/launchdarkly_api/models/users.rb +1 -1
  87. data/lib/launchdarkly_api/models/variation.rb +1 -1
  88. data/lib/launchdarkly_api/models/webhook.rb +1 -1
  89. data/lib/launchdarkly_api/models/webhook_body.rb +1 -1
  90. data/lib/launchdarkly_api/models/webhooks.rb +1 -1
  91. data/lib/launchdarkly_api/models/weighted_variation.rb +1 -1
  92. data/lib/launchdarkly_api/version.rb +2 -2
  93. data/openapi.yml +2082 -0
  94. data/spec/api/audit_log_api_spec.rb +1 -1
  95. data/spec/api/custom_roles_api_spec.rb +1 -1
  96. data/spec/api/environments_api_spec.rb +1 -1
  97. data/spec/api/feature_flags_api_spec.rb +3 -2
  98. data/spec/api/projects_api_spec.rb +1 -1
  99. data/spec/api/root_api_spec.rb +1 -1
  100. data/spec/api/team_members_api_spec.rb +1 -1
  101. data/spec/api/user_segments_api_spec.rb +1 -1
  102. data/spec/api/user_settings_api_spec.rb +1 -1
  103. data/spec/api/users_api_spec.rb +1 -1
  104. data/spec/api/webhooks_api_spec.rb +1 -1
  105. data/spec/api_client_spec.rb +1 -1
  106. data/spec/configuration_spec.rb +1 -1
  107. data/spec/models/action_spec.rb +1 -1
  108. data/spec/models/actions_spec.rb +1 -1
  109. data/spec/models/audit_log_entries_spec.rb +1 -1
  110. data/spec/models/audit_log_entry_spec.rb +1 -1
  111. data/spec/models/audit_log_entry_target_spec.rb +1 -1
  112. data/spec/models/clause_spec.rb +1 -1
  113. data/spec/models/custom_properties_spec.rb +36 -0
  114. data/spec/models/custom_property_spec.rb +48 -0
  115. data/spec/models/custom_property_values_spec.rb +36 -0
  116. data/spec/models/custom_role_body_spec.rb +1 -1
  117. data/spec/models/custom_role_key_or_id_spec.rb +1 -1
  118. data/spec/models/custom_role_spec.rb +1 -1
  119. data/spec/models/custom_roles_spec.rb +1 -1
  120. data/spec/models/{environment_body_spec.rb → environment_post_spec.rb} +7 -7
  121. data/spec/models/environment_spec.rb +7 -1
  122. data/spec/models/fallthrough_spec.rb +1 -1
  123. data/spec/models/feature_flag_body_spec.rb +7 -1
  124. data/spec/models/feature_flag_config_spec.rb +7 -1
  125. data/spec/models/feature_flag_spec.rb +13 -1
  126. data/spec/models/feature_flag_status_spec.rb +1 -1
  127. data/spec/models/feature_flag_statuses_spec.rb +1 -1
  128. data/spec/models/feature_flags_spec.rb +1 -1
  129. data/spec/models/id_spec.rb +1 -1
  130. data/spec/models/link_spec.rb +1 -1
  131. data/spec/models/links_spec.rb +1 -1
  132. data/spec/models/member_spec.rb +1 -1
  133. data/spec/models/members_body_spec.rb +1 -1
  134. data/spec/models/members_spec.rb +1 -1
  135. data/spec/models/patch_comment_spec.rb +1 -1
  136. data/spec/models/patch_operation_spec.rb +1 -1
  137. data/spec/models/policy_spec.rb +1 -1
  138. data/spec/models/prerequisite_spec.rb +1 -1
  139. data/spec/models/project_body_spec.rb +7 -1
  140. data/spec/models/project_spec.rb +7 -1
  141. data/spec/models/projects_spec.rb +1 -1
  142. data/spec/models/resource_spec.rb +1 -1
  143. data/spec/models/resources_spec.rb +1 -1
  144. data/spec/models/role_spec.rb +1 -1
  145. data/spec/models/rollout_spec.rb +1 -1
  146. data/spec/models/rule_spec.rb +7 -1
  147. data/spec/models/statement_spec.rb +1 -1
  148. data/spec/models/statements_spec.rb +1 -1
  149. data/spec/models/target_spec.rb +1 -1
  150. data/spec/models/user_flag_setting_spec.rb +1 -1
  151. data/spec/models/user_flag_settings_spec.rb +1 -1
  152. data/spec/models/user_record_spec.rb +1 -1
  153. data/spec/models/user_segment_body_spec.rb +1 -1
  154. data/spec/models/user_segment_rule_spec.rb +1 -1
  155. data/spec/models/user_segment_spec.rb +1 -1
  156. data/spec/models/user_segments_spec.rb +1 -1
  157. data/spec/models/user_settings_body_spec.rb +1 -1
  158. data/spec/models/user_spec.rb +1 -1
  159. data/spec/models/users_spec.rb +1 -1
  160. data/spec/models/variation_spec.rb +1 -1
  161. data/spec/models/webhook_body_spec.rb +1 -1
  162. data/spec/models/webhook_spec.rb +1 -1
  163. data/spec/models/webhooks_spec.rb +1 -1
  164. data/spec/models/weighted_variation_spec.rb +1 -1
  165. data/spec/spec_helper.rb +1 -1
  166. metadata +69 -61
  167. data/Gemfile.lock +0 -69
  168. data/launchdarkly_api-2.0.2.gem +0 -0
  169. data/lib/.DS_Store +0 -0
  170. data/lib/swagger_client/.DS_Store +0 -0
  171. data/test.rb +0 -50
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e5a22af9605471158295cb1d2ac8cc5217bdab29
4
- data.tar.gz: e97ffa8b1be31ab648c7362ad911140acacc1609
2
+ SHA256:
3
+ metadata.gz: 58e814db548b96f9a785ab3fbb27e271dc7a142d6ef0752557f5d3c1c7c34469
4
+ data.tar.gz: 8f005f60dbf6b3d412a894dcada747aab5b693a1e151d115bc6bb094d9a36a58
5
5
  SHA512:
6
- metadata.gz: d2b1716648e56ad03a0c0c1a4370cda2341e75fa902f1092196d1518ce9ce0cf2080b7e13ce5b4d7bb864dd948383d4ea7eecb2d16cf4ac90147c442c974b449
7
- data.tar.gz: fda9a4ea0b8b98d3a884ddd5770018a27682020ce4e61f54765fc260cff1409ce43aafd350bdef7e8fd451b3ac6b1bd643df2d19299458fb109384b884d97a69
6
+ metadata.gz: 3c2f5a59e56c92a4d7f4249839aa0dbe1353eb79dfc9ea81637a4d34afa12463369b179ba4b50ff6eefcaa0c5913a94bee2571847078f60368efb5cf2ea166ca
7
+ data.tar.gz: 2bf44a75f0f1f99b7fb872538dadd878dd31b11352b43118edc271871d7cc9761650770691a777417a5501209427ff4899fed3c8605a6e04def2794795b62f3e
data/README.md CHANGED
@@ -1,142 +1,89 @@
1
1
  This repository contains a client library for LaunchDarkly's REST API. This client was automatically
2
2
  generated from our [OpenAPI specification](https://github.com/launchdarkly/ld-openapi).
3
3
 
4
- This REST API is for custom integrations, data export, or automating your feature flag workflows. *DO NOT* use this client library to add feature flags to your web or mobile application. To integrate feature flags with your application, please see the [SDK documentation](https://docs.launchdarkly.com/v2.0/docs)
4
+ This REST API is for custom integrations, data export, or automating your feature flag workflows. *DO NOT* use this client library to include feature flags in your web or mobile application. To integrate feature flags with your application, please see the [SDK documentation](https://docs.launchdarkly.com/v2.0/docs)
5
5
 
6
6
  # launchdarkly_api
7
7
 
8
- `launchdarkly_api` - the Ruby gem for the LaunchDarkly REST API
8
+ LaunchDarklyApi - the Ruby gem for the LaunchDarkly REST API
9
9
 
10
10
  Build custom integrations with the LaunchDarkly REST API
11
11
 
12
12
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
13
13
 
14
- - API version: 2.0.3
15
- - Package version: 1.0.0
14
+ - API version: 2.0.10
15
+ - Package version: 2.0.10
16
16
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
17
17
  For more information, please visit [https://support.launchdarkly.com](https://support.launchdarkly.com)
18
18
 
19
19
  ## Installation
20
20
 
21
- In the steps shown below, substitute the current API version where you see `VERSION`.
21
+ ### Build a gem
22
22
 
23
- ### To use the latest release from RubyGems
24
-
25
- Add this to your Gemfile:
26
-
27
- gem 'launchdarkly_api', '~> VERSION'
28
-
29
- ### To use source code from Git
30
-
31
- Use this method if you want to use an alternate branch or a fork from Git. Add the following in the Gemfile:
32
-
33
- gem 'launchdarkly_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
34
-
35
- ### To build the gem locally
36
-
37
- Check out the source code, then build it:
23
+ To build the Ruby code into a gem:
38
24
 
39
25
  ```shell
40
26
  gem build launchdarkly_api.gemspec
41
27
  ```
42
28
 
43
- Then install the gem locally:
29
+ Then either install the gem locally:
44
30
 
45
31
  ```shell
46
- gem install ./launchdarkly-api-VERSION.gem
47
- # To include development dependencies, use gem install --dev
32
+ gem install ./launchdarkly_api-2.0.10.gem
48
33
  ```
34
+ (for development, run `gem install --dev ./launchdarkly_api-2.0.10.gem` to install the development dependencies)
49
35
 
50
- Finally add this to the Gemfile:
51
-
52
- gem 'launchdarkly_api', '~> VERSION'
53
-
54
- ## Usage examples
36
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
55
37
 
56
- ### Getting the name and description of a feature flag
57
-
58
- ```ruby
59
- require 'launchdarkly_api'
60
-
61
- api_key = 'put a valid API key for your account here'
62
- project_key = 'put the key of your project here'
63
- flag_key = 'put the key of a feature flag here'
64
-
65
- LaunchDarklyApi.configure do |config|
66
- config.api_key['Authorization'] = api_key
67
- end
68
-
69
- flag_api = LaunchDarklyApi::FeatureFlagsApi.new
70
-
71
- begin
72
- flag = flag_api.get_feature_flag(project_key, flag_key)
73
- puts "Flag key: #{flag_key}, name: #{flag.name}, description: #{flag.description}"
74
- rescue LaunchDarklyApi::ApiError => e
75
- puts "API returned error: #{e.message} #{e.response_body}"
76
- end
77
- ```
38
+ Finally add this to the Gemfile:
78
39
 
79
- ### Modifying a feature flag
40
+ gem 'launchdarkly_api', '~> 2.0.10'
80
41
 
81
- ```ruby
82
- require 'launchdarkly_api'
42
+ ### Install from Git
83
43
 
84
- api_key = 'put a valid API key for your account here'
85
- project_key = 'put the key of your project here'
86
- environment_key = 'the key of the environment where you want to change the flag'
87
- flag_key = 'put the key of a feature flag here'
44
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
88
45
 
89
- LaunchDarklyApi.configure do |config|
90
- config.api_key['Authorization'] = api_key
91
- end
46
+ gem 'launchdarkly_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
92
47
 
93
- flag_api = LaunchDarklyApi::FeatureFlagsApi.new
48
+ ### Include the Ruby code directly
94
49
 
95
- # This example turns on targeting for the specified flag.
96
- # Properties are modified with JSON Patch syntax - http://jsonpatch.com/
97
- # Note that all environment-specific properties have a path prefix that includes the environment key.
98
- property_path = "/environments/#{environment_key}/on"
99
- new_value = true
100
- patches = [ LaunchDarklyApi::PatchOperation.new(op: 'replace', path: property_path, value: new_value) ]
101
- patch_and_comment = LaunchDarklyApi::PatchComment.new(patch: patches, comment: 'turning flag on')
50
+ Include the Ruby code directly using `-I` as follows:
102
51
 
103
- begin
104
- flag_api.patch_feature_flag(project_key, flag_key, patch_and_comment)
105
- rescue LaunchDarklyApi::ApiError => e
106
- puts "API returned error: #{e.message} #{e.response_body}"
107
- end
52
+ ```shell
53
+ ruby -Ilib script.rb
108
54
  ```
109
55
 
110
- ### Querying the audit log
56
+ ## Getting Started
111
57
 
58
+ Please follow the [installation](#installation) procedure and then run the following code:
112
59
  ```ruby
113
60
  # Load the gem
114
61
  require 'launchdarkly_api'
115
62
 
116
- api_key = 'put a valid API key for your account here'
117
-
63
+ # Setup authorization
118
64
  LaunchDarklyApi.configure do |config|
119
- config.api_key['Authorization'] = api_key
65
+ # Configure API key authorization: Token
66
+ config.api_key['Authorization'] = 'YOUR API KEY'
67
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
68
+ #config.api_key_prefix['Authorization'] = 'Bearer'
120
69
  end
121
70
 
122
- audit_log_api = LaunchDarklyApi::AuditLogApi.new
123
-
124
- current_time_millis = (Time.now.to_f * 1000).to_i
125
- one_hour_ago = current_time_millis - (60 * 60 * 1000)
71
+ api_instance = LaunchDarklyApi::AuditLogApi.new
126
72
 
127
- opts = {
128
- after: one_hour_ago,
129
- limit: 10
130
- } # see API documentation for other options you can use here
73
+ opts = {
74
+ before: 8.14, # Float | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp.
75
+ after: 8.14, # Float | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occured after this timestamp.
76
+ q: "q_example", # String | Text to search for. You can search for the full or partial name of the resource involved or fullpartial email address of the member who made the change.
77
+ limit: 8.14, # Float | A limit on the number of audit log entries to be returned, between 1 and 20.
78
+ spec: "spec_example" # String | A resource specifier, allowing you to filter audit log listings by resource.
79
+ }
131
80
 
132
81
  begin
133
- result = audit_log_api.get_audit_log_entries(opts)
134
- puts "Audit log entries from the last hour:"
135
- result.items.each { |item|
136
- puts item.title
137
- }
82
+ #Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
83
+ result = api_instance.get_audit_log_entries(opts)
84
+ p result
138
85
  rescue LaunchDarklyApi::ApiError => e
139
- puts "API returned error: #{e.message} #{e.response_body}"
86
+ puts "Exception when calling AuditLogApi->get_audit_log_entries: #{e}"
140
87
  end
141
88
 
142
89
  ```
@@ -203,12 +150,15 @@ Class | Method | HTTP request | Description
203
150
  - [LaunchDarklyApi::AuditLogEntry](docs/AuditLogEntry.md)
204
151
  - [LaunchDarklyApi::AuditLogEntryTarget](docs/AuditLogEntryTarget.md)
205
152
  - [LaunchDarklyApi::Clause](docs/Clause.md)
153
+ - [LaunchDarklyApi::CustomProperties](docs/CustomProperties.md)
154
+ - [LaunchDarklyApi::CustomProperty](docs/CustomProperty.md)
155
+ - [LaunchDarklyApi::CustomPropertyValues](docs/CustomPropertyValues.md)
206
156
  - [LaunchDarklyApi::CustomRole](docs/CustomRole.md)
207
157
  - [LaunchDarklyApi::CustomRoleBody](docs/CustomRoleBody.md)
208
158
  - [LaunchDarklyApi::CustomRoleKeyOrId](docs/CustomRoleKeyOrId.md)
209
159
  - [LaunchDarklyApi::CustomRoles](docs/CustomRoles.md)
210
160
  - [LaunchDarklyApi::Environment](docs/Environment.md)
211
- - [LaunchDarklyApi::EnvironmentBody](docs/EnvironmentBody.md)
161
+ - [LaunchDarklyApi::EnvironmentPost](docs/EnvironmentPost.md)
212
162
  - [LaunchDarklyApi::Fallthrough](docs/Fallthrough.md)
213
163
  - [LaunchDarklyApi::FeatureFlag](docs/FeatureFlag.md)
214
164
  - [LaunchDarklyApi::FeatureFlagBody](docs/FeatureFlagBody.md)
@@ -262,3 +212,44 @@ Class | Method | HTTP request | Description
262
212
  - **Type**: API key
263
213
  - **API key parameter name**: Authorization
264
214
  - **Location**: HTTP header
215
+
216
+ ## Sample Code
217
+
218
+ ```
219
+ # Load the gem
220
+ require 'launchdarkly_api'
221
+
222
+ # Setup authorization
223
+ LaunchDarklyApi.configure do |config|
224
+ config.api_key['Authorization'] = ENV['LD_API_KEY']
225
+ end
226
+
227
+ api_instance = LaunchDarklyApi::FeatureFlagsApi.new
228
+
229
+ project_key = "openapi"
230
+ flag_key = "test-ruby"
231
+
232
+ # Create a flag with a json variations
233
+ body = LaunchDarklyApi::FeatureFlagBody.new(
234
+ name: "test-ruby",
235
+ key: flag_key,
236
+ variations: [
237
+ LaunchDarklyApi::Variation.new(value=[1,2]),
238
+ LaunchDarklyApi::Variation.new(value=[3,4]),
239
+ LaunchDarklyApi::Variation.new(value=[5]),
240
+ ])
241
+
242
+ begin
243
+ result = api_instance.post_feature_flag(project_key, body)
244
+ p result
245
+ rescue LaunchDarklyApi::ApiError => e
246
+ puts "Exception creating feature flag: #{e}"
247
+ end
248
+
249
+ # Clean up new flag
250
+ begin
251
+ result = api_instance.delete_feature_flag(project_key, flag_key)
252
+ p result
253
+ rescue LaunchDarklyApi::ApiError => e
254
+ puts "Exception deleting feature flag: #{e}"
255
+ end```
@@ -0,0 +1,7 @@
1
+ # LaunchDarklyApi::CustomProperties
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,9 @@
1
+ # LaunchDarklyApi::CustomProperty
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | The name of the property. |
7
+ **value** | [**CustomPropertyValues**](CustomPropertyValues.md) | | [optional]
8
+
9
+
@@ -0,0 +1,7 @@
1
+ # LaunchDarklyApi::CustomPropertyValues
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
data/docs/Environment.md CHANGED
@@ -13,5 +13,6 @@ Name | Type | Description | Notes
13
13
  **default_ttl** | **Float** | The default TTL. | [optional]
14
14
  **secure_mode** | **BOOLEAN** | Determines if this environment is in safe mode. | [optional]
15
15
  **default_track_events** | **BOOLEAN** | Set to true to send detailed event information for new flags. | [optional]
16
+ **tags** | **Array<String>** | An array of tags for this environment. | [optional]
16
17
 
17
18
 
@@ -1,4 +1,4 @@
1
- # LaunchDarklyApi::EnvironmentBody
1
+ # LaunchDarklyApi::EnvironmentPost
2
2
 
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
@@ -198,7 +198,7 @@ api_instance = LaunchDarklyApi::EnvironmentsApi.new
198
198
 
199
199
  project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
200
200
 
201
- environment_body = LaunchDarklyApi::EnvironmentBody.new # EnvironmentBody | New environment.
201
+ environment_body = LaunchDarklyApi::EnvironmentPost.new # EnvironmentPost | New environment.
202
202
 
203
203
 
204
204
  begin
@@ -214,7 +214,7 @@ end
214
214
  Name | Type | Description | Notes
215
215
  ------------- | ------------- | ------------- | -------------
216
216
  **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
217
- **environment_body** | [**EnvironmentBody**](EnvironmentBody.md)| New environment. |
217
+ **environment_body** | [**EnvironmentPost**](EnvironmentPost.md)| New environment. |
218
218
 
219
219
  ### Return type
220
220
 
data/docs/FeatureFlag.md CHANGED
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
13
13
  **maintainer_id** | **String** | The ID of the member that should maintain this flag. | [optional]
14
14
  **tags** | **Array<String>** | An array of tags for this feature flag. | [optional]
15
15
  **variations** | [**Array<Variation>**](Variation.md) | The variations for this feature flag. | [optional]
16
+ **_version** | **Integer** | | [optional]
17
+ **custom_properties** | [**CustomProperties**](CustomProperties.md) | | [optional]
16
18
  **_links** | [**Links**](Links.md) | | [optional]
17
19
  **_maintainer** | [**Member**](Member.md) | | [optional]
18
20
  **environments** | [**Hash<String, FeatureFlagConfig>**](FeatureFlagConfig.md) | | [optional]
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **name** | **String** | A human-friendly name for the feature flag. Remember to note if this flag is intended to be temporary or permanent. |
7
7
  **key** | **String** | A unique key that will be used to reference the flag in your code. |
8
+ **description** | **String** | A description of the feature flag. | [optional]
8
9
  **variations** | [**Array<Variation>**](Variation.md) | An array of possible variations for the flag. |
9
10
  **temporary** | **BOOLEAN** | Whether or not the flag is a temporary flag. | [optional]
10
11
  **tags** | **Array<String>** | Tags for the feature flag. | [optional]
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
10
10
  **last_modified** | **Integer** | | [optional]
11
11
  **version** | **Integer** | | [optional]
12
12
  **targets** | [**Array<Target>**](Target.md) | | [optional]
13
+ **goal_ids** | **Array<String>** | | [optional]
13
14
  **rules** | [**Array<Rule>**](Rule.md) | | [optional]
14
15
  **fallthrough** | [**Fallthrough**](Fallthrough.md) | | [optional]
15
16
  **off_variation** | **Integer** | | [optional]
@@ -6,6 +6,6 @@ Name | Type | Description | Notes
6
6
  **_links** | [**Links**](Links.md) | | [optional]
7
7
  **name** | **String** | | Name | Description | | --------:| ----------- | | new | the feature flag was created within the last 7 days, and has not been requested yet | | active | the feature flag was requested by your servers or clients within the last 7 days | | inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days | | launched | one variation of the feature flag has been rolled out to all your users for at least 7 days | | [optional]
8
8
  **last_requested** | **String** | | [optional]
9
- **default** | **BOOLEAN** | | [optional]
9
+ **default** | **Object** | | [optional]
10
10
 
11
11
 
@@ -356,7 +356,7 @@ Name | Type | Description | Notes
356
356
 
357
357
 
358
358
  # **post_feature_flag**
359
- > post_feature_flag(project_key, feature_flag_body)
359
+ > FeatureFlag post_feature_flag(project_key, feature_flag_body, opts)
360
360
 
361
361
  Creates a new feature flag.
362
362
 
@@ -378,10 +378,14 @@ project_key = "project_key_example" # String | The project key, used to tie the
378
378
 
379
379
  feature_flag_body = LaunchDarklyApi::FeatureFlagBody.new # FeatureFlagBody | Create a new feature flag.
380
380
 
381
+ opts = {
382
+ clone: "clone_example" # String | The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone=flagKey will copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag.
383
+ }
381
384
 
382
385
  begin
383
386
  #Creates a new feature flag.
384
- api_instance.post_feature_flag(project_key, feature_flag_body)
387
+ result = api_instance.post_feature_flag(project_key, feature_flag_body, opts)
388
+ p result
385
389
  rescue LaunchDarklyApi::ApiError => e
386
390
  puts "Exception when calling FeatureFlagsApi->post_feature_flag: #{e}"
387
391
  end
@@ -393,10 +397,11 @@ Name | Type | Description | Notes
393
397
  ------------- | ------------- | ------------- | -------------
394
398
  **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
395
399
  **feature_flag_body** | [**FeatureFlagBody**](FeatureFlagBody.md)| Create a new feature flag. |
400
+ **clone** | **String**| The key of the feature flag to be cloned. The key identifies the flag in your code. For example, setting clone=flagKey will copy the full targeting configuration for all environments (including on/off state) from the original flag to the new flag. | [optional]
396
401
 
397
402
  ### Return type
398
403
 
399
- nil (empty response body)
404
+ [**FeatureFlag**](FeatureFlag.md)
400
405
 
401
406
  ### Authorization
402
407
 
data/docs/Project.md CHANGED
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
8
8
  **key** | **String** | | [optional]
9
9
  **name** | **String** | | [optional]
10
10
  **environments** | [**Array<Environment>**](Environment.md) | | [optional]
11
+ **tags** | **Array<String>** | An array of tags for this project. | [optional]
11
12
 
12
13
 
data/docs/ProjectBody.md CHANGED
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **name** | **String** | |
7
7
  **key** | **String** | |
8
+ **environments** | [**Array<EnvironmentPost>**](EnvironmentPost.md) | | [optional]
8
9
 
9
10
 
data/docs/Rule.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **_id** | **String** | | [optional]
6
7
  **variation** | **Integer** | | [optional]
7
8
  **rollout** | [**Rollout**](Rollout.md) | | [optional]
8
9
  **clauses** | [**Array<Clause>**](Clause.md) | | [optional]
@@ -4,6 +4,6 @@
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **_links** | [**Links**](Links.md) | | [optional]
7
- **items** | **Object** | | [optional]
7
+ **items** | [**Hash<String, UserFlagSetting>**](UserFlagSetting.md) | | [optional]
8
8
 
9
9
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  #Build custom integrations with the LaunchDarkly REST API
7
7
 
8
- OpenAPI spec version: 2.0.3
8
+ OpenAPI spec version: 2.0.10
9
9
  Contact: support@launchdarkly.com
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  Swagger Codegen version: 2.3.1
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.name = "launchdarkly_api"
20
20
  s.version = LaunchDarklyApi::VERSION
21
21
  s.platform = Gem::Platform::RUBY
22
- s.authors = ["Swagger-Codegen"]
22
+ s.authors = ["LaunchDarkly"]
23
23
  s.email = ["support@launchdarkly.com"]
24
24
  s.homepage = "https://github.com/launchdarkly/api-client-ruby"
25
25
  s.summary = "LaunchDarkly REST API Ruby Gem"