squash_matrix_api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +106 -0
  4. data/Rakefile +8 -0
  5. data/docs/ApiResponseErrors.md +8 -0
  6. data/docs/ApiResponseErrorsErrors.md +10 -0
  7. data/docs/Club.md +10 -0
  8. data/docs/DefaultApi.md +293 -0
  9. data/docs/Game.md +26 -0
  10. data/docs/InlineResponse200.md +8 -0
  11. data/docs/InlineResponse2001.md +8 -0
  12. data/docs/InlineResponse2002.md +8 -0
  13. data/docs/InlineResponse2003.md +8 -0
  14. data/docs/InlineResponse2004.md +8 -0
  15. data/docs/InlineResponse2005.md +8 -0
  16. data/docs/Player.md +12 -0
  17. data/git_push.sh +55 -0
  18. data/lib/squash_matrix_api.rb +51 -0
  19. data/lib/squash_matrix_api/api/default_api.rb +353 -0
  20. data/lib/squash_matrix_api/api_client.rb +388 -0
  21. data/lib/squash_matrix_api/api_error.rb +38 -0
  22. data/lib/squash_matrix_api/configuration.rb +202 -0
  23. data/lib/squash_matrix_api/models/api_response_errors.rb +190 -0
  24. data/lib/squash_matrix_api/models/api_response_errors_errors.rb +216 -0
  25. data/lib/squash_matrix_api/models/club.rb +209 -0
  26. data/lib/squash_matrix_api/models/game.rb +353 -0
  27. data/lib/squash_matrix_api/models/inline_response_200.rb +190 -0
  28. data/lib/squash_matrix_api/models/inline_response_200_1.rb +188 -0
  29. data/lib/squash_matrix_api/models/inline_response_200_2.rb +190 -0
  30. data/lib/squash_matrix_api/models/inline_response_200_3.rb +188 -0
  31. data/lib/squash_matrix_api/models/inline_response_200_4.rb +190 -0
  32. data/lib/squash_matrix_api/models/inline_response_200_5.rb +188 -0
  33. data/lib/squash_matrix_api/models/player.rb +228 -0
  34. data/lib/squash_matrix_api/version.rb +15 -0
  35. data/spec/api/default_api_spec.rb +110 -0
  36. data/spec/api_client_spec.rb +226 -0
  37. data/spec/configuration_spec.rb +42 -0
  38. data/spec/models/api_response_errors_errors_spec.rb +54 -0
  39. data/spec/models/api_response_errors_spec.rb +42 -0
  40. data/spec/models/club_spec.rb +54 -0
  41. data/spec/models/game_spec.rb +150 -0
  42. data/spec/models/inline_response_200_1_spec.rb +42 -0
  43. data/spec/models/inline_response_200_2_spec.rb +42 -0
  44. data/spec/models/inline_response_200_3_spec.rb +42 -0
  45. data/spec/models/inline_response_200_4_spec.rb +42 -0
  46. data/spec/models/inline_response_200_5_spec.rb +42 -0
  47. data/spec/models/inline_response_200_spec.rb +42 -0
  48. data/spec/models/player_spec.rb +66 -0
  49. data/spec/spec_helper.rb +111 -0
  50. data/squash_matrix_api.gemspec +45 -0
  51. metadata +300 -0
