Class: LaunchDarklyApi::TeamMembersApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::TeamMembersApi
- Defined in:
- lib/launchdarkly_api/api/team_members_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_member(member_id, opts = {}) ⇒ nil
Delete a team member by ID.
-
#delete_member_with_http_info(member_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a team member by ID.
-
#get_me(opts = {}) ⇒ Member
Get the current team member associated with the token.
-
#get_me_with_http_info(opts = {}) ⇒ Array<(Member, Fixnum, Hash)>
Get the current team member associated with the token.
-
#get_member(member_id, opts = {}) ⇒ Member
Get a single team member by ID.
-
#get_member_with_http_info(member_id, opts = {}) ⇒ Array<(Member, Fixnum, Hash)>
Get a single team member by ID.
-
#get_members(opts = {}) ⇒ Members
Returns a list of all members in the account.
-
#get_members_with_http_info(opts = {}) ⇒ Array<(Members, Fixnum, Hash)>
Returns a list of all members in the account.
-
#initialize(api_client = ApiClient.default) ⇒ TeamMembersApi
constructor
A new instance of TeamMembersApi.
-
#patch_member(member_id, patch_delta, opts = {}) ⇒ Member
Modify a team member by ID.
-
#patch_member_with_http_info(member_id, patch_delta, opts = {}) ⇒ Array<(Member, Fixnum, Hash)>
Modify a team member by ID.
-
#post_members(members_body, opts = {}) ⇒ Members
Invite new members.
-
#post_members_with_http_info(members_body, opts = {}) ⇒ Array<(Members, Fixnum, Hash)>
Invite new members.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TeamMembersApi
Returns a new instance of TeamMembersApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_member(member_id, opts = {}) ⇒ nil
Delete a team member by ID.
26 27 28 29 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 26 def delete_member(member_id, opts = {}) delete_member_with_http_info(member_id, opts) nil end |
#delete_member_with_http_info(member_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a team member by ID.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 35 def delete_member_with_http_info(member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamMembersApi.delete_member ...' end # verify the required parameter 'member_id' is set if @api_client.config.client_side_validation && member_id.nil? fail ArgumentError, "Missing the required parameter 'member_id' when calling TeamMembersApi.delete_member" end # resource path local_var_path = '/members/{memberId}'.sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamMembersApi#delete_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_me(opts = {}) ⇒ Member
Get the current team member associated with the token
76 77 78 79 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 76 def get_me(opts = {}) data, _status_code, _headers = get_me_with_http_info(opts) data end |
#get_me_with_http_info(opts = {}) ⇒ Array<(Member, Fixnum, Hash)>
Get the current team member associated with the token
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 84 def get_me_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamMembersApi.get_me ...' end # resource path local_var_path = '/members/me' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Member') if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamMembersApi#get_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_member(member_id, opts = {}) ⇒ Member
Get a single team member by ID.
123 124 125 126 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 123 def get_member(member_id, opts = {}) data, _status_code, _headers = get_member_with_http_info(member_id, opts) data end |
#get_member_with_http_info(member_id, opts = {}) ⇒ Array<(Member, Fixnum, Hash)>
Get a single team member by ID.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 132 def get_member_with_http_info(member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamMembersApi.get_member ...' end # verify the required parameter 'member_id' is set if @api_client.config.client_side_validation && member_id.nil? fail ArgumentError, "Missing the required parameter 'member_id' when calling TeamMembersApi.get_member" end # resource path local_var_path = '/members/{memberId}'.sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Member') if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamMembersApi#get_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_members(opts = {}) ⇒ Members
Returns a list of all members in the account.
178 179 180 181 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 178 def get_members(opts = {}) data, _status_code, _headers = get_members_with_http_info(opts) data end |
#get_members_with_http_info(opts = {}) ⇒ Array<(Members, Fixnum, Hash)>
Returns a list of all members in the account.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 190 def get_members_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamMembersApi.get_members ...' end # resource path local_var_path = '/members' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Members') if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamMembersApi#get_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_member(member_id, patch_delta, opts = {}) ⇒ Member
Modify a team member by ID.
234 235 236 237 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 234 def patch_member(member_id, patch_delta, opts = {}) data, _status_code, _headers = patch_member_with_http_info(member_id, patch_delta, opts) data end |
#patch_member_with_http_info(member_id, patch_delta, opts = {}) ⇒ Array<(Member, Fixnum, Hash)>
Modify a team member by ID.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 244 def patch_member_with_http_info(member_id, patch_delta, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamMembersApi.patch_member ...' end # verify the required parameter 'member_id' is set if @api_client.config.client_side_validation && member_id.nil? fail ArgumentError, "Missing the required parameter 'member_id' when calling TeamMembersApi.patch_member" end # verify the required parameter 'patch_delta' is set if @api_client.config.client_side_validation && patch_delta.nil? fail ArgumentError, "Missing the required parameter 'patch_delta' when calling TeamMembersApi.patch_member" end # resource path local_var_path = '/members/{memberId}'.sub('{' + 'memberId' + '}', member_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(patch_delta) auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Member') if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamMembersApi#patch_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_members(members_body, opts = {}) ⇒ Members
Invite new members.
291 292 293 294 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 291 def post_members(members_body, opts = {}) data, _status_code, _headers = post_members_with_http_info(members_body, opts) data end |
#post_members_with_http_info(members_body, opts = {}) ⇒ Array<(Members, Fixnum, Hash)>
Invite new members.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/launchdarkly_api/api/team_members_api.rb', line 300 def post_members_with_http_info(members_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TeamMembersApi.post_members ...' end # verify the required parameter 'members_body' is set if @api_client.config.client_side_validation && members_body.nil? fail ArgumentError, "Missing the required parameter 'members_body' when calling TeamMembersApi.post_members" end # resource path local_var_path = '/members' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(members_body) auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Members') if @api_client.config.debugging @api_client.config.logger.debug "API called: TeamMembersApi#post_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |