launchdarkly_api 2.0.10 → 2.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +153 -151
  3. data/docs/AuditLogApi.md +7 -7
  4. data/docs/{Action.md → CopyActions.md} +1 -1
  5. data/docs/CustomProperty.md +1 -1
  6. data/docs/CustomRole.md +1 -1
  7. data/docs/CustomRoleBody.md +1 -1
  8. data/docs/CustomRoles.md +1 -1
  9. data/docs/CustomRolesApi.md +7 -6
  10. data/docs/CustomerMetricsApi.md +511 -0
  11. data/docs/DataExportDestinationsApi.md +293 -0
  12. data/docs/Destination.md +14 -0
  13. data/docs/DestinationAmazonKinesis.md +10 -0
  14. data/docs/DestinationBody.md +11 -0
  15. data/docs/DestinationGooglePubSub.md +9 -0
  16. data/docs/DestinationMParticle.md +11 -0
  17. data/docs/{CustomRoleKeyOrId.md → DestinationSegment.md} +2 -1
  18. data/docs/Destinations.md +9 -0
  19. data/docs/Environment.md +2 -0
  20. data/docs/EnvironmentPost.md +5 -0
  21. data/docs/EnvironmentsApi.md +11 -10
  22. data/docs/EvaluationUsageError.md +9 -0
  23. data/docs/Events.md +8 -0
  24. data/docs/FeatureFlag.md +4 -1
  25. data/docs/FeatureFlagConfig.md +0 -1
  26. data/docs/FeatureFlagCopyBody.md +12 -0
  27. data/docs/FeatureFlagCopyObject.md +9 -0
  28. data/docs/FeatureFlagStatus.md +1 -1
  29. data/docs/FeatureFlagStatusAcrossEnvironments.md +10 -0
  30. data/docs/FeatureFlagStatusForQueriedEnvironment.md +10 -0
  31. data/docs/FeatureFlagsApi.md +136 -17
  32. data/docs/MAU.md +10 -0
  33. data/docs/{Actions.md → MAUMetadata.md} +1 -1
  34. data/docs/MAUbyCategory.md +10 -0
  35. data/docs/Member.md +2 -0
  36. data/docs/Members.md +1 -1
  37. data/docs/MembersBody.md +1 -1
  38. data/docs/Policy.md +4 -2
  39. data/docs/ProjectBody.md +2 -0
  40. data/docs/ProjectsApi.md +7 -6
  41. data/docs/Rollout.md +1 -0
  42. data/docs/Statement.md +4 -4
  43. data/docs/Stream.md +10 -0
  44. data/docs/StreamBySDK.md +10 -0
  45. data/docs/StreamBySDKLinks.md +9 -0
  46. data/docs/StreamBySDKLinksMetadata.md +10 -0
  47. data/docs/StreamLinks.md +10 -0
  48. data/docs/StreamSDKVersion.md +9 -0
  49. data/docs/StreamSDKVersionData.md +9 -0
  50. data/docs/StreamUsageError.md +9 -0
  51. data/docs/StreamUsageLinks.md +10 -0
  52. data/docs/StreamUsageMetadata.md +10 -0
  53. data/docs/StreamUsageSeries.md +9 -0
  54. data/docs/Streams.md +8 -0
  55. data/docs/TeamMembersApi.md +7 -6
  56. data/docs/Usage.md +9 -0
  57. data/docs/{CustomProperties.md → UsageError.md} +2 -1
  58. data/docs/UsageLinks.md +10 -0
  59. data/docs/UserSegmentsApi.md +18 -17
  60. data/docs/UserSettingsApi.md +11 -11
  61. data/docs/UsersApi.md +15 -15
  62. data/docs/Webhook.md +1 -0
  63. data/docs/WebhookBody.md +2 -0
  64. data/docs/WebhooksApi.md +7 -6
  65. data/launchdarkly_api.gemspec +5 -6
  66. data/lib/launchdarkly_api/api/audit_log_api.rb +13 -19
  67. data/lib/launchdarkly_api/api/custom_roles_api.rb +23 -37
  68. data/lib/launchdarkly_api/api/customer_metrics_api.rb +519 -0
  69. data/lib/launchdarkly_api/api/data_export_destinations_api.rb +330 -0
  70. data/lib/launchdarkly_api/api/environments_api.rb +20 -31
  71. data/lib/launchdarkly_api/api/feature_flags_api.rb +150 -43
  72. data/lib/launchdarkly_api/api/projects_api.rb +23 -37
  73. data/lib/launchdarkly_api/api/root_api.rb +6 -9
  74. data/lib/launchdarkly_api/api/team_members_api.rb +23 -37
  75. data/lib/launchdarkly_api/api/user_segments_api.rb +23 -37
  76. data/lib/launchdarkly_api/api/user_settings_api.rb +12 -21
  77. data/lib/launchdarkly_api/api/users_api.rb +17 -29
  78. data/lib/launchdarkly_api/api/webhooks_api.rb +23 -37
  79. data/lib/launchdarkly_api/api_client.rb +10 -10
  80. data/lib/launchdarkly_api/api_error.rb +2 -2
  81. data/lib/launchdarkly_api/configuration.rb +3 -3
  82. data/lib/launchdarkly_api/models/audit_log_entries.rb +7 -12
  83. data/lib/launchdarkly_api/models/audit_log_entry.rb +7 -12
  84. data/lib/launchdarkly_api/models/audit_log_entry_target.rb +7 -12
  85. data/lib/launchdarkly_api/models/clause.rb +7 -12
  86. data/lib/launchdarkly_api/models/copy_actions.rb +34 -0
  87. data/lib/launchdarkly_api/models/custom_property.rb +13 -14
  88. data/lib/launchdarkly_api/models/custom_property_values.rb +7 -11
  89. data/lib/launchdarkly_api/models/custom_role.rb +9 -13
  90. data/lib/launchdarkly_api/models/custom_role_body.rb +12 -16
  91. data/lib/launchdarkly_api/models/custom_roles.rb +11 -14
  92. data/lib/launchdarkly_api/models/destination.rb +276 -0
  93. data/lib/launchdarkly_api/models/destination_amazon_kinesis.rb +201 -0
  94. data/lib/launchdarkly_api/models/destination_body.rb +263 -0
  95. data/lib/launchdarkly_api/models/destination_google_pub_sub.rb +192 -0
  96. data/lib/launchdarkly_api/models/destination_m_particle.rb +210 -0
  97. data/lib/launchdarkly_api/models/destination_segment.rb +183 -0
  98. data/lib/launchdarkly_api/models/destinations.rb +194 -0
  99. data/lib/launchdarkly_api/models/environment.rb +29 -14
  100. data/lib/launchdarkly_api/models/environment_post.rb +64 -17
  101. data/lib/launchdarkly_api/models/evaluation_usage_error.rb +192 -0
  102. data/lib/launchdarkly_api/models/{action.rb → events.rb} +17 -13
  103. data/lib/launchdarkly_api/models/fallthrough.rb +7 -12
  104. data/lib/launchdarkly_api/models/feature_flag.rb +46 -16
  105. data/lib/launchdarkly_api/models/feature_flag_body.rb +10 -15
  106. data/lib/launchdarkly_api/models/feature_flag_config.rb +8 -24
  107. data/lib/launchdarkly_api/models/feature_flag_copy_body.rb +226 -0
  108. data/lib/launchdarkly_api/models/feature_flag_copy_object.rb +199 -0
  109. data/lib/launchdarkly_api/models/feature_flag_status.rb +22 -26
  110. data/lib/launchdarkly_api/models/feature_flag_status_across_environments.rb +203 -0
  111. data/lib/launchdarkly_api/models/feature_flag_status_for_queried_environment.rb +236 -0
  112. data/lib/launchdarkly_api/models/feature_flag_statuses.rb +7 -12
  113. data/lib/launchdarkly_api/models/feature_flags.rb +7 -12
  114. data/lib/launchdarkly_api/models/id.rb +7 -11
  115. data/lib/launchdarkly_api/models/link.rb +7 -12
  116. data/lib/launchdarkly_api/models/links.rb +7 -12
  117. data/lib/launchdarkly_api/models/ma_uby_category.rb +205 -0
  118. data/lib/launchdarkly_api/models/mau.rb +205 -0
  119. data/lib/launchdarkly_api/models/{actions.rb → mau_metadata.rb} +8 -13
  120. data/lib/launchdarkly_api/models/member.rb +26 -13
  121. data/lib/launchdarkly_api/models/members.rb +11 -14
  122. data/lib/launchdarkly_api/models/members_body.rb +9 -14
  123. data/lib/launchdarkly_api/models/patch_comment.rb +7 -12
  124. data/lib/launchdarkly_api/models/patch_operation.rb +10 -15
  125. data/lib/launchdarkly_api/models/policy.rb +40 -17
  126. data/lib/launchdarkly_api/models/prerequisite.rb +7 -12
  127. data/lib/launchdarkly_api/models/project.rb +7 -12
  128. data/lib/launchdarkly_api/models/project_body.rb +30 -15
  129. data/lib/launchdarkly_api/models/projects.rb +7 -12
  130. data/lib/launchdarkly_api/models/role.rb +7 -8
  131. data/lib/launchdarkly_api/models/rollout.rb +17 -13
  132. data/lib/launchdarkly_api/models/rule.rb +7 -12
  133. data/lib/launchdarkly_api/models/statement.rb +35 -31
  134. data/lib/launchdarkly_api/models/statements.rb +7 -12
  135. data/lib/launchdarkly_api/models/stream.rb +205 -0
  136. data/lib/launchdarkly_api/models/stream_by_sdk.rb +205 -0
  137. data/lib/launchdarkly_api/models/stream_by_sdk_links.rb +192 -0
  138. data/lib/launchdarkly_api/models/{resources.rb → stream_by_sdk_links_metadata.rb} +34 -12
  139. data/lib/launchdarkly_api/models/stream_links.rb +204 -0
  140. data/lib/launchdarkly_api/models/stream_sdk_version.rb +194 -0
  141. data/lib/launchdarkly_api/models/stream_sdk_version_data.rb +194 -0
  142. data/lib/launchdarkly_api/models/stream_usage_error.rb +192 -0
  143. data/lib/launchdarkly_api/models/stream_usage_links.rb +204 -0
  144. data/lib/launchdarkly_api/models/stream_usage_metadata.rb +203 -0
  145. data/lib/launchdarkly_api/models/stream_usage_series.rb +194 -0
  146. data/lib/launchdarkly_api/models/{custom_properties.rb → streams.rb} +17 -13
  147. data/lib/launchdarkly_api/models/target.rb +7 -12
  148. data/lib/launchdarkly_api/models/usage.rb +194 -0
  149. data/lib/launchdarkly_api/models/{custom_role_key_or_id.rb → usage_error.rb} +17 -13
  150. data/lib/launchdarkly_api/models/usage_links.rb +204 -0
  151. data/lib/launchdarkly_api/models/user.rb +7 -12
  152. data/lib/launchdarkly_api/models/user_flag_setting.rb +7 -12
  153. data/lib/launchdarkly_api/models/user_flag_settings.rb +7 -12
  154. data/lib/launchdarkly_api/models/user_record.rb +7 -12
  155. data/lib/launchdarkly_api/models/user_segment.rb +10 -15
  156. data/lib/launchdarkly_api/models/user_segment_body.rb +9 -14
  157. data/lib/launchdarkly_api/models/user_segment_rule.rb +7 -12
  158. data/lib/launchdarkly_api/models/user_segments.rb +7 -12
  159. data/lib/launchdarkly_api/models/user_settings_body.rb +7 -12
  160. data/lib/launchdarkly_api/models/users.rb +7 -12
  161. data/lib/launchdarkly_api/models/variation.rb +8 -13
  162. data/lib/launchdarkly_api/models/webhook.rb +17 -13
  163. data/lib/launchdarkly_api/models/webhook_body.rb +33 -17
  164. data/lib/launchdarkly_api/models/webhooks.rb +7 -12
  165. data/lib/launchdarkly_api/models/weighted_variation.rb +7 -12
  166. data/lib/launchdarkly_api/version.rb +3 -3
  167. data/lib/launchdarkly_api.rb +36 -8
  168. data/openapi.yml +1004 -115
  169. data/spec/api/audit_log_api_spec.rb +6 -8
  170. data/spec/api/custom_roles_api_spec.rb +8 -13
  171. data/spec/api/customer_metrics_api_spec.rb +141 -0
  172. data/spec/api/data_export_destinations_api_spec.rb +98 -0
  173. data/spec/api/environments_api_spec.rb +7 -11
  174. data/spec/api/feature_flags_api_spec.rb +36 -16
  175. data/spec/api/projects_api_spec.rb +8 -13
  176. data/spec/api/root_api_spec.rb +3 -4
  177. data/spec/api/team_members_api_spec.rb +8 -13
  178. data/spec/api/user_segments_api_spec.rb +8 -13
  179. data/spec/api/user_settings_api_spec.rb +5 -8
  180. data/spec/api/users_api_spec.rb +7 -11
  181. data/spec/api/webhooks_api_spec.rb +8 -13
  182. data/spec/api_client_spec.rb +36 -36
  183. data/spec/configuration_spec.rb +10 -10
  184. data/spec/models/audit_log_entries_spec.rb +4 -5
  185. data/spec/models/audit_log_entry_spec.rb +14 -15
  186. data/spec/models/audit_log_entry_target_spec.rb +5 -6
  187. data/spec/models/clause_spec.rb +6 -7
  188. data/spec/models/{action_spec.rb → copy_actions_spec.rb} +8 -9
  189. data/spec/models/custom_property_spec.rb +4 -5
  190. data/spec/models/custom_property_values_spec.rb +2 -3
  191. data/spec/models/custom_role_body_spec.rb +6 -7
  192. data/spec/models/custom_role_spec.rb +8 -9
  193. data/spec/models/custom_roles_spec.rb +4 -5
  194. data/spec/models/destination_amazon_kinesis_spec.rb +53 -0
  195. data/spec/models/destination_body_spec.rb +63 -0
  196. data/spec/models/destination_google_pub_sub_spec.rb +47 -0
  197. data/spec/models/destination_m_particle_spec.rb +59 -0
  198. data/spec/models/destination_segment_spec.rb +41 -0
  199. data/spec/models/destination_spec.rb +81 -0
  200. data/spec/models/destinations_spec.rb +47 -0
  201. data/spec/models/environment_post_spec.rb +36 -7
  202. data/spec/models/environment_spec.rb +25 -14
  203. data/spec/models/evaluation_usage_error_spec.rb +47 -0
  204. data/spec/models/events_spec.rb +41 -0
  205. data/spec/models/fallthrough_spec.rb +4 -5
  206. data/spec/models/feature_flag_body_spec.rb +9 -10
  207. data/spec/models/feature_flag_config_spec.rb +14 -21
  208. data/spec/models/feature_flag_copy_body_spec.rb +65 -0
  209. data/spec/models/feature_flag_copy_object_spec.rb +47 -0
  210. data/spec/models/feature_flag_spec.rb +35 -18
  211. data/spec/models/feature_flag_status_across_environments_spec.rb +53 -0
  212. data/spec/models/feature_flag_status_for_queried_environment_spec.rb +57 -0
  213. data/spec/models/feature_flag_status_spec.rb +14 -15
  214. data/spec/models/feature_flag_statuses_spec.rb +4 -5
  215. data/spec/models/feature_flags_spec.rb +4 -5
  216. data/spec/models/id_spec.rb +2 -3
  217. data/spec/models/link_spec.rb +4 -5
  218. data/spec/models/links_spec.rb +4 -5
  219. data/spec/models/ma_uby_category_spec.rb +53 -0
  220. data/spec/models/{actions_spec.rb → mau_metadata_spec.rb} +8 -9
  221. data/spec/models/mau_spec.rb +53 -0
  222. data/spec/models/member_spec.rb +21 -10
  223. data/spec/models/members_body_spec.rb +8 -9
  224. data/spec/models/members_spec.rb +4 -5
  225. data/spec/models/patch_comment_spec.rb +4 -5
  226. data/spec/models/patch_operation_spec.rb +5 -6
  227. data/spec/models/policy_spec.rb +17 -6
  228. data/spec/models/prerequisite_spec.rb +4 -5
  229. data/spec/models/project_body_spec.rb +17 -6
  230. data/spec/models/project_spec.rb +8 -9
  231. data/spec/models/projects_spec.rb +4 -5
  232. data/spec/models/role_spec.rb +2 -3
  233. data/spec/models/rollout_spec.rb +9 -4
  234. data/spec/models/rule_spec.rb +6 -7
  235. data/spec/models/statement_spec.rb +13 -14
  236. data/spec/models/statements_spec.rb +2 -3
  237. data/spec/models/stream_by_sdk_links_metadata_spec.rb +53 -0
  238. data/spec/models/stream_by_sdk_links_spec.rb +47 -0
  239. data/spec/models/stream_by_sdk_spec.rb +53 -0
  240. data/spec/models/stream_links_spec.rb +53 -0
  241. data/spec/models/stream_sdk_version_data_spec.rb +47 -0
  242. data/spec/models/stream_sdk_version_spec.rb +47 -0
  243. data/spec/models/stream_spec.rb +53 -0
  244. data/spec/models/stream_usage_error_spec.rb +47 -0
  245. data/spec/models/stream_usage_links_spec.rb +53 -0
  246. data/spec/models/stream_usage_metadata_spec.rb +53 -0
  247. data/spec/models/stream_usage_series_spec.rb +47 -0
  248. data/spec/models/streams_spec.rb +41 -0
  249. data/spec/models/target_spec.rb +4 -5
  250. data/spec/models/usage_error_spec.rb +41 -0
  251. data/spec/models/usage_links_spec.rb +53 -0
  252. data/spec/models/usage_spec.rb +47 -0
  253. data/spec/models/user_flag_setting_spec.rb +5 -6
  254. data/spec/models/user_flag_settings_spec.rb +4 -5
  255. data/spec/models/user_record_spec.rb +7 -8
  256. data/spec/models/user_segment_body_spec.rb +6 -7
  257. data/spec/models/user_segment_rule_spec.rb +5 -6
  258. data/spec/models/user_segment_spec.rb +12 -13
  259. data/spec/models/user_segments_spec.rb +4 -5
  260. data/spec/models/user_settings_body_spec.rb +3 -4
  261. data/spec/models/user_spec.rb +13 -14
  262. data/spec/models/users_spec.rb +5 -6
  263. data/spec/models/variation_spec.rb +5 -6
  264. data/spec/models/webhook_body_spec.rb +19 -8
  265. data/spec/models/webhook_spec.rb +15 -10
  266. data/spec/models/webhooks_spec.rb +4 -5
  267. data/spec/models/weighted_variation_spec.rb +4 -5
  268. data/spec/spec_helper.rb +2 -2
  269. metadata +187 -74
  270. data/docs/Resource.md +0 -7
  271. data/docs/Resources.md +0 -7
  272. data/lib/launchdarkly_api/models/resource.rb +0 -179
  273. data/spec/models/custom_properties_spec.rb +0 -36
  274. data/spec/models/custom_role_key_or_id_spec.rb +0 -36
  275. data/spec/models/resource_spec.rb +0 -36
  276. data/spec/models/resources_spec.rb +0 -36
@@ -3,14 +3,14 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.10
6
+ OpenAPI spec version: 2.0.27
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.8
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module LaunchDarklyApi
16
16
  class FeatureFlagsApi
@@ -19,27 +19,88 @@ module LaunchDarklyApi
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Copies the feature flag configuration from one environment to the same feature flag in another environment.
23
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
24
+ # @param feature_flag_key The feature flag's key. The key identifies the flag in your code.
25
+ # @param feature_flag_copy_body Copy feature flag configurations between environments.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [FeatureFlag]
28
+ def copy_feature_flag(project_key, feature_flag_key, feature_flag_copy_body, opts = {})
29
+ data, _status_code, _headers = copy_feature_flag_with_http_info(project_key, feature_flag_key, feature_flag_copy_body, opts)
30
+ data
31
+ end
32
+
33
+ # Copies the feature flag configuration from one environment to the same feature flag in another environment.
34
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
35
+ # @param feature_flag_key The feature flag's key. The key identifies the flag in your code.
36
+ # @param feature_flag_copy_body Copy feature flag configurations between environments.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(FeatureFlag, Fixnum, Hash)>] FeatureFlag data, response status code and response headers
39
+ def copy_feature_flag_with_http_info(project_key, feature_flag_key, feature_flag_copy_body, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.copy_feature_flag ...'
42
+ end
43
+ # verify the required parameter 'project_key' is set
44
+ if @api_client.config.client_side_validation && project_key.nil?
45
+ fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.copy_feature_flag"
46
+ end
47
+ # verify the required parameter 'feature_flag_key' is set
48
+ if @api_client.config.client_side_validation && feature_flag_key.nil?
49
+ fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.copy_feature_flag"
50
+ end
51
+ # verify the required parameter 'feature_flag_copy_body' is set
52
+ if @api_client.config.client_side_validation && feature_flag_copy_body.nil?
53
+ fail ArgumentError, "Missing the required parameter 'feature_flag_copy_body' when calling FeatureFlagsApi.copy_feature_flag"
54
+ end
55
+ # resource path
56
+ local_var_path = '/flags/{projectKey}/{featureFlagKey}/copy'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
57
+
58
+ # query parameters
59
+ query_params = {}
22
60
 
61
+ # header parameters
62
+ header_params = {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+ # HTTP header 'Content-Type'
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = {}
70
+
71
+ # http body (model)
72
+ post_body = @api_client.object_to_http_body(feature_flag_copy_body)
73
+ auth_names = ['Token']
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => 'FeatureFlag')
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: FeatureFlagsApi#copy_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
23
86
  # Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
24
- #
25
87
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
26
88
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
27
89
  # @param [Hash] opts the optional parameters
28
90
  # @return [nil]
29
91
  def delete_feature_flag(project_key, feature_flag_key, opts = {})
30
92
  delete_feature_flag_with_http_info(project_key, feature_flag_key, opts)
31
- return nil
93
+ nil
32
94
  end
33
95
 
34
96
  # Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.
35
- #
36
97
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
37
98
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
38
99
  # @param [Hash] opts the optional parameters
39
100
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
40
101
  def delete_feature_flag_with_http_info(project_key, feature_flag_key, opts = {})
41
102
  if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.delete_feature_flag ..."
103
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.delete_feature_flag ...'
43
104
  end
44
105
  # verify the required parameter 'project_key' is set
45
106
  if @api_client.config.client_side_validation && project_key.nil?
@@ -50,7 +111,7 @@ module LaunchDarklyApi
50
111
  fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.delete_feature_flag"
51
112
  end
52
113
  # resource path
53
- local_var_path = "/flags/{projectKey}/{featureFlagKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
114
+ local_var_path = '/flags/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
54
115
 
55
116
  # query parameters
56
117
  query_params = {}
@@ -79,9 +140,7 @@ module LaunchDarklyApi
79
140
  end
80
141
  return data, status_code, headers
81
142
  end
82
-
83
143
  # Get a single feature flag by key.
84
- #
85
144
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
86
145
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
87
146
  # @param [Hash] opts the optional parameters
@@ -89,11 +148,10 @@ module LaunchDarklyApi
89
148
  # @return [FeatureFlag]
90
149
  def get_feature_flag(project_key, feature_flag_key, opts = {})
91
150
  data, _status_code, _headers = get_feature_flag_with_http_info(project_key, feature_flag_key, opts)
92
- return data
151
+ data
93
152
  end
94
153
 
95
154
  # Get a single feature flag by key.
96
- #
97
155
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
98
156
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
99
157
  # @param [Hash] opts the optional parameters
@@ -101,7 +159,7 @@ module LaunchDarklyApi
101
159
  # @return [Array<(FeatureFlag, Fixnum, Hash)>] FeatureFlag data, response status code and response headers
102
160
  def get_feature_flag_with_http_info(project_key, feature_flag_key, opts = {})
103
161
  if @api_client.config.debugging
104
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.get_feature_flag ..."
162
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag ...'
105
163
  end
106
164
  # verify the required parameter 'project_key' is set
107
165
  if @api_client.config.client_side_validation && project_key.nil?
@@ -112,7 +170,7 @@ module LaunchDarklyApi
112
170
  fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_feature_flag"
113
171
  end
114
172
  # resource path
115
- local_var_path = "/flags/{projectKey}/{featureFlagKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
173
+ local_var_path = '/flags/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
116
174
 
117
175
  # query parameters
118
176
  query_params = {}
@@ -143,9 +201,7 @@ module LaunchDarklyApi
143
201
  end
144
202
  return data, status_code, headers
145
203
  end
146
-
147
204
  # Get the status for a particular feature flag.
148
- #
149
205
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
150
206
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
151
207
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
@@ -153,11 +209,10 @@ module LaunchDarklyApi
153
209
  # @return [FeatureFlagStatus]
154
210
  def get_feature_flag_status(project_key, environment_key, feature_flag_key, opts = {})
155
211
  data, _status_code, _headers = get_feature_flag_status_with_http_info(project_key, environment_key, feature_flag_key, opts)
156
- return data
212
+ data
157
213
  end
158
214
 
159
215
  # Get the status for a particular feature flag.
160
- #
161
216
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
162
217
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
163
218
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
@@ -165,7 +220,7 @@ module LaunchDarklyApi
165
220
  # @return [Array<(FeatureFlagStatus, Fixnum, Hash)>] FeatureFlagStatus data, response status code and response headers
166
221
  def get_feature_flag_status_with_http_info(project_key, environment_key, feature_flag_key, opts = {})
167
222
  if @api_client.config.debugging
168
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.get_feature_flag_status ..."
223
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_status ...'
169
224
  end
170
225
  # verify the required parameter 'project_key' is set
171
226
  if @api_client.config.client_side_validation && project_key.nil?
@@ -180,7 +235,7 @@ module LaunchDarklyApi
180
235
  fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_feature_flag_status"
181
236
  end
182
237
  # resource path
183
- local_var_path = "/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
238
+ local_var_path = '/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
184
239
 
185
240
  # query parameters
186
241
  query_params = {}
@@ -210,27 +265,82 @@ module LaunchDarklyApi
210
265
  end
211
266
  return data, status_code, headers
212
267
  end
268
+ # Get the status for a particular feature flag across environments
269
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
270
+ # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
271
+ # @param [Hash] opts the optional parameters
272
+ # @return [FeatureFlagStatusAcrossEnvironments]
273
+ def get_feature_flag_status_across_environments(project_key, feature_flag_key, opts = {})
274
+ data, _status_code, _headers = get_feature_flag_status_across_environments_with_http_info(project_key, feature_flag_key, opts)
275
+ data
276
+ end
277
+
278
+ # Get the status for a particular feature flag across environments
279
+ # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
280
+ # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
281
+ # @param [Hash] opts the optional parameters
282
+ # @return [Array<(FeatureFlagStatusAcrossEnvironments, Fixnum, Hash)>] FeatureFlagStatusAcrossEnvironments data, response status code and response headers
283
+ def get_feature_flag_status_across_environments_with_http_info(project_key, feature_flag_key, opts = {})
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_status_across_environments ...'
286
+ end
287
+ # verify the required parameter 'project_key' is set
288
+ if @api_client.config.client_side_validation && project_key.nil?
289
+ fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flag_status_across_environments"
290
+ end
291
+ # verify the required parameter 'feature_flag_key' is set
292
+ if @api_client.config.client_side_validation && feature_flag_key.nil?
293
+ fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.get_feature_flag_status_across_environments"
294
+ end
295
+ # resource path
296
+ local_var_path = '/flag-status/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
213
297
 
298
+ # query parameters
299
+ query_params = {}
300
+
301
+ # header parameters
302
+ header_params = {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+ # HTTP header 'Content-Type'
306
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
307
+
308
+ # form parameters
309
+ form_params = {}
310
+
311
+ # http body (model)
312
+ post_body = nil
313
+ auth_names = ['Token']
314
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
315
+ :header_params => header_params,
316
+ :query_params => query_params,
317
+ :form_params => form_params,
318
+ :body => post_body,
319
+ :auth_names => auth_names,
320
+ :return_type => 'FeatureFlagStatusAcrossEnvironments')
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug "API called: FeatureFlagsApi#get_feature_flag_status_across_environments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
323
+ end
324
+ return data, status_code, headers
325
+ end
214
326
  # Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
215
- #
216
327
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
217
328
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
218
329
  # @param [Hash] opts the optional parameters
219
330
  # @return [FeatureFlagStatuses]
220
331
  def get_feature_flag_statuses(project_key, environment_key, opts = {})
221
332
  data, _status_code, _headers = get_feature_flag_statuses_with_http_info(project_key, environment_key, opts)
222
- return data
333
+ data
223
334
  end
224
335
 
225
336
  # Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.
226
- #
227
337
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
228
338
  # @param environment_key The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
229
339
  # @param [Hash] opts the optional parameters
230
340
  # @return [Array<(FeatureFlagStatuses, Fixnum, Hash)>] FeatureFlagStatuses data, response status code and response headers
231
341
  def get_feature_flag_statuses_with_http_info(project_key, environment_key, opts = {})
232
342
  if @api_client.config.debugging
233
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.get_feature_flag_statuses ..."
343
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flag_statuses ...'
234
344
  end
235
345
  # verify the required parameter 'project_key' is set
236
346
  if @api_client.config.client_side_validation && project_key.nil?
@@ -241,7 +351,7 @@ module LaunchDarklyApi
241
351
  fail ArgumentError, "Missing the required parameter 'environment_key' when calling FeatureFlagsApi.get_feature_flag_statuses"
242
352
  end
243
353
  # resource path
244
- local_var_path = "/flag-statuses/{projectKey}/{environmentKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
354
+ local_var_path = '/flag-statuses/{projectKey}/{environmentKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'environmentKey' + '}', environment_key.to_s)
245
355
 
