launchdarkly_api 2.0.3

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 (219) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +69 -0
  4. data/LICENSE.txt +13 -0
  5. data/README.md +264 -0
  6. data/Rakefile +8 -0
  7. data/docs/Action.md +7 -0
  8. data/docs/Actions.md +7 -0
  9. data/docs/AuditLogApi.md +123 -0
  10. data/docs/AuditLogEntries.md +9 -0
  11. data/docs/AuditLogEntry.md +19 -0
  12. data/docs/AuditLogEntryTarget.md +10 -0
  13. data/docs/Clause.md +11 -0
  14. data/docs/CustomRole.md +13 -0
  15. data/docs/CustomRoleBody.md +11 -0
  16. data/docs/CustomRoleKeyOrId.md +7 -0
  17. data/docs/CustomRoles.md +9 -0
  18. data/docs/CustomRolesApi.md +268 -0
  19. data/docs/Environment.md +17 -0
  20. data/docs/EnvironmentBody.md +11 -0
  21. data/docs/EnvironmentsApi.md +233 -0
  22. data/docs/Fallthrough.md +9 -0
  23. data/docs/FeatureFlag.md +20 -0
  24. data/docs/FeatureFlagBody.md +13 -0
  25. data/docs/FeatureFlagConfig.md +19 -0
  26. data/docs/FeatureFlagStatus.md +11 -0
  27. data/docs/FeatureFlagStatuses.md +9 -0
  28. data/docs/FeatureFlags.md +9 -0
  29. data/docs/FeatureFlagsApi.md +411 -0
  30. data/docs/Id.md +7 -0
  31. data/docs/Link.md +9 -0
  32. data/docs/Links.md +9 -0
  33. data/docs/Member.md +14 -0
  34. data/docs/Members.md +9 -0
  35. data/docs/MembersBody.md +13 -0
  36. data/docs/PatchComment.md +9 -0
  37. data/docs/PatchOperation.md +10 -0
  38. data/docs/Policy.md +10 -0
  39. data/docs/Prerequisite.md +9 -0
  40. data/docs/Project.md +12 -0
  41. data/docs/ProjectBody.md +9 -0
  42. data/docs/Projects.md +9 -0
  43. data/docs/ProjectsApi.md +268 -0
  44. data/docs/Resource.md +7 -0
  45. data/docs/Resources.md +7 -0
  46. data/docs/Role.md +7 -0
  47. data/docs/Rollout.md +8 -0
  48. data/docs/RootApi.md +56 -0
  49. data/docs/Rule.md +10 -0
  50. data/docs/Statement.md +12 -0
  51. data/docs/Statements.md +7 -0
  52. data/docs/Target.md +9 -0
  53. data/docs/TeamMembersApi.md +268 -0
  54. data/docs/User.md +18 -0
  55. data/docs/UserFlagSetting.md +10 -0
  56. data/docs/UserFlagSettings.md +9 -0
  57. data/docs/UserRecord.md +12 -0
  58. data/docs/UserSegment.md +17 -0
  59. data/docs/UserSegmentBody.md +11 -0
  60. data/docs/UserSegmentRule.md +10 -0
  61. data/docs/UserSegments.md +9 -0
  62. data/docs/UserSegmentsApi.md +305 -0
  63. data/docs/UserSettingsApi.md +193 -0
  64. data/docs/UserSettingsBody.md +8 -0
  65. data/docs/Users.md +10 -0
  66. data/docs/UsersApi.md +255 -0
  67. data/docs/Variation.md +10 -0
  68. data/docs/Webhook.md +14 -0
  69. data/docs/WebhookBody.md +12 -0
  70. data/docs/Webhooks.md +9 -0
  71. data/docs/WebhooksApi.md +268 -0
  72. data/docs/WeightedVariation.md +9 -0
  73. data/git_push.sh +55 -0
  74. data/launchdarkly_api-2.0.2.gem +0 -0
  75. data/launchdarkly_api.gemspec +46 -0
  76. data/lib/.DS_Store +0 -0
  77. data/lib/launchdarkly_api/api/audit_log_api.rb +142 -0
  78. data/lib/launchdarkly_api/api/custom_roles_api.rb +296 -0
  79. data/lib/launchdarkly_api/api/environments_api.rb +271 -0
  80. data/lib/launchdarkly_api/api/feature_flags_api.rb +463 -0
  81. data/lib/launchdarkly_api/api/projects_api.rb +296 -0
  82. data/lib/launchdarkly_api/api/root_api.rb +72 -0
  83. data/lib/launchdarkly_api/api/team_members_api.rb +296 -0
  84. data/lib/launchdarkly_api/api/user_segments_api.rb +359 -0
  85. data/lib/launchdarkly_api/api/user_settings_api.rb +241 -0
  86. data/lib/launchdarkly_api/api/users_api.rb +299 -0
  87. data/lib/launchdarkly_api/api/webhooks_api.rb +296 -0
  88. data/lib/launchdarkly_api/api_client.rb +389 -0
  89. data/lib/launchdarkly_api/api_error.rb +38 -0
  90. data/lib/launchdarkly_api/configuration.rb +209 -0
  91. data/lib/launchdarkly_api/models/action.rb +179 -0
  92. data/lib/launchdarkly_api/models/actions.rb +179 -0
  93. data/lib/launchdarkly_api/models/audit_log_entries.rb +199 -0
  94. data/lib/launchdarkly_api/models/audit_log_entry.rb +287 -0
  95. data/lib/launchdarkly_api/models/audit_log_entry_target.rb +208 -0
  96. data/lib/launchdarkly_api/models/clause.rb +217 -0
  97. data/lib/launchdarkly_api/models/custom_role.rb +237 -0
  98. data/lib/launchdarkly_api/models/custom_role_body.rb +234 -0
  99. data/lib/launchdarkly_api/models/custom_role_key_or_id.rb +179 -0
  100. data/lib/launchdarkly_api/models/custom_roles.rb +197 -0
  101. data/lib/launchdarkly_api/models/environment.rb +277 -0
  102. data/lib/launchdarkly_api/models/environment_body.rb +234 -0
  103. data/lib/launchdarkly_api/models/fallthrough.rb +197 -0
  104. data/lib/launchdarkly_api/models/feature_flag.rb +310 -0
  105. data/lib/launchdarkly_api/models/feature_flag_body.rb +258 -0
  106. data/lib/launchdarkly_api/models/feature_flag_config.rb +294 -0
  107. data/lib/launchdarkly_api/models/feature_flag_status.rb +249 -0
  108. data/lib/launchdarkly_api/models/feature_flag_statuses.rb +199 -0
  109. data/lib/launchdarkly_api/models/feature_flags.rb +199 -0
  110. data/lib/launchdarkly_api/models/id.rb +179 -0
  111. data/lib/launchdarkly_api/models/link.rb +197 -0
  112. data/lib/launchdarkly_api/models/links.rb +197 -0
  113. data/lib/launchdarkly_api/models/member.rb +244 -0
  114. data/lib/launchdarkly_api/models/members.rb +197 -0
  115. data/lib/launchdarkly_api/models/members_body.rb +240 -0
  116. data/lib/launchdarkly_api/models/patch_comment.rb +199 -0
  117. data/lib/launchdarkly_api/models/patch_operation.rb +221 -0
  118. data/lib/launchdarkly_api/models/policy.rb +207 -0
  119. data/lib/launchdarkly_api/models/prerequisite.rb +197 -0
  120. data/lib/launchdarkly_api/models/project.rb +226 -0
  121. data/lib/launchdarkly_api/models/project_body.rb +207 -0
  122. data/lib/launchdarkly_api/models/projects.rb +199 -0
  123. data/lib/launchdarkly_api/models/resource.rb +179 -0
  124. data/lib/launchdarkly_api/models/resources.rb +179 -0
  125. data/lib/launchdarkly_api/models/role.rb +33 -0
  126. data/lib/launchdarkly_api/models/rollout.rb +190 -0
  127. data/lib/launchdarkly_api/models/rule.rb +208 -0
  128. data/lib/launchdarkly_api/models/statement.rb +259 -0
  129. data/lib/launchdarkly_api/models/statements.rb +179 -0
  130. data/lib/launchdarkly_api/models/target.rb +199 -0
  131. data/lib/launchdarkly_api/models/user.rb +278 -0
  132. data/lib/launchdarkly_api/models/user_flag_setting.rb +208 -0
  133. data/lib/launchdarkly_api/models/user_flag_settings.rb +197 -0
  134. data/lib/launchdarkly_api/models/user_record.rb +224 -0
  135. data/lib/launchdarkly_api/models/user_segment.rb +300 -0
  136. data/lib/launchdarkly_api/models/user_segment_body.rb +231 -0
  137. data/lib/launchdarkly_api/models/user_segment_rule.rb +208 -0
  138. data/lib/launchdarkly_api/models/user_segments.rb +199 -0
  139. data/lib/launchdarkly_api/models/user_settings_body.rb +189 -0
  140. data/lib/launchdarkly_api/models/users.rb +208 -0
  141. data/lib/launchdarkly_api/models/variation.rb +211 -0
  142. data/lib/launchdarkly_api/models/webhook.rb +249 -0
  143. data/lib/launchdarkly_api/models/webhook_body.rb +244 -0
  144. data/lib/launchdarkly_api/models/webhooks.rb +199 -0
  145. data/lib/launchdarkly_api/models/weighted_variation.rb +197 -0
  146. data/lib/launchdarkly_api/version.rb +15 -0
  147. data/lib/launchdarkly_api.rb +105 -0
  148. data/lib/swagger_client/.DS_Store +0 -0
  149. data/spec/api/audit_log_api_spec.rb +63 -0
  150. data/spec/api/custom_roles_api_spec.rb +95 -0
  151. data/spec/api/environments_api_spec.rb +88 -0
  152. data/spec/api/feature_flags_api_spec.rb +130 -0
  153. data/spec/api/projects_api_spec.rb +95 -0
  154. data/spec/api/root_api_spec.rb +46 -0
  155. data/spec/api/team_members_api_spec.rb +95 -0
  156. data/spec/api/user_segments_api_spec.rb +106 -0
  157. data/spec/api/user_settings_api_spec.rb +80 -0
  158. data/spec/api/users_api_spec.rb +96 -0
  159. data/spec/api/webhooks_api_spec.rb +95 -0
  160. data/spec/api_client_spec.rb +226 -0
  161. data/spec/configuration_spec.rb +42 -0
  162. data/spec/models/action_spec.rb +36 -0
  163. data/spec/models/actions_spec.rb +36 -0
  164. data/spec/models/audit_log_entries_spec.rb +48 -0
  165. data/spec/models/audit_log_entry_spec.rb +108 -0
  166. data/spec/models/audit_log_entry_target_spec.rb +54 -0
  167. data/spec/models/clause_spec.rb +60 -0
  168. data/spec/models/custom_role_body_spec.rb +60 -0
  169. data/spec/models/custom_role_key_or_id_spec.rb +36 -0
  170. data/spec/models/custom_role_spec.rb +72 -0
  171. data/spec/models/custom_roles_spec.rb +48 -0
  172. data/spec/models/environment_body_spec.rb +60 -0
  173. data/spec/models/environment_spec.rb +96 -0
  174. data/spec/models/fallthrough_spec.rb +48 -0
  175. data/spec/models/feature_flag_body_spec.rb +72 -0
  176. data/spec/models/feature_flag_config_spec.rb +108 -0
  177. data/spec/models/feature_flag_spec.rb +114 -0
  178. data/spec/models/feature_flag_status_spec.rb +64 -0
  179. data/spec/models/feature_flag_statuses_spec.rb +48 -0
  180. data/spec/models/feature_flags_spec.rb +48 -0
  181. data/spec/models/id_spec.rb +36 -0
  182. data/spec/models/link_spec.rb +48 -0
  183. data/spec/models/links_spec.rb +48 -0
  184. data/spec/models/member_spec.rb +78 -0
  185. data/spec/models/members_body_spec.rb +72 -0
  186. data/spec/models/members_spec.rb +48 -0
  187. data/spec/models/patch_comment_spec.rb +48 -0
  188. data/spec/models/patch_operation_spec.rb +54 -0
  189. data/spec/models/policy_spec.rb +54 -0
  190. data/spec/models/prerequisite_spec.rb +48 -0
  191. data/spec/models/project_body_spec.rb +48 -0
  192. data/spec/models/project_spec.rb +66 -0
  193. data/spec/models/projects_spec.rb +48 -0
  194. data/spec/models/resource_spec.rb +36 -0
  195. data/spec/models/resources_spec.rb +36 -0
  196. data/spec/models/role_spec.rb +36 -0
  197. data/spec/models/rollout_spec.rb +42 -0
  198. data/spec/models/rule_spec.rb +54 -0
  199. data/spec/models/statement_spec.rb +70 -0
  200. data/spec/models/statements_spec.rb +36 -0
  201. data/spec/models/target_spec.rb +48 -0
  202. data/spec/models/user_flag_setting_spec.rb +54 -0
  203. data/spec/models/user_flag_settings_spec.rb +48 -0
  204. data/spec/models/user_record_spec.rb +66 -0
  205. data/spec/models/user_segment_body_spec.rb +60 -0
  206. data/spec/models/user_segment_rule_spec.rb +54 -0
  207. data/spec/models/user_segment_spec.rb +96 -0
  208. data/spec/models/user_segments_spec.rb +48 -0
  209. data/spec/models/user_settings_body_spec.rb +42 -0
  210. data/spec/models/user_spec.rb +102 -0
  211. data/spec/models/users_spec.rb +54 -0
  212. data/spec/models/variation_spec.rb +54 -0
  213. data/spec/models/webhook_body_spec.rb +66 -0
  214. data/spec/models/webhook_spec.rb +78 -0
  215. data/spec/models/webhooks_spec.rb +48 -0
  216. data/spec/models/weighted_variation_spec.rb +48 -0
  217. data/spec/spec_helper.rb +111 -0
  218. data/test.rb +50 -0
  219. metadata +509 -0
