squash_matrix_api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3119f263d657b160e9e5aceda7ce872cf166d363f39c57f8fc5c86c1fe261256
4
+ data.tar.gz: 5a227895805cd16784dfedc3aff9ec06243f4e95948e68e5561d9e3ab0a99814
5
+ SHA512:
6
+ metadata.gz: 8f2c02129ed394a31de53402b93a904d27441676dcb36eb95d58097707aca9086048966d0fbc5e3363d75d5913645c317d26b95fd7a5bf47f59abe1e344e3c8a
7
+ data.tar.gz: 5ea602e24aba6bbc16e6710323e253d772d822b4acfbe7b3c86feebf5867540c88e289f88630abac72ba786eeac883b58f61fd1a862abec62607c6b04600b60e
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
@@ -0,0 +1,106 @@
1
+ # squash_matrix_api
2
+
3
+ SquashMatrixAPI - the Ruby gem for the Squash Matrix API
4
+
5
+ # 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 />
6
+
7
+ This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
+
9
+ - API version: 1.0.0
10
+ - Package version: 1.0.0
11
+ - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build squash_matrix_api.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./squash_matrix_api-1.0.0.gem
27
+ ```
28
+ (for development, run `gem install --dev ./squash_matrix_api-1.0.0.gem` to install the development dependencies)
29
+
30
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
31
+
32
+ Finally add this to the Gemfile:
33
+
34
+ gem 'squash_matrix_api', '~> 1.0.0'
35
+
36
+ ### Install from Git
37
+
38
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
39
+
40
+ gem 'squash_matrix_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
41
+
42
+ ### Include the Ruby code directly
43
+
44
+ Include the Ruby code directly using `-I` as follows:
45
+
46
+ ```shell
47
+ ruby -Ilib script.rb
48
+ ```
49
+
50
+ ## Getting Started
51
+
52
+ Please follow the [installation](#installation) procedure and then run the following code:
53
+ ```ruby
54
+ # Load the gem
55
+ require 'squash_matrix_api'
56
+
57
+ api_instance = SquashMatrixAPI::DefaultApi.new
58
+
59
+ opts = {
60
+ page: 56, # Integer | The page of clubs
61
+ page_size: 56 # Integer | The size of page
62
+ }
63
+
64
+ begin
65
+ #Get page of clubs
66
+ result = api_instance.clubs_get(opts)
67
+ p result
68
+ rescue SquashMatrixAPI::ApiError => e
69
+ puts "Exception when calling DefaultApi->clubs_get: #{e}"
70
+ end
71
+
72
+ ```
73
+
74
+ ## Documentation for API Endpoints
75
+
76
+ All URIs are relative to *https://api.squashmatrix.io/v1*
77
+
78
+ Class | Method | HTTP request | Description
79
+ ------------ | ------------- | ------------- | -------------
80
+ *SquashMatrixAPI::DefaultApi* | [**clubs_get**](docs/DefaultApi.md#clubs_get) | **GET** /clubs | Get page of clubs
81
+ *SquashMatrixAPI::DefaultApi* | [**clubs_squash_matrix_id_get**](docs/DefaultApi.md#clubs_squash_matrix_id_get) | **GET** /clubs/{squashMatrixId} | Get club by Squash Matrix ID
82
+ *SquashMatrixAPI::DefaultApi* | [**games_game_id_get**](docs/DefaultApi.md#games_game_id_get) | **GET** /games/{gameId} | Get game by ID
83
+ *SquashMatrixAPI::DefaultApi* | [**games_get**](docs/DefaultApi.md#games_get) | **GET** /games | Get page of games
84
+ *SquashMatrixAPI::DefaultApi* | [**players_get**](docs/DefaultApi.md#players_get) | **GET** /players | Get page of players
85
+ *SquashMatrixAPI::DefaultApi* | [**players_squash_matrix_id_get**](docs/DefaultApi.md#players_squash_matrix_id_get) | **GET** /players/{squashMatrixId} | Get player by Squash Matrix ID
86
+
87
+
88
+ ## Documentation for Models
89
+
90
+ - [SquashMatrixAPI::ApiResponseErrors](docs/ApiResponseErrors.md)
91
+ - [SquashMatrixAPI::ApiResponseErrorsErrors](docs/ApiResponseErrorsErrors.md)
92
+ - [SquashMatrixAPI::Club](docs/Club.md)
93
+ - [SquashMatrixAPI::Game](docs/Game.md)
94
+ - [SquashMatrixAPI::InlineResponse200](docs/InlineResponse200.md)
95
+ - [SquashMatrixAPI::InlineResponse2001](docs/InlineResponse2001.md)
96
+ - [SquashMatrixAPI::InlineResponse2002](docs/InlineResponse2002.md)
97
+ - [SquashMatrixAPI::InlineResponse2003](docs/InlineResponse2003.md)
98
+ - [SquashMatrixAPI::InlineResponse2004](docs/InlineResponse2004.md)
99
+ - [SquashMatrixAPI::InlineResponse2005](docs/InlineResponse2005.md)
100
+ - [SquashMatrixAPI::Player](docs/Player.md)
101
+
102
+
103
+ ## Documentation for Authorization
104
+
105
+ All endpoints do not require authorization.
106
+
@@ -0,0 +1,8 @@
1
+ begin
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -0,0 +1,8 @@
1
+ # SquashMatrixAPI::ApiResponseErrors
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **errors** | [**Array&lt;ApiResponseErrorsErrors&gt;**](ApiResponseErrorsErrors.md) | | [optional]
7
+
8
+
@@ -0,0 +1,10 @@
1
+ # SquashMatrixAPI::ApiResponseErrorsErrors
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **code** | **String** | |
7
+ **detail** | **String** | |
8
+ **message** | **String** | | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # SquashMatrixAPI::Club
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **name** | **String** | | [optional]
8
+ **player_ids** | **Array&lt;Integer&gt;** | Players associated with the club | [optional]
9
+
10
+
@@ -0,0 +1,293 @@
1
+ # SquashMatrixAPI::DefaultApi
2
+
3
+ All URIs are relative to *https://api.squashmatrix.io/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**clubs_get**](DefaultApi.md#clubs_get) | **GET** /clubs | Get page of clubs
8
+ [**clubs_squash_matrix_id_get**](DefaultApi.md#clubs_squash_matrix_id_get) | **GET** /clubs/{squashMatrixId} | Get club by Squash Matrix ID
9
+ [**games_game_id_get**](DefaultApi.md#games_game_id_get) | **GET** /games/{gameId} | Get game by ID
10
+ [**games_get**](DefaultApi.md#games_get) | **GET** /games | Get page of games
11
+ [**players_get**](DefaultApi.md#players_get) | **GET** /players | Get page of players
12
+ [**players_squash_matrix_id_get**](DefaultApi.md#players_squash_matrix_id_get) | **GET** /players/{squashMatrixId} | Get player by Squash Matrix ID
13
+
14
+
15
+ # **clubs_get**
16
+ > InlineResponse200 clubs_get(opts)
17
+
18
+ Get page of clubs
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'squash_matrix_api'
24
+
25
+ api_instance = SquashMatrixAPI::DefaultApi.new
26
+
27
+ opts = {
28
+ page: 56, # Integer | The page of clubs
29
+ page_size: 56 # Integer | The size of page
30
+ }
31
+
32
+ begin
33
+ #Get page of clubs
34
+ result = api_instance.clubs_get(opts)
35
+ p result
36
+ rescue SquashMatrixAPI::ApiError => e
37
+ puts "Exception when calling DefaultApi->clubs_get: #{e}"
38
+ end
39
+ ```
40
+
41
+ ### Parameters
42
+
43
+ Name | Type | Description | Notes
44
+ ------------- | ------------- | ------------- | -------------
45
+ **page** | **Integer**| The page of clubs | [optional]
46
+ **page_size** | **Integer**| The size of page | [optional]
47
+
48
+ ### Return type
49
+
50
+ [**InlineResponse200**](InlineResponse200.md)
51
+
52
+ ### Authorization
53
+
54
+ No authorization required
55
+
56
+ ### HTTP request headers
57
+
58
+ - **Content-Type**: application/json
59
+ - **Accept**: application/json
60
+
61
+
62
+
63
+ # **clubs_squash_matrix_id_get**
64
+ > InlineResponse2001 clubs_squash_matrix_id_get(squash_matrix_id)
65
+
66
+ Get club by Squash Matrix ID
67
+
68
+ ### Example
69
+ ```ruby
70
+ # load the gem
71
+ require 'squash_matrix_api'
72
+
73
+ api_instance = SquashMatrixAPI::DefaultApi.new
74
+
75
+ squash_matrix_id = 56 # Integer | Squash Matrix ID of club
76
+
77
+
78
+ begin
79
+ #Get club by Squash Matrix ID
80
+ result = api_instance.clubs_squash_matrix_id_get(squash_matrix_id)
81
+ p result
82
+ rescue SquashMatrixAPI::ApiError => e
83
+ puts "Exception when calling DefaultApi->clubs_squash_matrix_id_get: #{e}"
84
+ end
85
+ ```
86
+
87
+ ### Parameters
88
+
89
+ Name | Type | Description | Notes
90
+ ------------- | ------------- | ------------- | -------------
91
+ **squash_matrix_id** | **Integer**| Squash Matrix ID of club |
92
+
93
+ ### Return type
94
+
95
+ [**InlineResponse2001**](InlineResponse2001.md)
96
+
97
+ ### Authorization
98
+
99
+ No authorization required
100
+
101
+ ### HTTP request headers
102
+
103
+ - **Content-Type**: application/json
104
+ - **Accept**: application/json
105
+
106
+
107
+
108
+ # **games_game_id_get**
109
+ > InlineResponse2005 games_game_id_get(game_id)
110
+
111
+ Get game by ID
112
+
113
+ ### Example
114
+ ```ruby
115
+ # load the gem
116
+ require 'squash_matrix_api'
117
+
118
+ api_instance = SquashMatrixAPI::DefaultApi.new
119
+
120
+ game_id = 56 # Integer | Numeric ID of game
121
+
122
+
123
+ begin
124
+ #Get game by ID
125
+ result = api_instance.games_game_id_get(game_id)
126
+ p result
127
+ rescue SquashMatrixAPI::ApiError => e
128
+ puts "Exception when calling DefaultApi->games_game_id_get: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ Name | Type | Description | Notes
135
+ ------------- | ------------- | ------------- | -------------
136
+ **game_id** | **Integer**| Numeric ID of game |
137
+
138
+ ### Return type
139
+
140
+ [**InlineResponse2005**](InlineResponse2005.md)
141
+
142
+ ### Authorization
143
+
144
+ No authorization required
145
+
146
+ ### HTTP request headers
147
+
148
+ - **Content-Type**: application/json
149
+ - **Accept**: application/json
150
+
151
+
152
+
153
+ # **games_get**
154
+ > InlineResponse2004 games_get(opts)
155
+
156
+ Get page of games
157
+
158
+ ### Example
159
+ ```ruby
160
+ # load the gem
161
+ require 'squash_matrix_api'
162
+
163
+ api_instance = SquashMatrixAPI::DefaultApi.new
164
+
165
+ opts = {
166
+ page: 56, # Integer | The page of games
167
+ page_size: 56 # Integer | The size of page
168
+ }
169
+
170
+ begin
171
+ #Get page of games
172
+ result = api_instance.games_get(opts)
173
+ p result
174
+ rescue SquashMatrixAPI::ApiError => e
175
+ puts "Exception when calling DefaultApi->games_get: #{e}"
176
+ end
177
+ ```
178
+
179
+ ### Parameters
180
+
181
+ Name | Type | Description | Notes
182
+ ------------- | ------------- | ------------- | -------------
183
+ **page** | **Integer**| The page of games | [optional]
184
+ **page_size** | **Integer**| The size of page | [optional]
185
+
186
+ ### Return type
187
+
188
+ [**InlineResponse2004**](InlineResponse2004.md)
189
+
190
+ ### Authorization
191
+
192
+ No authorization required
193
+
194
+ ### HTTP request headers
195
+
196
+ - **Content-Type**: application/json
197
+ - **Accept**: application/json
198
+
199
+
200
+
201
+ # **players_get**
202
+ > InlineResponse2002 players_get(opts)
203
+
204
+ Get page of players
205
+
206
+ ### Example
207
+ ```ruby
208
+ # load the gem
209
+ require 'squash_matrix_api'
210
+
211
+ api_instance = SquashMatrixAPI::DefaultApi.new
212
+
213
+ opts = {
214
+ page: 56, # Integer | The page of players
215
+ page_size: 56 # Integer | The size of page
216
+ }
217
+
218
+ begin
219
+ #Get page of players
220
+ result = api_instance.players_get(opts)
221
+ p result
222
+ rescue SquashMatrixAPI::ApiError => e
223
+ puts "Exception when calling DefaultApi->players_get: #{e}"
224
+ end
225
+ ```
226
+
227
+ ### Parameters
228
+
229
+ Name | Type | Description | Notes
230
+ ------------- | ------------- | ------------- | -------------
231
+ **page** | **Integer**| The page of players | [optional]
232
+ **page_size** | **Integer**| The size of page | [optional]
233
+
234
+ ### Return type
235
+
236
+ [**InlineResponse2002**](InlineResponse2002.md)
237
+
238
+ ### Authorization
239
+
240
+ No authorization required
241
+
242
+ ### HTTP request headers
243
+
244
+ - **Content-Type**: application/json
245
+ - **Accept**: application/json
246
+
247
+
248
+
249
+ # **players_squash_matrix_id_get**
250
+ > InlineResponse2003 players_squash_matrix_id_get(squash_matrix_id)
251
+
252
+ Get player by Squash Matrix ID
253
+
254
+ ### Example
255
+ ```ruby
256
+ # load the gem
257
+ require 'squash_matrix_api'
258
+
259
+ api_instance = SquashMatrixAPI::DefaultApi.new
260
+
261
+ squash_matrix_id = 56 # Integer | Squash Matrix ID of player
262
+
263
+
264
+ begin
265
+ #Get player by Squash Matrix ID
266
+ result = api_instance.players_squash_matrix_id_get(squash_matrix_id)
267
+ p result
268
+ rescue SquashMatrixAPI::ApiError => e
269
+ puts "Exception when calling DefaultApi->players_squash_matrix_id_get: #{e}"
270
+ end
271
+ ```
272
+
273
+ ### Parameters
274
+
275
+ Name | Type | Description | Notes
276
+ ------------- | ------------- | ------------- | -------------
277
+ **squash_matrix_id** | **Integer**| Squash Matrix ID of player |
278
+
279
+ ### Return type
280
+
281
+ [**InlineResponse2003**](InlineResponse2003.md)
282
+
283
+ ### Authorization
284
+
285
+ No authorization required
286
+
287
+ ### HTTP request headers
288
+
289
+ - **Content-Type**: application/json
290
+ - **Accept**: application/json
291
+
292
+
293
+