246
356
  # query parameters
247
357
  query_params = {}
@@ -271,40 +381,43 @@ module LaunchDarklyApi
271
381
  end
272
382
  return data, status_code, headers
273
383
  end
274
-
275
384
  # Get a list of all features in the given project.
276
- #
277
385
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
278
386
  # @param [Hash] opts the optional parameters
279
387
  # @option opts [String] :env By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env&#x3D;production will restrict the returned configurations to just your production environment.
388
+ # @option opts [BOOLEAN] :summary By default in api version &gt;&#x3D; 1, flags will _not_ include their list of prerequisites, targets or rules. Set summary&#x3D;0 to include these fields for each flag returned.
389
+ # @option opts [BOOLEAN] :archived When set to 1, archived flags will be included in the list of flags returned. By default, archived flags are not included in the list of flags.
280
390
  # @option opts [String] :tag Filter by tag. A tag can be used to group flags across projects.
281
391
  # @return [FeatureFlags]
282
392
  def get_feature_flags(project_key, opts = {})
283
393
  data, _status_code, _headers = get_feature_flags_with_http_info(project_key, opts)
284
- return data
394
+ data
285
395
  end
286
396
 
287
397
  # Get a list of all features in the given project.
288
- #
289
398
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
290
399
  # @param [Hash] opts the optional parameters
