launchdarkly_api 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
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
data/docs/UsersApi.md ADDED
@@ -0,0 +1,255 @@
1
+ # LaunchDarklyApi::UsersApi
2
+
3
+ All URIs are relative to *https://app.launchdarkly.com/api/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete_user**](UsersApi.md#delete_user) | **DELETE** /users/{projectKey}/{environmentKey}/{userKey} | Delete a user by ID.
8
+ [**get_search_users**](UsersApi.md#get_search_users) | **GET** /user-search/{projectKey}/{environmentKey} | Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.
9
+ [**get_user**](UsersApi.md#get_user) | **GET** /users/{projectKey}/{environmentKey}/{userKey} | Get a user by key.
10
+ [**get_users**](UsersApi.md#get_users) | **GET** /users/{projectKey}/{environmentKey} | List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.
11
+
12
+
13
+ # **delete_user**
14
+ > delete_user(project_key, environment_key, user_key, )
15
+
16
+ Delete a user by ID.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'launchdarkly_api'
22
+ # setup authorization
23
+ LaunchDarklyApi.configure do |config|
24
+ # Configure API key authorization: Token
25
+ config.api_key['Authorization'] = 'YOUR API KEY'
26
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
27
+ #config.api_key_prefix['Authorization'] = 'Bearer'
28
+ end
29
+
30
+ api_instance = LaunchDarklyApi::UsersApi.new
31
+
32
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
33
+
34
+ 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.
35
+
36
+ user_key = "user_key_example" # String | The user's key.
37
+
38
+
39
+ begin
40
+ #Delete a user by ID.
41
+ api_instance.delete_user(project_key, environment_key, user_key, )
42
+ rescue LaunchDarklyApi::ApiError => e
43
+ puts "Exception when calling UsersApi->delete_user: #{e}"
44
+ end
45
+ ```
46
+
47
+ ### Parameters
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
52
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
53
+ **user_key** | **String**| The user's key. |
54
+
55
+ ### Return type
56
+
57
+ nil (empty response body)
58
+
59
+ ### Authorization
60
+
61
+ [Token](../README.md#Token)
62
+
63
+ ### HTTP request headers
64
+
65
+ - **Content-Type**: application/json
66
+ - **Accept**: application/json
67
+
68
+
69
+
70
+ # **get_search_users**
71
+ > Users get_search_users(project_key, environment_key, , opts)
72
+
73
+ Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.
74
+
75
+ ### Example
76
+ ```ruby
77
+ # load the gem
78
+ require 'launchdarkly_api'
79
+ # setup authorization
80
+ LaunchDarklyApi.configure do |config|
81
+ # Configure API key authorization: Token
82
+ config.api_key['Authorization'] = 'YOUR API KEY'
83
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
84
+ #config.api_key_prefix['Authorization'] = 'Bearer'
85
+ end
86
+
87
+ api_instance = LaunchDarklyApi::UsersApi.new
88
+
89
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
90
+
91
+ 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.
92
+
93
+ opts = {
94
+ q: "q_example", # String | Search query.
95
+ limit: 56, # Integer | Pagination limit.
96
+ offset: 56, # Integer | Specifies the first item to return in the collection.
97
+ after: 8.14, # Float | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occured after this timestamp.
98
+ }
99
+
100
+ begin
101
+ #Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.
102
+ result = api_instance.get_search_users(project_key, environment_key, , opts)
103
+ p result
104
+ rescue LaunchDarklyApi::ApiError => e
105
+ puts "Exception when calling UsersApi->get_search_users: #{e}"
106
+ end
107
+ ```
108
+
109
+ ### Parameters
110
+
111
+ Name | Type | Description | Notes
112
+ ------------- | ------------- | ------------- | -------------
113
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
114
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
115
+ **q** | **String**| Search query. | [optional]
116
+ **limit** | **Integer**| Pagination limit. | [optional]
117
+ **offset** | **Integer**| Specifies the first item to return in the collection. | [optional]
118
+ **after** | **Float**| A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occured after this timestamp. | [optional]
119
+
120
+ ### Return type
121
+
122
+ [**Users**](Users.md)
123
+
124
+ ### Authorization
125
+
126
+ [Token](../README.md#Token)
127
+
128
+ ### HTTP request headers
129
+
130
+ - **Content-Type**: application/json
131
+ - **Accept**: application/json
132
+
133
+
134
+
135
+ # **get_user**
136
+ > User get_user(project_key, environment_key, user_key, )
137
+
138
+ Get a user by key.
139
+
140
+ ### Example
141
+ ```ruby
142
+ # load the gem
143
+ require 'launchdarkly_api'
144
+ # setup authorization
145
+ LaunchDarklyApi.configure do |config|
146
+ # Configure API key authorization: Token
147
+ config.api_key['Authorization'] = 'YOUR API KEY'
148
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
149
+ #config.api_key_prefix['Authorization'] = 'Bearer'
150
+ end
151
+
152
+ api_instance = LaunchDarklyApi::UsersApi.new
153
+
154
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
155
+
156
+ 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.
157
+
158
+ user_key = "user_key_example" # String | The user's key.
159
+
160
+
161
+ begin
162
+ #Get a user by key.
163
+ result = api_instance.get_user(project_key, environment_key, user_key, )
164
+ p result
165
+ rescue LaunchDarklyApi::ApiError => e
166
+ puts "Exception when calling UsersApi->get_user: #{e}"
167
+ end
168
+ ```
169
+
170
+ ### Parameters
171
+
172
+ Name | Type | Description | Notes
173
+ ------------- | ------------- | ------------- | -------------
174
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
175
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
176
+ **user_key** | **String**| The user's key. |
177
+
178
+ ### Return type
179
+
180
+ [**User**](User.md)
181
+
182
+ ### Authorization
183
+
184
+ [Token](../README.md#Token)
185
+
186
+ ### HTTP request headers
187
+
188
+ - **Content-Type**: application/json
189
+ - **Accept**: application/json
190
+
191
+
192
+
193
+ # **get_users**
194
+ > Users get_users(project_key, environment_key, , opts)
195
+
196
+ List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.
197
+
198
+ ### Example
199
+ ```ruby
200
+ # load the gem
201
+ require 'launchdarkly_api'
202
+ # setup authorization
203
+ LaunchDarklyApi.configure do |config|
204
+ # Configure API key authorization: Token
205
+ config.api_key['Authorization'] = 'YOUR API KEY'
206
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
207
+ #config.api_key_prefix['Authorization'] = 'Bearer'
208
+ end
209
+
210
+ api_instance = LaunchDarklyApi::UsersApi.new
211
+
212
+ project_key = "project_key_example" # String | The project key, used to tie the flags together under one project so they can be managed together.
213
+
214
+ 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.
215
+
216
+ opts = {
217
+ limit: 56, # Integer | Pagination limit.
218
+ h: "h_example", # String | This parameter is required when following \"next\" links.
219
+ scroll_id: "scroll_id_example" # String | This parameter is required when following \"next\" links.
220
+ }
221
+
222
+ begin
223
+ #List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.
224
+ result = api_instance.get_users(project_key, environment_key, , opts)
225
+ p result
226
+ rescue LaunchDarklyApi::ApiError => e
227
+ puts "Exception when calling UsersApi->get_users: #{e}"
228
+ end
229
+ ```
230
+
231
+ ### Parameters
232
+
233
+ Name | Type | Description | Notes
234
+ ------------- | ------------- | ------------- | -------------
235
+ **project_key** | **String**| The project key, used to tie the flags together under one project so they can be managed together. |
236
+ **environment_key** | **String**| The environment key, used to tie together flag configuration and users under one environment so they can be managed together. |
237
+ **limit** | **Integer**| Pagination limit. | [optional]
238
+ **h** | **String**| This parameter is required when following \"next\" links. | [optional]
239
+ **scroll_id** | **String**| This parameter is required when following \"next\" links. | [optional]
240
+
241
+ ### Return type
242
+
243
+ [**Users**](Users.md)
244
+
245
+ ### Authorization
246
+
247
+ [Token](../README.md#Token)
248
+
249
+ ### HTTP request headers
250
+
251
+ - **Content-Type**: application/json
252
+ - **Accept**: application/json
253
+
254
+
255
+
data/docs/Variation.md ADDED
@@ -0,0 +1,10 @@
1
+ # LaunchDarklyApi::Variation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | | [optional]
7
+ **description** | **String** | | [optional]
8
+ **value** | **Object** | |
9
+
10
+
data/docs/Webhook.md ADDED
@@ -0,0 +1,14 @@
1
+ # LaunchDarklyApi::Webhook
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_links** | [**Links**](Links.md) | | [optional]
7
+ **_id** | [**Id**](Id.md) | | [optional]
8
+ **url** | **String** | The URL of the remote webhook. | [optional]
9
+ **secret** | **String** | If defined, the webhooks post request will include a X-LD-Signature header whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the secret as the key. | [optional]
10
+ **on** | **BOOLEAN** | Whether this webhook is enabled or not. | [optional]
11
+ **name** | **String** | The name of the webhook. | [optional]
12
+ **tags** | **Array<String>** | Tags assigned to this webhook. | [optional]
13
+
14
+
@@ -0,0 +1,12 @@
1
+ # LaunchDarklyApi::WebhookBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | The URL of the remote webhook. |
7
+ **secret** | **String** | If sign is true, and the secret attribute is omitted, LaunchDarkly will automatically generate a secret for you. | [optional]
8
+ **sign** | **BOOLEAN** | If sign is false, the webhook will not include a signature header, and the secret can be omitted. |
9
+ **on** | **BOOLEAN** | Whether this webhook is enabled or not. |
10
+ **name** | **String** | The name of the webhook. | [optional]
11
+
12
+
data/docs/Webhooks.md ADDED
@@ -0,0 +1,9 @@
1
+ # LaunchDarklyApi::Webhooks
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_links** | [**Links**](Links.md) | | [optional]
7
+ **items** | [**Array<Webhook>**](Webhook.md) | | [optional]
8
+
9
+
@@ -0,0 +1,268 @@
1
+ # LaunchDarklyApi::WebhooksApi
2
+
3
+ All URIs are relative to *https://app.launchdarkly.com/api/v2*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete_webhook**](WebhooksApi.md#delete_webhook) | **DELETE** /webhooks/{resourceId} | Delete a webhook by ID.
8
+ [**get_webhook**](WebhooksApi.md#get_webhook) | **GET** /webhooks/{resourceId} | Get a webhook by ID.
9
+ [**get_webhooks**](WebhooksApi.md#get_webhooks) | **GET** /webhooks | Fetch a list of all webhooks.
10
+ [**patch_webhook**](WebhooksApi.md#patch_webhook) | **PATCH** /webhooks/{resourceId} | Modify a webhook by ID.
11
+ [**post_webhook**](WebhooksApi.md#post_webhook) | **POST** /webhooks | Create a webhook.
12
+
13
+
14
+ # **delete_webhook**
15
+ > delete_webhook(resource_id, )
16
+
17
+ Delete a webhook by ID.
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::WebhooksApi.new
32
+
33
+ resource_id = "resource_id_example" # String | The resource ID.
34
+
35
+
36
+ begin
37
+ #Delete a webhook by ID.
38
+ api_instance.delete_webhook(resource_id, )
39
+ rescue LaunchDarklyApi::ApiError => e
40
+ puts "Exception when calling WebhooksApi->delete_webhook: #{e}"
41
+ end
42
+ ```
43
+
44
+ ### Parameters
45
+
46
+ Name | Type | Description | Notes
47
+ ------------- | ------------- | ------------- | -------------
48
+ **resource_id** | **String**| The resource ID. |
49
+
50
+ ### Return type
51
+
52
+ nil (empty response body)
53
+
54
+ ### Authorization
55
+
56
+ [Token](../README.md#Token)
57
+
58
+ ### HTTP request headers
59
+
60
+ - **Content-Type**: application/json
61
+ - **Accept**: application/json
62
+
63
+
64
+
65
+ # **get_webhook**
66
+ > Webhook get_webhook(resource_id, )
67
+
68
+ Get a webhook by ID.
69
+
70
+ ### Example
71
+ ```ruby
72
+ # load the gem
73
+ require 'launchdarkly_api'
74
+ # setup authorization
75
+ LaunchDarklyApi.configure do |config|
76
+ # Configure API key authorization: Token
77
+ config.api_key['Authorization'] = 'YOUR API KEY'
78
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
79
+ #config.api_key_prefix['Authorization'] = 'Bearer'
80
+ end
81
+
82
+ api_instance = LaunchDarklyApi::WebhooksApi.new
83
+
84
+ resource_id = "resource_id_example" # String | The resource ID.
85
+
86
+
87
+ begin
88
+ #Get a webhook by ID.
89
+ result = api_instance.get_webhook(resource_id, )
90
+ p result
91
+ rescue LaunchDarklyApi::ApiError => e
92
+ puts "Exception when calling WebhooksApi->get_webhook: #{e}"
93
+ end
94
+ ```
95
+
96
+ ### Parameters
97
+
98
+ Name | Type | Description | Notes
99
+ ------------- | ------------- | ------------- | -------------
100
+ **resource_id** | **String**| The resource ID. |
101
+
102
+ ### Return type
103
+
104
+ [**Webhook**](Webhook.md)
105
+
106
+ ### Authorization
107
+
108
+ [Token](../README.md#Token)
109
+
110
+ ### HTTP request headers
111
+
112
+ - **Content-Type**: application/json
113
+ - **Accept**: application/json
114
+
115
+
116
+
117
+ # **get_webhooks**
118
+ > Webhooks get_webhooks
119
+
120
+ Fetch a list of all webhooks.
121
+
122
+ ### Example
123
+ ```ruby
124
+ # load the gem
125
+ require 'launchdarkly_api'
126
+ # setup authorization
127
+ LaunchDarklyApi.configure do |config|
128
+ # Configure API key authorization: Token
129
+ config.api_key['Authorization'] = 'YOUR API KEY'
130
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
131
+ #config.api_key_prefix['Authorization'] = 'Bearer'
132
+ end
133
+
134
+ api_instance = LaunchDarklyApi::WebhooksApi.new
135
+
136
+ begin
137
+ #Fetch a list of all webhooks.
138
+ result = api_instance.get_webhooks
139
+ p result
140
+ rescue LaunchDarklyApi::ApiError => e
141
+ puts "Exception when calling WebhooksApi->get_webhooks: #{e}"
142
+ end
143
+ ```
144
+
145
+ ### Parameters
146
+ This endpoint does not need any parameter.
147
+
148
+ ### Return type
149
+
150
+ [**Webhooks**](Webhooks.md)
151
+
152
+ ### Authorization
153
+
154
+ [Token](../README.md#Token)
155
+
156
+ ### HTTP request headers
157
+
158
+ - **Content-Type**: application/json
159
+ - **Accept**: application/json
160
+
161
+
162
+
163
+ # **patch_webhook**
164
+ > Webhook patch_webhook(resource_id, patch_delta)
165
+
166
+ Modify a webhook by ID.
167
+
168
+ ### Example
169
+ ```ruby
170
+ # load the gem
171
+ require 'launchdarkly_api'
172
+ # setup authorization
173
+ LaunchDarklyApi.configure do |config|
174
+ # Configure API key authorization: Token
175
+ config.api_key['Authorization'] = 'YOUR API KEY'
176
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
177
+ #config.api_key_prefix['Authorization'] = 'Bearer'
178
+ end
179
+
180
+ api_instance = LaunchDarklyApi::WebhooksApi.new
181
+
182
+ resource_id = "resource_id_example" # String | The resource ID.
183
+
184
+ patch_delta = [LaunchDarklyApi::PatchOperation.new] # Array<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
185
+
186
+
187
+ begin
188
+ #Modify a webhook by ID.
189
+ result = api_instance.patch_webhook(resource_id, patch_delta)
190
+ p result
191
+ rescue LaunchDarklyApi::ApiError => e
192
+ puts "Exception when calling WebhooksApi->patch_webhook: #{e}"
193
+ end
194
+ ```
195
+
196
+ ### Parameters
197
+
198
+ Name | Type | Description | Notes
199
+ ------------- | ------------- | ------------- | -------------
200
+ **resource_id** | **String**| The resource ID. |
201
+ **patch_delta** | [**Array&lt;PatchOperation&gt;**](PatchOperation.md)| Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39; |
202
+
203
+ ### Return type
204
+
205
+ [**Webhook**](Webhook.md)
206
+
207
+ ### Authorization
208
+
209
+ [Token](../README.md#Token)
210
+
211
+ ### HTTP request headers
212
+
213
+ - **Content-Type**: application/json
214
+ - **Accept**: application/json
215
+
216
+
217
+
218
+ # **post_webhook**
219
+ > post_webhook(webhook_body)
220
+
221
+ Create a webhook.
222
+
223
+ ### Example
224
+ ```ruby
225
+ # load the gem
226
+ require 'launchdarkly_api'
227
+ # setup authorization
228
+ LaunchDarklyApi.configure do |config|
229
+ # Configure API key authorization: Token
230
+ config.api_key['Authorization'] = 'YOUR API KEY'
231
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
232
+ #config.api_key_prefix['Authorization'] = 'Bearer'
233
+ end
234
+
235
+ api_instance = LaunchDarklyApi::WebhooksApi.new
236
+
237
+ webhook_body = LaunchDarklyApi::WebhookBody.new # WebhookBody | New webhook.
238
+
239
+
240
+ begin
241
+ #Create a webhook.
242
+ api_instance.post_webhook(webhook_body)
243
+ rescue LaunchDarklyApi::ApiError => e
244
+ puts "Exception when calling WebhooksApi->post_webhook: #{e}"
245
+ end
246
+ ```
247
+
248
+ ### Parameters
249
+
250
+ Name | Type | Description | Notes
251
+ ------------- | ------------- | ------------- | -------------
252
+ **webhook_body** | [**WebhookBody**](WebhookBody.md)| New webhook. |
253
+
254
+ ### Return type
255
+
256
+ nil (empty response body)
257
+
258
+ ### Authorization
259
+
260
+ [Token](../README.md#Token)
261
+
262
+ ### HTTP request headers
263
+
264
+ - **Content-Type**: application/json
265
+ - **Accept**: application/json
266
+
267
+
268
+
@@ -0,0 +1,9 @@
1
+ # LaunchDarklyApi::WeightedVariation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **variation** | **Integer** | | [optional]
7
+ **weight** | **Integer** | | [optional]
8
+
9
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
Binary file
@@ -0,0 +1,46 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ =begin
4
+ #LaunchDarkly REST API
5
+
6
+ #Build custom integrations with the LaunchDarkly REST API
7
+
8
+ OpenAPI spec version: 2.0.3
9
+ Contact: support@launchdarkly.com
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ Swagger Codegen version: 2.3.1
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "launchdarkly_api/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "launchdarkly_api"
20
+ s.version = LaunchDarklyApi::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["Swagger-Codegen"]
23
+ s.email = ["support@launchdarkly.com"]
24
+ s.homepage = "https://github.com/launchdarkly/api-client-ruby"
25
+ s.summary = "LaunchDarkly REST API Ruby Gem"
26
+ s.description = "Build custom integrations with the LaunchDarkly REST API"
27
+ # TODO uncommnet and update below with a proper license
28
+ #s.license = "Apache 2.0"
29
+ s.required_ruby_version = ">= 1.9"
30
+
31
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
33
+
34
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
35
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
36
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
37
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
38
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
39
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
40
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
41
+
42
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
43
+ s.test_files = `find spec/*`.split("\n")
44
+ s.executables = []
45
+ s.require_paths = ["lib"]
46
+ end
data/lib/.DS_Store ADDED
Binary file