Class: SquashMatrixAPI::DefaultApi

Inherits:
Object
  • Object
show all
Defined in:
lib/squash_matrix_api/api/default_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DefaultApi

Returns a new instance of DefaultApi.



19
20
21
# File 'lib/squash_matrix_api/api/default_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/squash_matrix_api/api/default_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#clubs_get(opts = {}) ⇒ InlineResponse200

Get page of clubs

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of clubs

  • :page_size (Integer)

    The size of page

Returns:



29
30
31
32
# File 'lib/squash_matrix_api/api/default_api.rb', line 29

def clubs_get(opts = {})
  data, _status_code, _headers = clubs_get_with_http_info(opts)
  return data
end

#clubs_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>

Get page of clubs

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of clubs

  • :page_size (Integer)

    The size of page

Returns:

  • (Array<(InlineResponse200, Fixnum, Hash)>)

    InlineResponse200 data, response status code and response headers



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/squash_matrix_api/api/default_api.rb', line 40

def clubs_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.clubs_get ..."
  end
  # resource path
  local_var_path = "/clubs"

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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 = []
  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 => 'InlineResponse200')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#clubs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#clubs_squash_matrix_id_get(squash_matrix_id, opts = {}) ⇒ InlineResponse2001

Get club by Squash Matrix ID

Parameters:

  • squash_matrix_id

    Squash Matrix ID of club

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



83
84
85
86
# File 'lib/squash_matrix_api/api/default_api.rb', line 83

def clubs_squash_matrix_id_get(squash_matrix_id, opts = {})
  data, _status_code, _headers = clubs_squash_matrix_id_get_with_http_info(squash_matrix_id, opts)
  return data
end

#clubs_squash_matrix_id_get_with_http_info(squash_matrix_id, opts = {}) ⇒ Array<(InlineResponse2001, Fixnum, Hash)>

Get club by Squash Matrix ID

Parameters:

  • squash_matrix_id

    Squash Matrix ID of club

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse2001, Fixnum, Hash)>)

    InlineResponse2001 data, response status code and response headers



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
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/squash_matrix_api/api/default_api.rb', line 93

def clubs_squash_matrix_id_get_with_http_info(squash_matrix_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.clubs_squash_matrix_id_get ..."
  end
  # verify the required parameter 'squash_matrix_id' is set
  if @api_client.config.client_side_validation && squash_matrix_id.nil?
    fail ArgumentError, "Missing the required parameter 'squash_matrix_id' when calling DefaultApi.clubs_squash_matrix_id_get"
  end
  # resource path
  local_var_path = "/clubs/{squashMatrixId}".sub('{' + 'squashMatrixId' + '}', squash_matrix_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 = []
  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 => 'InlineResponse2001')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#clubs_squash_matrix_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#games_game_id_get(game_id, opts = {}) ⇒ InlineResponse2005

Get game by ID

Parameters:

  • game_id

    Numeric ID of game

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



138
139
140
141
# File 'lib/squash_matrix_api/api/default_api.rb', line 138

def games_game_id_get(game_id, opts = {})
  data, _status_code, _headers = games_game_id_get_with_http_info(game_id, opts)
  return data
end

#games_game_id_get_with_http_info(game_id, opts = {}) ⇒ Array<(InlineResponse2005, Fixnum, Hash)>

Get game by ID

Parameters:

  • game_id

    Numeric ID of game

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse2005, Fixnum, Hash)>)

    InlineResponse2005 data, response status code and response headers



148
149
150
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
# File 'lib/squash_matrix_api/api/default_api.rb', line 148

def games_game_id_get_with_http_info(game_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.games_game_id_get ..."
  end
  # verify the required parameter 'game_id' is set
  if @api_client.config.client_side_validation && game_id.nil?
    fail ArgumentError, "Missing the required parameter 'game_id' when calling DefaultApi.games_game_id_get"
  end
  # resource path
  local_var_path = "/games/{gameId}".sub('{' + 'gameId' + '}', game_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 = []
  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 => 'InlineResponse2005')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#games_game_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#games_get(opts = {}) ⇒ InlineResponse2004

Get page of games

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of games

  • :page_size (Integer)

    The size of page

Returns:



194
195
196
197
# File 'lib/squash_matrix_api/api/default_api.rb', line 194

def games_get(opts = {})
  data, _status_code, _headers = games_get_with_http_info(opts)
  return data
end

#games_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>

Get page of games

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of games

  • :page_size (Integer)

    The size of page

Returns:

  • (Array<(InlineResponse2004, Fixnum, Hash)>)

    InlineResponse2004 data, response status code and response headers



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/squash_matrix_api/api/default_api.rb', line 205

def games_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.games_get ..."
  end
  # resource path
  local_var_path = "/games"

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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 = []
  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 => 'InlineResponse2004')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#games_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#players_get(opts = {}) ⇒ InlineResponse2002

Get page of players

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of players

  • :page_size (Integer)

    The size of page

Returns:



249
250
251
252
# File 'lib/squash_matrix_api/api/default_api.rb', line 249

def players_get(opts = {})
  data, _status_code, _headers = players_get_with_http_info(opts)
  return data
end

#players_get_with_http_info(opts = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>

Get page of players

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    The page of players

  • :page_size (Integer)

    The size of page

Returns:

  • (Array<(InlineResponse2002, Fixnum, Hash)>)

    InlineResponse2002 data, response status code and response headers



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
287
288
289
290
291
292
293
294
295
296
# File 'lib/squash_matrix_api/api/default_api.rb', line 260

def players_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.players_get ..."
  end
  # resource path
  local_var_path = "/players"

  # query parameters
  query_params = {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].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 = []
  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 => 'InlineResponse2002')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#players_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#players_squash_matrix_id_get(squash_matrix_id, opts = {}) ⇒ InlineResponse2003

Get player by Squash Matrix ID

Parameters:

  • squash_matrix_id

    Squash Matrix ID of player

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



303
304
305
306
# File 'lib/squash_matrix_api/api/default_api.rb', line 303

def players_squash_matrix_id_get(squash_matrix_id, opts = {})
  data, _status_code, _headers = players_squash_matrix_id_get_with_http_info(squash_matrix_id, opts)
  return data
end

#players_squash_matrix_id_get_with_http_info(squash_matrix_id, opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>

Get player by Squash Matrix ID

Parameters:

  • squash_matrix_id

    Squash Matrix ID of player

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(InlineResponse2003, Fixnum, Hash)>)

    InlineResponse2003 data, response status code and response headers



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
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/squash_matrix_api/api/default_api.rb', line 313

def players_squash_matrix_id_get_with_http_info(squash_matrix_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DefaultApi.players_squash_matrix_id_get ..."
  end
  # verify the required parameter 'squash_matrix_id' is set
  if @api_client.config.client_side_validation && squash_matrix_id.nil?
    fail ArgumentError, "Missing the required parameter 'squash_matrix_id' when calling DefaultApi.players_squash_matrix_id_get"
  end
  # resource path
  local_var_path = "/players/{squashMatrixId}".sub('{' + 'squashMatrixId' + '}', squash_matrix_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 = []
  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 => 'InlineResponse2003')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DefaultApi#players_squash_matrix_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end