291
400
  # @option opts [String] :env By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env&#x3D;production will restrict the returned configurations to just your production environment.
401
+ # @option opts [BOOLEAN] :summary By default in api version &gt;&#x3D; 1, flags will _not_ include their list of prerequisites, targets or rules. Set summary&#x3D;0 to include these fields for each flag returned.
402
+ # @option opts [BOOLEAN] :archived When set to 1, archived flags will be included in the list of flags returned. By default, archived flags are not included in the list of flags.
292
403
  # @option opts [String] :tag Filter by tag. A tag can be used to group flags across projects.
293
404
  # @return [Array<(FeatureFlags, Fixnum, Hash)>] FeatureFlags data, response status code and response headers
294
405
  def get_feature_flags_with_http_info(project_key, opts = {})
295
406
  if @api_client.config.debugging
296
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.get_feature_flags ..."
407
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.get_feature_flags ...'
297
408
  end
298
409
  # verify the required parameter 'project_key' is set
299
410
  if @api_client.config.client_side_validation && project_key.nil?
300
411
  fail ArgumentError, "Missing the required parameter 'project_key' when calling FeatureFlagsApi.get_feature_flags"
301
412
  end
302
413
  # resource path
303
- local_var_path = "/flags/{projectKey}".sub('{' + 'projectKey' + '}', project_key.to_s)
414
+ local_var_path = '/flags/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)
304
415
 