@@ -0,0 +1,9 @@
1
+ # LaunchDarklyApi::UserFlagSettings
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_links** | [**Links**](Links.md) | | [optional]
7
+ **items** | **Object** | | [optional]
8
+
9
+
@@ -0,0 +1,12 @@
1
+ # LaunchDarklyApi::UserRecord
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **last_ping** | **String** | | [optional]
7
+ **environment_id** | **String** | | [optional]
8
+ **owner_id** | [**Id**](Id.md) | | [optional]
9
+ **user** | [**User**](User.md) | | [optional]
10
+ **avatar** | **String** | | [optional]
11
+
12
+
@@ -0,0 +1,17 @@
1
+ # LaunchDarklyApi::UserSegment
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **key** | **String** | Unique identifier for the user segment. |
7
+ **name** | **String** | Name of the user segment. |
8
+ **description** | **String** | Description of the user segment. | [optional]
9
+ **tags** | **Array<String>** | An array of tags for this user segment. | [optional]
10
+ **creation_date** | **Float** | A unix epoch time in milliseconds specifying the creation time of this flag. |
11
+ **included** | **Array<String>** | An array of user keys that are included in this segment. | [optional]
12
+ **excluded** | **Array<String>** | An array of user keys that should not be included in this segment, unless they are also listed in \"included\". | [optional]
13
+ **rules** | [**Array<UserSegmentRule>**](UserSegmentRule.md) | An array of rules that can cause a user to be included in this segment. | [optional]
14
+ **version** | **Integer** | | [optional]
15
+ **_links** | [**Links**](Links.md) | | [optional]
16
+
17
+
@@ -0,0 +1,11 @@
1
+ # LaunchDarklyApi::UserSegmentBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | A human-friendly name for the user segment. |
7
+ **key** | **String** | A unique key that will be used to reference the user segment in feature flags. |
8
+ **description** | **String** | A description for the user segment. | [optional]
9
+ **tags** | **Array<String>** | Tags for the user segment. | [optional]
10
+
11
+
@@ -0,0 +1,10 @@
1
+ # LaunchDarklyApi::UserSegmentRule
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clauses** | [**Array<Clause>**](Clause.md) | | [optional]
7
+ **weight** | **Integer** | | [optional]
8
+ **bucket_by** | **String** | | [optional]
9
+
10
+
@@ -0,0 +1,9 @@
1
+ # LaunchDarklyApi::UserSegments
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_links** | [**Links**](Links.md) | | [optional]
7
+ **items** | [**Array<UserSegment>**](UserSegment.md) | | [optional]
8
+
9
+
@@ -0,0 +1,305 @@
1
+ # LaunchDarklyApi::UserSegmentsApi
2
+
3
+ All URIs are relative to *https://app.launchdarkly.com/api/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete_user_segment**](UserSegmentsApi.md#delete_user_segment) | **DELETE** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Delete a user segment.
8
+ [**get_user_segment**](UserSegmentsApi.md#get_user_segment) | **GET** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Get a single user segment by key.
9
+ [**get_user_segments**](UserSegmentsApi.md#get_user_segments) | **GET** /segments/{projectKey}/{environmentKey} | Get a list of all user segments in the given project.
10
+ [**patch_user_segment**](UserSegmentsApi.md#patch_user_segment) | **PATCH** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Perform a partial update to a user segment.
11
+ [**post_user_segment**](UserSegmentsApi.md#post_user_segment) | **POST** /segments/{projectKey}/{environmentKey} | Creates a new user segment.
12
+
13
+
14
+ # **delete_user_segment**
15
+ > delete_user_segment(project_key, environment_key, user_segment_key, )
16
+
17
+ Delete a user segment.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'launchdarkly_api'
23
+ # setup authorization
24
+ LaunchDarklyApi.configure do |config|
25
+ # Configure API key authorization: Token
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = LaunchDarklyApi::UserSegmentsApi.new
32
+
33
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
34
+
35
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
36
+
37
+ user_segment_key = "user_segment_key_example" # String | The user segment's key. The key identifies the user segment in your code.
38
+
39
+
40
+ begin
41
+ #Delete a user segment.
42
+ api_instance.delete_user_segment(project_key, environment_key, user_segment_key, )
43
+ rescue LaunchDarklyApi::ApiError => e
44
+ puts "Exception when calling UserSegmentsApi->delete_user_segment: #{e}"
45
+ end
46
+ ```
47
+
48
+ ### Parameters
49
+
50
+ Name | Type | Description | Notes
51
+ ------------- | ------------- | ------------- | -------------
52
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
53
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
54
+ **user_segment_key** | **String**| The user segment's key. The key identifies the user segment in your code. |
55
+
56
+ ### Return type
57
+
58
+ nil (empty response body)
59
+
60
+ ### Authorization
61
+
62
+ [Token](../README.md#Token)
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: application/json
67
+ - **Accept**: application/json
68
+
69
+
70
+
71
+ # **get_user_segment**
72
+ > UserSegment get_user_segment(project_key, environment_key, user_segment_key, )
73
+
74
+ Get a single user segment by key.
75
+
76
+ ### Example
77
+ ```ruby
78
+ # load the gem
79
+ require 'launchdarkly_api'
80
+ # setup authorization
81
+ LaunchDarklyApi.configure do |config|
82
+ # Configure API key authorization: Token
83
+ config.api_key['Authorization'] = 'YOUR API KEY'
84
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
85
+ #config.api_key_prefix['Authorization'] = 'Bearer'
86
+ end
87
+
88
+ api_instance = LaunchDarklyApi::UserSegmentsApi.new
89
+
90
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
91
+
92
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
93
+
94
+ user_segment_key = "user_segment_key_example" # String | The user segment's key. The key identifies the user segment in your code.
95
+
96
+
97
+ begin
98
+ #Get a single user segment by key.
99
+ result = api_instance.get_user_segment(project_key, environment_key, user_segment_key, )
100
+ p result
101
+ rescue LaunchDarklyApi::ApiError => e
102
+ puts "Exception when calling UserSegmentsApi->get_user_segment: #{e}"
103
+ end
104
+ ```
105
+
106
+ ### Parameters
107
+
108
+ Name | Type | Description | Notes
109
+ ------------- | ------------- | ------------- | -------------
110
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
111
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
112
+ **user_segment_key** | **String**| The user segment's key. The key identifies the user segment in your code. |
113
+
114
+ ### Return type
115
+
116
+ [**UserSegment**](UserSegment.md)
117
+
118
+ ### Authorization
119
+
120
+ [Token](../README.md#Token)
121
+
122
+ ### HTTP request headers
123
+
124
+ - **Content-Type**: application/json
125
+ - **Accept**: application/json
126
+
127
+
128
+
129
+ # **get_user_segments**
130
+ > UserSegments get_user_segments(project_key, environment_key, , opts)
131
+
132
+ Get a list of all user segments in the given project.
133
+
134
+ ### Example
135
+ ```ruby
136
+ # load the gem
137
+ require 'launchdarkly_api'
138
+ # setup authorization
139
+ LaunchDarklyApi.configure do |config|
140
+ # Configure API key authorization: Token
141
+ config.api_key['Authorization'] = 'YOUR API KEY'
142
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
143
+ #config.api_key_prefix['Authorization'] = 'Bearer'
144
+ end
145
+
146
+ api_instance = LaunchDarklyApi::UserSegmentsApi.new
147
+
148
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
149
+
150
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
151
+
152
+ opts = {
153
+ tag: "tag_example" # String | Filter by tag. A tag can be used to group flags across projects.
154
+ }
155
+
156
+ begin
157
+ #Get a list of all user segments in the given project.
158
+ result = api_instance.get_user_segments(project_key, environment_key, , opts)
159
+ p result
160
+ rescue LaunchDarklyApi::ApiError => e
161
+ puts "Exception when calling UserSegmentsApi->get_user_segments: #{e}"
162
+ end
163
+ ```
164
+
165
+ ### Parameters
166
+
167
+ Name | Type | Description | Notes
168
+ ------------- | ------------- | ------------- | -------------
169
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
170
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
171
+ **tag** | **String**| Filter by tag. A tag can be used to group flags across projects. | [optional]
172
+
173
+ ### Return type
174
+
175
+ [**UserSegments**](UserSegments.md)
176
+
177
+ ### Authorization
178
+
179
+ [Token](../README.md#Token)
180
+
181
+ ### HTTP request headers
182
+
183
+ - **Content-Type**: application/json
184
+ - **Accept**: application/json
185
+
186
+
187
+
188
+ # **patch_user_segment**
189
+ > UserSegment patch_user_segment(project_key, environment_key, user_segment_key, patch_only)
190
+
191
+ Perform a partial update to a user segment.
192
+
193
+ ### Example
194
+ ```ruby
195
+ # load the gem
196
+ require 'launchdarkly_api'
197
+ # setup authorization
198
+ LaunchDarklyApi.configure do |config|
199
+ # Configure API key authorization: Token
200
+ config.api_key['Authorization'] = 'YOUR API KEY'
201
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
202
+ #config.api_key_prefix['Authorization'] = 'Bearer'
203
+ end
204
+
205
+ api_instance = LaunchDarklyApi::UserSegmentsApi.new
206
+
207
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
208
+
209
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
210
+
211
+ user_segment_key = "user_segment_key_example" # String | The user segment's key. The key identifies the user segment in your code.
212
+
213
+ patch_only = [LaunchDarklyApi::PatchOperation.new] # Array<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.
214
+
215
+
216
+ begin
217
+ #Perform a partial update to a user segment.
218
+ result = api_instance.patch_user_segment(project_key, environment_key, user_segment_key, patch_only)
219
+ p result
220
+ rescue LaunchDarklyApi::ApiError => e
221
+ puts "Exception when calling UserSegmentsApi->patch_user_segment: #{e}"
222
+ end
223
+ ```
224
+
225
+ ### Parameters
226
+
227
+ Name | Type | Description | Notes
228
+ ------------- | ------------- | ------------- | -------------
229
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
230
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
231
+ **user_segment_key** | **String**| The user segment&#39;s key. The key identifies the user segment in your code. |
232
+ **patch_only** | [**Array&lt;PatchOperation&gt;**](PatchOperation.md)| Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39; Feature flag patches also support JSON Merge Patch format. &#39;https://tools.ietf.org/html/rfc7386&#39; The addition of comments is also supported. |
233
+
234
+ ### Return type
235
+
236
+ [**UserSegment**](UserSegment.md)
237
+
238
+ ### Authorization
239
+
240
+ [Token](../README.md#Token)
241
+
242
+ ### HTTP request headers
243
+
244
+ - **Content-Type**: application/json
245
+ - **Accept**: application/json
246
+
247
+
248
+
249
+ # **post_user_segment**
250
+ > post_user_segment(project_key, environment_key, user_segment_body)
251
+
252
+ Creates a new user segment.
253
+
254
+ ### Example
255
+ ```ruby
256
+ # load the gem
257
+ require 'launchdarkly_api'
258
+ # setup authorization
259
+ LaunchDarklyApi.configure do |config|
260
+ # Configure API key authorization: Token
261
+ config.api_key['Authorization'] = 'YOUR API KEY'
262
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
263
+ #config.api_key_prefix['Authorization'] = 'Bearer'
264
+ end
265
+
266
+ api_instance = LaunchDarklyApi::UserSegmentsApi.new
267
+
268
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
269
+
270
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
271
+
272
+ user_segment_body = LaunchDarklyApi::UserSegmentBody.new # UserSegmentBody | Create a new user segment.
273
+
274
+
275
+ begin
276
+ #Creates a new user segment.
277
+ api_instance.post_user_segment(project_key, environment_key, user_segment_body)
278
+ rescue LaunchDarklyApi::ApiError => e
279
+ puts "Exception when calling UserSegmentsApi->post_user_segment: #{e}"
280
+ end
281
+ ```
282
+
283
+ ### Parameters
284
+
285
+ Name | Type | Description | Notes
286
+ ------------- | ------------- | ------------- | -------------
287
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
288
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
289
+ **user_segment_body** | [**UserSegmentBody**](UserSegmentBody.md)| Create a new user segment. |
290
+
291
+ ### Return type
292
+
293
+ nil (empty response body)
294
+
295
+ ### Authorization
296
+
297
+ [Token](../README.md#Token)
298
+
299
+ ### HTTP request headers
300
+
301
+ - **Content-Type**: application/json
302
+ - **Accept**: application/json
303
+
304
+
305
+
@@ -0,0 +1,193 @@
1
+ # LaunchDarklyApi::UserSettingsApi
2
+
3
+ All URIs are relative to *https://app.launchdarkly.com/api/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_user_flag_setting**](UserSettingsApi.md#get_user_flag_setting) | **GET** /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Fetch a single flag setting for a user by key.
8
+ [**get_user_flag_settings**](UserSettingsApi.md#get_user_flag_settings) | **GET** /users/{projectKey}/{environmentKey}/{userKey}/flags | Fetch a single flag setting for a user by key.
9
+ [**put_flag_setting**](UserSettingsApi.md#put_flag_setting) | **PUT** /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Specifically enable or disable a feature flag for a user based on their key.
10
+
11
+
12
+ # **get_user_flag_setting**
13
+ > UserFlagSetting get_user_flag_setting(project_key, environment_key, user_key, feature_flag_key, )
14
+
15
+ Fetch a single flag setting for a user by key.
16
+
17
+ ### Example
18
+ ```ruby
19
+ # load the gem
20
+ require 'launchdarkly_api'
21
+ # setup authorization
22
+ LaunchDarklyApi.configure do |config|
23
+ # Configure API key authorization: Token
24
+ config.api_key['Authorization'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ #config.api_key_prefix['Authorization'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = LaunchDarklyApi::UserSettingsApi.new
30
+
31
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
32
+
33
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
34
+
35
+ user_key = "user_key_example" # String | The user's key.
36
+
37
+ feature_flag_key = "feature_flag_key_example" # String | The feature flag's key. The key identifies the flag in your code.
38
+
39
+
40
+ begin
41
+ #Fetch a single flag setting for a user by key.
42
+ result = api_instance.get_user_flag_setting(project_key, environment_key, user_key, feature_flag_key, )
43
+ p result
44
+ rescue LaunchDarklyApi::ApiError => e
45
+ puts "Exception when calling UserSettingsApi->get_user_flag_setting: #{e}"
46
+ end
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+ Name | Type | Description | Notes
52
+ ------------- | ------------- | ------------- | -------------
53
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
54
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
55
+ **user_key** | **String**| The user&#39;s key. |
56
+ **feature_flag_key** | **String**| The feature flag&#39;s key. The key identifies the flag in your code. |
57
+
58
+ ### Return type
59
+
60
+ [**UserFlagSetting**](UserFlagSetting.md)
61
+
62
+ ### Authorization
63
+
64
+ [Token](../README.md#Token)
65
+
66
+ ### HTTP request headers
67
+
68
+ - **Content-Type**: application/json
69
+ - **Accept**: application/json
70
+
71
+
72
+
73
+ # **get_user_flag_settings**
74
+ > UserFlagSettings get_user_flag_settings(project_key, environment_key, user_key, )
75
+
76
+ Fetch a single flag setting for a user by key.
77
+
78
+ ### Example
79
+ ```ruby
80
+ # load the gem
81
+ require 'launchdarkly_api'
82
+ # setup authorization
83
+ LaunchDarklyApi.configure do |config|
84
+ # Configure API key authorization: Token
85
+ config.api_key['Authorization'] = 'YOUR API KEY'
86
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
87
+ #config.api_key_prefix['Authorization'] = 'Bearer'
88
+ end
89
+
90
+ api_instance = LaunchDarklyApi::UserSettingsApi.new
91
+
92
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
93
+
94
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
95
+
96
+ user_key = "user_key_example" # String | The user's key.
97
+
98
+
99
+ begin
100
+ #Fetch a single flag setting for a user by key.
101
+ result = api_instance.get_user_flag_settings(project_key, environment_key, user_key, )
102
+ p result
103
+ rescue LaunchDarklyApi::ApiError => e
104
+ puts "Exception when calling UserSettingsApi->get_user_flag_settings: #{e}"
105
+ end
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ Name | Type | Description | Notes
111
+ ------------- | ------------- | ------------- | -------------
112
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
113
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
114
+ **user_key** | **String**| The user&#39;s key. |
115
+
116
+ ### Return type
117
+
118
+ [**UserFlagSettings**](UserFlagSettings.md)
119
+
120
+ ### Authorization
121
+
122
+ [Token](../README.md#Token)
123
+
124
+ ### HTTP request headers
125
+
126
+ - **Content-Type**: application/json
127
+ - **Accept**: application/json
128
+
129
+
130
+
131
+ # **put_flag_setting**
132
+ > put_flag_setting(project_key, environment_key, user_key, feature_flag_key, user_settings_body)
133
+
134
+ Specifically enable or disable a feature flag for a user based on their key.
135
+
136
+ ### Example
137
+ ```ruby
138
+ # load the gem
139
+ require 'launchdarkly_api'
140
+ # setup authorization
141
+ LaunchDarklyApi.configure do |config|
142
+ # Configure API key authorization: Token
143
+ config.api_key['Authorization'] = 'YOUR API KEY'
144
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
145
+ #config.api_key_prefix['Authorization'] = 'Bearer'
146
+ end
147
+
148
+ api_instance = LaunchDarklyApi::UserSettingsApi.new
149
+
150
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
151
+
152
+ environment_key = "environment_key_example" # String | The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
153
+
154
+ user_key = "user_key_example" # String | The user's key.
155
+
156
+ feature_flag_key = "feature_flag_key_example" # String | The feature flag's key. The key identifies the flag in your code.
157
+
158
+ user_settings_body = LaunchDarklyApi::UserSettingsBody.new # UserSettingsBody |
159
+
160
+
161
+ begin
162
+ #Specifically enable or disable a feature flag for a user based on their key.
163
+ api_instance.put_flag_setting(project_key, environment_key, user_key, feature_flag_key, user_settings_body)
164
+ rescue LaunchDarklyApi::ApiError => e
165
+ puts "Exception when calling UserSettingsApi->put_flag_setting: #{e}"
166
+ end
167
+ ```
168
+
169
+ ### Parameters
170
+
171
+ Name | Type | Description | Notes
172
+ ------------- | ------------- | ------------- | -------------
173
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
174
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
175
+ **user_key** | **String**| The user&#39;s key. |
176
+ **feature_flag_key** | **String**| The feature flag&#39;s key. The key identifies the flag in your code. |
177
+ **user_settings_body** | [**UserSettingsBody**](UserSettingsBody.md)| |
178
+
179
+ ### Return type
180
+
181
+ nil (empty response body)
182
+
183
+ ### Authorization
184
+
185
+ [Token](../README.md#Token)
186
+
187
+ ### HTTP request headers
188
+
189
+ - **Content-Type**: application/json
190
+ - **Accept**: application/json
191
+
192
+
193
+
@@ -0,0 +1,8 @@
1
+ # LaunchDarklyApi::UserSettingsBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **setting** | **BOOLEAN** | The variation value to set for the user. Must match the variation type of the flag. | [optional]
7
+
8
+
data/docs/Users.md ADDED
@@ -0,0 +1,10 @@
1
+ # LaunchDarklyApi::Users
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_links** | [**Links**](Links.md) | | [optional]
7
+ **total_count** | **Float** | | [optional]
8
+ **items** | [**Array&lt;UserRecord&gt;**](UserRecord.md) | | [optional]
9
+
10
+