@@ -0,0 +1,26 @@
1
+ # SquashMatrixAPI::Game
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **date** | **Date** | | [optional]
8
+ **division** | **String** | | [optional]
9
+ **event** | **String** | | [optional]
10
+ **round** | **String** | | [optional]
11
+ **position** | **String** | | [optional]
12
+ **player_a_name** | **String** | | [optional]
13
+ **player_b_name** | **String** | | [optional]
14
+ **player_a_id** | **Integer** | Player association | [optional]
15
+ **player_b_id** | **Integer** | Player association | [optional]
16
+ **player_a_points** | **Integer** | | [optional]
17
+ **player_b_points** | **Integer** | | [optional]
18
+ **player_a_games** | **Integer** | | [optional]
19
+ **player_b_games** | **Integer** | | [optional]
20
+ **player_a_rating** | **Float** | | [optional]
21
+ **player_b_rating** | **Float** | | [optional]
22
+ **player_a_rating_adjustment** | **Float** | | [optional]
23
+ **player_b_rating_adjustment** | **Float** | | [optional]
24
+ **match_id** | **Integer** | Squash Matrix mathch id | [optional]
25
+
26
+
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::InlineResponse200
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Array<Club>**](Club.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::InlineResponse2001
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Club**](Club.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::InlineResponse2002
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Array<Player>**](Player.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::InlineResponse2003
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Player**](Player.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::InlineResponse2004
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Array<Game>**](Game.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::InlineResponse2005
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Game**](Game.md) | | [optional]
7
+
8
+
@@ -0,0 +1,12 @@
1
+ # SquashMatrixAPI::Player
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **name** | **String** | | [optional]
8
+ **rating** | **Float** | | [optional]
9
+ **games_as_player_a** | [**Array<Game>**](Game.md) | | [optional]
10
+ **games_as_player_b** | [**Array<Game>**](Game.md) | | [optional]
11
+
12
+
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,51 @@
1
+ =begin
2
+ #Squash Matrix API
3
+
4
+ ## Endeavor The squash matrix API enables clubs, players, and regions to own their information, with results being updated weekly. The API information sits ontop of squash matrix australia website [https://squashmatrix.com](https://squashmatrix.com) # API Aside from the documentation provided below, there is also a `{json:api}` available and can be accessed in the same manner, with the addition of the accept header `{accept: application/vnd.api+json}`. More information about json api can be viewed on their website at [http://jsonapi.org/](http://jsonapi.org/) # Squash Matrix Scrapper There is a ruby SDK for retrieving information from [https://squashmatrix.com](https://squashmatrix.com) which can be found at https://rubygems.org/gems/squash_matrix # SDK's Please stay posted! Client sdk's for the following will be provided shortly: - Javascript - Java - Ruby # Blog Find relevent and interesting media on [wilkosz.com.au](http://wilkosz.com.au) # Contact Join this endeavor and be appart of the community [https://www.facebook.com/squashmatrixapi](https://www.facebook.com/squashmatrixapi) <hr />
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'squash_matrix_api/api_client'
15
+ require 'squash_matrix_api/api_error'
16
+ require 'squash_matrix_api/version'
17
+ require 'squash_matrix_api/configuration'
18
+
19
+ # Models
20
+ require 'squash_matrix_api/models/api_response_errors'
21
+ require 'squash_matrix_api/models/api_response_errors_errors'
22
+ require 'squash_matrix_api/models/club'
23
+ require 'squash_matrix_api/models/game'
24
+ require 'squash_matrix_api/models/inline_response_200'
25
+ require 'squash_matrix_api/models/inline_response_200_1'
26
+ require 'squash_matrix_api/models/inline_response_200_2'
27
+ require 'squash_matrix_api/models/inline_response_200_3'
28
+ require 'squash_matrix_api/models/inline_response_200_4'
29
+ require 'squash_matrix_api/models/inline_response_200_5'
30
+ require 'squash_matrix_api/models/player'
31
+
32
+ # APIs
33
+ require 'squash_matrix_api/api/default_api'
34
+
35
+ module SquashMatrixAPI
36
+ class << self
37
+ # Customize default settings for the SDK using block.
38
+ # SquashMatrixAPI.configure do |config|
39
+ # config.username = "xxx"
40
+ # config.password = "xxx"
41
+ # end
42
+ # If no block given, return the default Configuration object.
43
+ def configure
44
+ if block_given?
45
+ yield(Configuration.default)
46
+ else
47
+ Configuration.default
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,353 @@
1
+ =begin
2
+ #Squash Matrix API
3
+
4
+ ## Endeavor The squash matrix API enables clubs, players, and regions to own their information, with results being updated weekly. The API information sits ontop of squash matrix australia website [https://squashmatrix.com](https://squashmatrix.com) # API Aside from the documentation provided below, there is also a `{json:api}` available and can be accessed in the same manner, with the addition of the accept header `{accept: application/vnd.api+json}`. More information about json api can be viewed on their website at [http://jsonapi.org/](http://jsonapi.org/) # Squash Matrix Scrapper There is a ruby SDK for retrieving information from [https://squashmatrix.com](https://squashmatrix.com) which can be found at https://rubygems.org/gems/squash_matrix # SDK's Please stay posted! Client sdk's for the following will be provided shortly: - Javascript - Java - Ruby # Blog Find relevent and interesting media on [wilkosz.com.au](http://wilkosz.com.au) # Contact Join this endeavor and be appart of the community [https://www.facebook.com/squashmatrixapi](https://www.facebook.com/squashmatrixapi) <hr />
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.3.1
10
+
11
+ =end
12
+
13
+ require "uri"
14
+
15
+ module SquashMatrixAPI
16
+ class DefaultApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ # Get page of clubs
24
+ #
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page The page of clubs
27
+ # @option opts [Integer] :page_size The size of page
28
+ # @return [InlineResponse200]
29
+ def clubs_get(opts = {})
30
+ data, _status_code, _headers = clubs_get_with_http_info(opts)
31
+ return data
32
+ end
33
+
34
+ # Get page of clubs
35
+ #
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [Integer] :page The page of clubs
38
+ # @option opts [Integer] :page_size The size of page
39
+ # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
40
+ def clubs_get_with_http_info(opts = {})
41
+ if @api_client.config.debugging
42
+ @api_client.config.logger.debug "Calling API: DefaultApi.clubs_get ..."
43
+ end
44
+ # resource path
45
+ local_var_path = "/clubs"
46
+
47
+ # query parameters
48
+ query_params = {}
49
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
50
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
51
+
52
+ # header parameters
53
+ header_params = {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = {}
61
+
62
+ # http body (model)
63
+ post_body = nil
64
+ auth_names = []
65
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => 'InlineResponse200')
72
+ if @api_client.config.debugging
73
+ @api_client.config.logger.debug "API called: DefaultApi#clubs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
+ end
75
+ return data, status_code, headers
76
+ end
77
+
78
+ # Get club by Squash Matrix ID
79
+ #
80
+ # @param squash_matrix_id Squash Matrix ID of club
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [InlineResponse2001]
83
+ def clubs_squash_matrix_id_get(squash_matrix_id, opts = {})
84
+ data, _status_code, _headers = clubs_squash_matrix_id_get_with_http_info(squash_matrix_id, opts)
85
+ return data
86
+ end
87
+
88
+ # Get club by Squash Matrix ID
89
+ #
90
+ # @param squash_matrix_id Squash Matrix ID of club
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
93
+ def clubs_squash_matrix_id_get_with_http_info(squash_matrix_id, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug "Calling API: DefaultApi.clubs_squash_matrix_id_get ..."
96
+ end
97
+ # verify the required parameter 'squash_matrix_id' is set
98
+ if @api_client.config.client_side_validation && squash_matrix_id.nil?
99
+ fail ArgumentError, "Missing the required parameter 'squash_matrix_id' when calling DefaultApi.clubs_squash_matrix_id_get"
100
+ end
101
+ # resource path
102
+ local_var_path = "/clubs/{squashMatrixId}".sub('{' + 'squashMatrixId' + '}', squash_matrix_id.to_s)
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+
117
+ # http body (model)
118
+ post_body = nil
119
+ auth_names = []
120
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
121
+ :header_params => header_params,
122
+ :query_params => query_params,
123
+ :form_params => form_params,
124
+ :body => post_body,
125
+ :auth_names => auth_names,
126
+ :return_type => 'InlineResponse2001')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called: DefaultApi#clubs_squash_matrix_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
129
+ end
130
+ return data, status_code, headers
131
+ end
132
+
133
+ # Get game by ID
134
+ #
135
+ # @param game_id Numeric ID of game
136
+ # @param [Hash] opts the optional parameters
137
+ # @return [InlineResponse2005]
138
+ def games_game_id_get(game_id, opts = {})
139
+ data, _status_code, _headers = games_game_id_get_with_http_info(game_id, opts)
140
+ return data
141
+ end
142
+
143
+ # Get game by ID
144
+ #
145
+ # @param game_id Numeric ID of game
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [Array<(InlineResponse2005, Fixnum, Hash)>] InlineResponse2005 data, response status code and response headers
148
+ def games_game_id_get_with_http_info(game_id, opts = {})
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "Calling API: DefaultApi.games_game_id_get ..."
151
+ end
152
+ # verify the required parameter 'game_id' is set
153
+ if @api_client.config.client_side_validation && game_id.nil?
154
+ fail ArgumentError, "Missing the required parameter 'game_id' when calling DefaultApi.games_game_id_get"
155
+ end
156
+ # resource path
157
+ local_var_path = "/games/{gameId}".sub('{' + 'gameId' + '}', game_id.to_s)
158
+
159
+ # query parameters
160
+ query_params = {}
161
+
162
+ # header parameters
163
+ header_params = {}
164
+ # HTTP header 'Accept' (if needed)
165
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
166
+ # HTTP header 'Content-Type'
167
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
168
+
169
+ # form parameters
170
+ form_params = {}
171
+
172
+ # http body (model)
173
+ post_body = nil
174
+ auth_names = []
175
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => 'InlineResponse2005')
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: DefaultApi#games_game_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+
188
+ # Get page of games
189
+ #
190
+ # @param [Hash] opts the optional parameters
191
+ # @option opts [Integer] :page The page of games
192
+ # @option opts [Integer] :page_size The size of page
193
+ # @return [InlineResponse2004]
194
+ def games_get(opts = {})
195
+ data, _status_code, _headers = games_get_with_http_info(opts)
196
+ return data
197
+ end
198
+
199
+ # Get page of games
200
+ #
201
+ # @param [Hash] opts the optional parameters
202
+ # @option opts [Integer] :page The page of games
203
+ # @option opts [Integer] :page_size The size of page
204
+ # @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers
205
+ def games_get_with_http_info(opts = {})
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "Calling API: DefaultApi.games_get ..."
208
+ end
209
+ # resource path
210
+ local_var_path = "/games"
211
+
212
+ # query parameters
213
+ query_params = {}
214
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
215
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
216
+
217
+ # header parameters
218
+ header_params = {}
219
+ # HTTP header 'Accept' (if needed)
220
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
221
+ # HTTP header 'Content-Type'
222
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
223
+
224
+ # form parameters
225
+ form_params = {}
226
+
227
+ # http body (model)
228
+ post_body = nil
229
+ auth_names = []
230
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
231
+ :header_params => header_params,
232
+ :query_params => query_params,
233
+ :form_params => form_params,
234
+ :body => post_body,
235
+ :auth_names => auth_names,
236
+ :return_type => 'InlineResponse2004')
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: DefaultApi#games_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+
243
+ # Get page of players
244
+ #
245
+ # @param [Hash] opts the optional parameters
246
+ # @option opts [Integer] :page The page of players
247
+ # @option opts [Integer] :page_size The size of page
248
+ # @return [InlineResponse2002]
249
+ def players_get(opts = {})
250
+ data, _status_code, _headers = players_get_with_http_info(opts)
251
+ return data
252
+ end
253
+
254
+ # Get page of players
255
+ #
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [Integer] :page The page of players
258
+ # @option opts [Integer] :page_size The size of page
259
+ # @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
260
+ def players_get_with_http_info(opts = {})
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug "Calling API: DefaultApi.players_get ..."
263
+ end
264
+ # resource path
265
+ local_var_path = "/players"
266
+
267
+ # query parameters
268
+ query_params = {}
269
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
270
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
271
+
272
+ # header parameters
273
+ header_params = {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
+ # HTTP header 'Content-Type'
277
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
278
+
279
+ # form parameters
280
+ form_params = {}
281
+
282
+ # http body (model)
283
+ post_body = nil
284
+ auth_names = []
285
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
286
+ :header_params => header_params,
287
+ :query_params => query_params,
288
+ :form_params => form_params,
289
+ :body => post_body,
290
+ :auth_names => auth_names,
291
+ :return_type => 'InlineResponse2002')
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug "API called: DefaultApi#players_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
294
+ end
295
+ return data, status_code, headers
296
+ end
297
+
298
+ # Get player by Squash Matrix ID
299
+ #
300
+ # @param squash_matrix_id Squash Matrix ID of player
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [InlineResponse2003]
303
+ def players_squash_matrix_id_get(squash_matrix_id, opts = {})
304
+ data, _status_code, _headers = players_squash_matrix_id_get_with_http_info(squash_matrix_id, opts)
305
+ return data
306
+ end
307
+
308
+ # Get player by Squash Matrix ID
309
+ #
310
+ # @param squash_matrix_id Squash Matrix ID of player
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers
313
+ def players_squash_matrix_id_get_with_http_info(squash_matrix_id, opts = {})
314
+ if @api_client.config.debugging
315
+ @api_client.config.logger.debug "Calling API: DefaultApi.players_squash_matrix_id_get ..."
316
+ end
317
+ # verify the required parameter 'squash_matrix_id' is set
318
+ if @api_client.config.client_side_validation && squash_matrix_id.nil?
319
+ fail ArgumentError, "Missing the required parameter 'squash_matrix_id' when calling DefaultApi.players_squash_matrix_id_get"
320
+ end
321
+ # resource path
322
+ local_var_path = "/players/{squashMatrixId}".sub('{' + 'squashMatrixId' + '}', squash_matrix_id.to_s)
323
+
324
+ # query parameters
325
+ query_params = {}
326
+
327
+ # header parameters
328
+ header_params = {}
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
331
+ # HTTP header 'Content-Type'
332
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
333
+
334
+ # form parameters
335
+ form_params = {}
336
+
337
+ # http body (model)
338
+ post_body = nil
339
+ auth_names = []
340
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
341
+ :header_params => header_params,
342
+ :query_params => query_params,
343
+ :form_params => form_params,
344
+ :body => post_body,
345
+ :auth_names => auth_names,
346
+ :return_type => 'InlineResponse2003')
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug "API called: DefaultApi#players_squash_matrix_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ end
350
+ return data, status_code, headers
351
+ end
352
+ end
353
+ end