305
416
  # query parameters
306
417
  query_params = {}
307
418
  query_params[:'env'] = opts[:'env'] if !opts[:'env'].nil?
419
+ query_params[:'summary'] = opts[:'summary'] if !opts[:'summary'].nil?
420
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
308
421
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
309
422
 
310
423
  # header parameters
@@ -332,9 +445,7 @@ module LaunchDarklyApi
332
445
  end
333
446
  return data, status_code, headers
334
447
  end
335
-
336
448
  # Perform a partial update to a feature.
337
- #
338
449
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
339
450
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
340
451
  # @param patch_comment Requires a JSON Patch representation of the desired changes to the project, and an optional comment. &#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.
@@ -342,11 +453,10 @@ module LaunchDarklyApi
342
453
  # @return [FeatureFlag]
343
454
  def patch_feature_flag(project_key, feature_flag_key, patch_comment, opts = {})
344
455
  data, _status_code, _headers = patch_feature_flag_with_http_info(project_key, feature_flag_key, patch_comment, opts)
345
- return data
456
+ data
346
457
  end
347
458
 
348
459
  # Perform a partial update to a feature.
349
- #
350
460
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
351
461
  # @param feature_flag_key The feature flag&#39;s key. The key identifies the flag in your code.
352
462
  # @param patch_comment Requires a JSON Patch representation of the desired changes to the project, and an optional comment. &#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.
@@ -354,7 +464,7 @@ module LaunchDarklyApi
354
464
  # @return [Array<(FeatureFlag, Fixnum, Hash)>] FeatureFlag data, response status code and response headers
355
465
  def patch_feature_flag_with_http_info(project_key, feature_flag_key, patch_comment, opts = {})
356
466
  if @api_client.config.debugging
357
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.patch_feature_flag ..."
467
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.patch_feature_flag ...'
358
468
  end
359
469
  # verify the required parameter 'project_key' is set
360
470
  if @api_client.config.client_side_validation && project_key.nil?
@@ -369,7 +479,7 @@ module LaunchDarklyApi
369
479
  fail ArgumentError, "Missing the required parameter 'patch_comment' when calling FeatureFlagsApi.patch_feature_flag"
370
480
  end
371
481
  # resource path
372
- local_var_path = "/flags/{projectKey}/{featureFlagKey}".sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
482
+ local_var_path = '/flags/{projectKey}/{featureFlagKey}'.sub('{' + 'projectKey' + '}', project_key.to_s).sub('{' + 'featureFlagKey' + '}', feature_flag_key.to_s)
373
483
 
374
484
  # query parameters
375
485
  query_params = {}
@@ -399,9 +509,7 @@ module LaunchDarklyApi
399
509
  end
400
510
  return data, status_code, headers
401
511
  end
402
-
403
512
  # Creates a new feature flag.
404
- #
405
513
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
406
514
  # @param feature_flag_body Create a new feature flag.
407
515
  # @param [Hash] opts the optional parameters
@@ -409,11 +517,10 @@ module LaunchDarklyApi
409
517
  # @return [FeatureFlag]
410
518
  def post_feature_flag(project_key, feature_flag_body, opts = {})
411
519
  data, _status_code, _headers = post_feature_flag_with_http_info(project_key, feature_flag_body, opts)
412
- return data
520
+ data
413
521
  end
414
522
 
415
523
  # Creates a new feature flag.
416
- #
417
524
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
418
525
  # @param feature_flag_body Create a new feature flag.
419
526
  # @param [Hash] opts the optional parameters
@@ -421,7 +528,7 @@ module LaunchDarklyApi
421
528
  # @return [Array<(FeatureFlag, Fixnum, Hash)>] FeatureFlag data, response status code and response headers
422
529
  def post_feature_flag_with_http_info(project_key, feature_flag_body, opts = {})
423
530
  if @api_client.config.debugging
424
- @api_client.config.logger.debug "Calling API: FeatureFlagsApi.post_feature_flag ..."
531
+ @api_client.config.logger.debug 'Calling API: FeatureFlagsApi.post_feature_flag ...'
425
532
  end
426
533
  # verify the required parameter 'project_key' is set
427
534
  if @api_client.config.client_side_validation && project_key.nil?
@@ -432,7 +539,7 @@ module LaunchDarklyApi
432
539
  fail ArgumentError, "Missing the required parameter 'feature_flag_body' when calling FeatureFlagsApi.post_feature_flag"
433
540
  end
434
541
  # resource path
435
- local_var_path = "/flags/{projectKey}".sub('{' + 'projectKey' + '}', project_key.to_s)
542
+ local_var_path = '/flags/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)
436
543
 
437
544
  # query parameters
438
545
  query_params = {}
@@ -3,14 +3,14 @@
3
3
 
4
4
  #Build custom integrations with the LaunchDarkly REST API
5
5
 
6
- OpenAPI spec version: 2.0.10
6
+ OpenAPI spec version: 2.0.27
7
7
  Contact: support@launchdarkly.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
9
+ Swagger Codegen version: 2.4.8
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'uri'
14
14
 
15
15
  module LaunchDarklyApi
16
16
  class ProjectsApi
@@ -19,32 +19,29 @@ module LaunchDarklyApi
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
24
- #
25
23
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
26
24
  # @param [Hash] opts the optional parameters
27
25
  # @return [nil]
28
26
  def delete_project(project_key, opts = {})
29
27
  delete_project_with_http_info(project_key, opts)
30
- return nil
28
+ nil
31
29
  end
32
30
 
33
31
  # Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.
34
- #
35
32
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
36
33
  # @param [Hash] opts the optional parameters
37
34
  # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
38
35
  def delete_project_with_http_info(project_key, opts = {})
39
36
  if @api_client.config.debugging
40
- @api_client.config.logger.debug "Calling API: ProjectsApi.delete_project ..."
37
+ @api_client.config.logger.debug 'Calling API: ProjectsApi.delete_project ...'
41
38
  end
42
39
  # verify the required parameter 'project_key' is set
43
40
  if @api_client.config.client_side_validation && project_key.nil?
44
41
  fail ArgumentError, "Missing the required parameter 'project_key' when calling ProjectsApi.delete_project"
45
42
  end
46
43
  # resource path
47
- local_var_path = "/projects/{projectKey}".sub('{' + 'projectKey' + '}', project_key.to_s)
44
+ local_var_path = '/projects/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)
48
45
 
49
46
  # query parameters
50
47
  query_params = {}
@@ -73,32 +70,29 @@ module LaunchDarklyApi
73
70
  end
74
71
  return data, status_code, headers
75
72
  end
76
-
77
73
  # Fetch a single project by key.
78
- #
79
74
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
80
75
  # @param [Hash] opts the optional parameters
81
76
  # @return [Project]
82
77
  def get_project(project_key, opts = {})
83
78
  data, _status_code, _headers = get_project_with_http_info(project_key, opts)
84
- return data
79
+ data
85
80
  end
86
81
 
87
82
  # Fetch a single project by key.
88
- #
89
83
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
90
84
  # @param [Hash] opts the optional parameters
91
85
  # @return [Array<(Project, Fixnum, Hash)>] Project data, response status code and response headers
92
86
  def get_project_with_http_info(project_key, opts = {})
93
87
  if @api_client.config.debugging
94
- @api_client.config.logger.debug "Calling API: ProjectsApi.get_project ..."
88
+ @api_client.config.logger.debug 'Calling API: ProjectsApi.get_project ...'
95
89
  end
