Class: FlatApi::GroupApi
- Inherits:
-
Object
- Object
- FlatApi::GroupApi
- Defined in:
- lib/flat_api/api/group_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_group_details(group, opts = {}) ⇒ GroupDetails
Get group information.
-
#get_group_details_with_http_info(group, opts = {}) ⇒ Array<(GroupDetails, Fixnum, Hash)>
Get group information.
-
#get_group_scores(group, opts = {}) ⇒ Array<ScoreDetails>
List group’s scores Get the list of scores shared with a group.
-
#get_group_scores_with_http_info(group, opts = {}) ⇒ Array<(Array<ScoreDetails>, Fixnum, Hash)>
List group's scores Get the list of scores shared with a group.
-
#initialize(api_client = ApiClient.default) ⇒ GroupApi
constructor
A new instance of GroupApi.
-
#list_group_users(group, opts = {}) ⇒ Array<UserPublic>
List group’s users.
-
#list_group_users_with_http_info(group, opts = {}) ⇒ Array<(Array<UserPublic>, Fixnum, Hash)>
List group's users.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/flat_api/api/group_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_group_details(group, opts = {}) ⇒ GroupDetails
Get group information
28 29 30 31 |
# 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_details_with_http_info(group, opts = {}) ⇒ Array<(GroupDetails, Fixnum, Hash)>
Get group information
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 73 74 75 76 |
# 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 |
#get_group_scores(group, opts = {}) ⇒ Array<ScoreDetails>
List group’s scores Get the list of scores shared with a group.
84 85 86 87 |
# 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 |
#get_group_scores_with_http_info(group, opts = {}) ⇒ Array<(Array<ScoreDetails>, Fixnum, Hash)>
List group's scores Get the list of scores shared with a group.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# 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_users(group, opts = {}) ⇒ Array<UserPublic>
List group’s users
141 142 143 144 |
# 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_users_with_http_info(group, opts = {}) ⇒ Array<(Array<UserPublic>, Fixnum, Hash)>
List group's users
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# 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 |