class FlatApi::GroupApi
Attributes
Public Class Methods
# File lib/flat_api/api/group_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Get group information
@param group Unique identifier of a Flat group @param [Hash] opts the optional parameters @return [GroupDetails]
# File lib/flat_api/api/group_api.rb, line 28 def get_group_details(group, opts = {}) data, _status_code, _headers = get_group_details_with_http_info(group, opts) return data end
Get group information
@param group Unique identifier of a Flat group @param [Hash] opts the optional parameters @return [Array<(GroupDetails
, Fixnum, Hash)>] GroupDetails
data, response status code and response headers
# File lib/flat_api/api/group_api.rb, line 38 def get_group_details_with_http_info(group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupApi.get_group_details ..." end # verify the required parameter 'group' is set if @api_client.config.client_side_validation && group.nil? fail ArgumentError, "Missing the required parameter 'group' when calling GroupApi.get_group_details" end # resource path local_var_path = "/groups/{group}".sub('{' + 'group' + '}', group.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 = ['OAuth2'] 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 => 'GroupDetails') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupApi#get_group_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List group's scores Get the list of scores shared with a group. @param group Unique identifier of a Flat group @param [Hash] opts the optional parameters @option opts [String] :parent Filter the score forked from the score id `parent` @return [Array<ScoreDetails>]
# File lib/flat_api/api/group_api.rb, line 84 def get_group_scores(group, opts = {}) data, _status_code, _headers = get_group_scores_with_http_info(group, opts) return data end
List group's scores Get the list of scores shared with a group. @param group Unique identifier of a Flat group @param [Hash] opts the optional parameters @option opts [String] :parent Filter the score forked from the score id `parent` @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
# File lib/flat_api/api/group_api.rb, line 95 def get_group_scores_with_http_info(group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupApi.get_group_scores ..." end # verify the required parameter 'group' is set if @api_client.config.client_side_validation && group.nil? fail ArgumentError, "Missing the required parameter 'group' when calling GroupApi.get_group_scores" end # resource path local_var_path = "/groups/{group}/scores".sub('{' + 'group' + '}', group.to_s) # query parameters query_params = {} query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].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 = ['OAuth2'] 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 => 'Array<ScoreDetails>') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List group's users
@param group Unique identifier of a Flat group @param [Hash] opts the optional parameters @return [Array<UserPublic>]
# File lib/flat_api/api/group_api.rb, line 141 def list_group_users(group, opts = {}) data, _status_code, _headers = list_group_users_with_http_info(group, opts) return data end
List group's users
@param group Unique identifier of a Flat group @param [Hash] opts the optional parameters @return [Array<(Array<UserPublic>, Fixnum, Hash)>] Array<UserPublic> data, response status code and response headers
# File lib/flat_api/api/group_api.rb, line 151 def list_group_users_with_http_info(group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupApi.list_group_users ..." end # verify the required parameter 'group' is set if @api_client.config.client_side_validation && group.nil? fail ArgumentError, "Missing the required parameter 'group' when calling GroupApi.list_group_users" end # resource path local_var_path = "/groups/{group}/users".sub('{' + 'group' + '}', group.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 = ['OAuth2'] 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 => 'Array<UserPublic>') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupApi#list_group_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end