96
90
  # verify the required parameter 'project_key' is set
97
91
  if @api_client.config.client_side_validation && project_key.nil?
98
92
  fail ArgumentError, "Missing the required parameter 'project_key' when calling ProjectsApi.get_project"
99
93
  end
100
94
  # resource path
101
- local_var_path = "/projects/{projectKey}".sub('{' + 'projectKey' + '}', project_key.to_s)
95
+ local_var_path = '/projects/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)
102
96
 
103
97
  # query parameters
104
98
  query_params = {}
@@ -128,26 +122,23 @@ module LaunchDarklyApi
128
122
  end
129
123
  return data, status_code, headers
130
124
  end
131
-
132
125
  # Returns a list of all projects in the account.
133
- #
134
126
  # @param [Hash] opts the optional parameters
135
127
  # @return [Projects]
136
128
  def get_projects(opts = {})
137
129
  data, _status_code, _headers = get_projects_with_http_info(opts)
138
- return data
130
+ data
139
131
  end
140
132
 
141
133
  # Returns a list of all projects in the account.
142
- #
143
134
  # @param [Hash] opts the optional parameters
144
135
  # @return [Array<(Projects, Fixnum, Hash)>] Projects data, response status code and response headers
145
136
  def get_projects_with_http_info(opts = {})
146
137
  if @api_client.config.debugging
147
- @api_client.config.logger.debug "Calling API: ProjectsApi.get_projects ..."
138
+ @api_client.config.logger.debug 'Calling API: ProjectsApi.get_projects ...'
148
139
  end
149
140
  # resource path
150
- local_var_path = "/projects"
141
+ local_var_path = '/projects'
151
142
 
152
143
  # query parameters
153
144
  query_params = {}
@@ -177,27 +168,24 @@ module LaunchDarklyApi
177
168
  end
178
169
  return data, status_code, headers
179
170
  end
180
-
181
171
  # Modify a project by ID.
182
- #
183
172
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
184
173
  # @param patch_delta Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39;
185
174
  # @param [Hash] opts the optional parameters
186
175
  # @return [Project]
187
176
  def patch_project(project_key, patch_delta, opts = {})
188
177
  data, _status_code, _headers = patch_project_with_http_info(project_key, patch_delta, opts)
189
- return data
178
+ data
190
179
  end
191
180
 
192
181
  # Modify a project by ID.
193
- #
194
182
  # @param project_key The project key, used to tie the flags together under one project so they can be managed together.
195
183
  # @param patch_delta Requires a JSON Patch representation of the desired changes to the project. &#39;http://jsonpatch.com/&#39;
196
184
  # @param [Hash] opts the optional parameters
197
185
  # @return [Array<(Project, Fixnum, Hash)>] Project data, response status code and response headers
198
186
  def patch_project_with_http_info(project_key, patch_delta, opts = {})
199
187
  if @api_client.config.debugging
200
- @api_client.config.logger.debug "Calling API: ProjectsApi.patch_project ..."
188
+ @api_client.config.logger.debug 'Calling API: ProjectsApi.patch_project ...'
201
189
  end
202
190
  # verify the required parameter 'project_key' is set
203
191
  if @api_client.config.client_side_validation && project_key.nil?
@@ -208,7 +196,7 @@ module LaunchDarklyApi
208
196
  fail ArgumentError, "Missing the required parameter 'patch_delta' when calling ProjectsApi.patch_project"
209
197
  end
210
198
  # resource path
211
- local_var_path = "/projects/{projectKey}".sub('{' + 'projectKey' + '}', project_key.to_s)
199
+ local_var_path = '/projects/{projectKey}'.sub('{' + 'projectKey' + '}', project_key.to_s)
212
200
 
213
201
  # query parameters
214
202
  query_params = {}
@@ -238,32 +226,29 @@ module LaunchDarklyApi
238
226
  end
239
227
  return data, status_code, headers
240
228
  end
241
-
242
229
  # Create a new project with the given key and name.
243
- #
244
230
  # @param project_body Project keys must be unique within an account.
245
231
  # @param [Hash] opts the optional parameters
246
- # @return [nil]
232
+ # @return [Project]
247
233
  def post_project(project_body, opts = {})
248
- post_project_with_http_info(project_body, opts)
249
- return nil
234
+ data, _status_code, _headers = post_project_with_http_info(project_body, opts)
235
+ data
250
236
  end
251
237
 
252
238
  # Create a new project with the given key and name.
253
- #
254
239
  # @param project_body Project keys must be unique within an account.
255
240
  # @param [Hash] opts the optional parameters
256
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
241
+ # @return [Array<(Project, Fixnum, Hash)>] Project data, response status code and response headers
257
242
  def post_project_with_http_info(project_body, opts = {})
258
243
  if @api_client.config.debugging
259
- @api_client.config.logger.debug "Calling API: ProjectsApi.post_project ..."
244
+ @api_client.config.logger.debug 'Calling API: ProjectsApi.post_project ...'
260
245
  end
261
246
  # verify the required parameter 'project_body' is set
262
247
  if @api_client.config.client_side_validation && project_body.nil?
263
248
  fail ArgumentError, "Missing the required parameter 'project_body' when calling ProjectsApi.post_project"
264
249
  end
265
250
  # resource path
266
- local_var_path = "/projects"
251
+ local_var_path = '/projects'
267
252
 
268
253
  # query parameters
269
254
  query_params = {}
@@ -286,7 +271,8 @@ module LaunchDarklyApi
286
271
  :query_params => query_params,
287
272
  :form_params => form_params,
288
273
  :body => post_body,
289
- :auth_names => auth_names)
274
+ :auth_names => auth_names,
275
+ :return_type => 'Project')
290
276
  if @api_client.config.debugging
291
277
  @api_client.config.logger.debug "API called: ProjectsApi#post_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
292
278
  end