kleister 1.0.0 → 1.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1ced5684bb65c8668882f21c992a2e9fa4d8dcc9327b2e1414b4059834cf942
4
- data.tar.gz: 3a38204d76c8e79221b8697c5267c07807176b01bf1574fa8443ae27b59da870
3
+ metadata.gz: 85f5cff8ecc0a3daacdfd6b066f23dbb515eedfcdc6ac2ca65d91adb4d555293
4
+ data.tar.gz: c09dfc37629fa9b2764494e61b3cd77ee511c2deb4d08649d073f0240bca0f4b
5
5
  SHA512:
6
- metadata.gz: 3e5ac6f75cfa062392f740cb84727abd3cdc68d4e83660278e6dc260094f847409f3d59796c90550f90a6da9e6d80410c9ec7ff07843786ffe7284a2428e46b2
7
- data.tar.gz: aec8dd1d4b8173281a5e6bee165dc955cb9e48a29778c242cdf88ce87374d7b52aa095290bea229ba3e2ba0908b8a52ead2963be6c4148761dd44d33ad0f1f68
6
+ metadata.gz: 4c0292114c39bc29efa0ea3dabc4fddb3e52a9b8c36d5dc92a1c9f1402b324e7df3e39ef41a7a63480c0c14a55e8149bd9b8f082627a5a1e20480f79ad4e9e4c
7
+ data.tar.gz: 4687aae18beb08eb4304dbd2831da9b795397554c89d39f06b951d130705e3e298131476f16be55870190350d15c34340627ca9ddc344e17e37cadac65671378
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.0](https://github.com/kleister/kleister-ruby/compare/v1.1.0...v1.2.0) (2024-07-01)
4
+
5
+
6
+ ### Features
7
+
8
+ * automated openapi client update ([7c276cf](https://github.com/kleister/kleister-ruby/commit/7c276cf7ec961ed99b61ddf4be35ea59ac70eed7))
9
+
10
+
11
+ ### Bugfixes
12
+
13
+ * use right values for perm enum ([c46115a](https://github.com/kleister/kleister-ruby/commit/c46115a81b3a1f4e9ec487db386e2448cfd90c07))
14
+
15
+ ## [1.1.0](https://github.com/kleister/kleister-ruby/compare/v1.0.0...v1.1.0) (2024-06-17)
16
+
17
+
18
+ ### Features
19
+
20
+ * automated openapi client update ([444c8a5](https://github.com/kleister/kleister-ruby/commit/444c8a527ea25d675fdfb83719c199952bebdb06))
21
+ * automated openapi client update ([74a36e9](https://github.com/kleister/kleister-ruby/commit/74a36e9901fe9e57b4e600d6bfbc2c826221019c))
22
+
23
+
24
+ ### Bugfixes
25
+
26
+ * **deps:** update dependency ruby to v3.3.3 ([4f59da6](https://github.com/kleister/kleister-ruby/commit/4f59da6ab5f46da7393fefd7b100dd2f532df838))
27
+
3
28
  ## 1.0.0 (2024-06-04)
4
29
 
5
30
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ This repository provides a client SDK for Ruby. This SDK is automatically
6
6
  generated by the [OpenAPI Generator][generator] project:
7
7
 
8
8
  - API version: 1.0.0-alpha1
9
- - Package version: 1.0.0
9
+ - Package version: 1.2.0
10
10
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
11
11
 
12
12
  For more information, please visit [https://kleister.eu](https://kleister.eu)
@@ -21,7 +21,7 @@ the built gem:
21
21
 
22
22
  ```console
23
23
  gem build kleister.gemspec
24
- gem install ./kleister-1.0.0.gem
24
+ gem install ./kleister-1.2.0.gem
25
25
  ```
26
26
 
27
27
  ### Install from Rubygems
@@ -30,7 +30,7 @@ If you want to use a a properly released version hosted Rubygems you just need
30
30
  to add the following line to your Gemfile:
31
31
 
32
32
  ```ruby
33
- gem 'kleister', '~> 1.0.0'
33
+ gem 'kleister', '~> 1.2.0'
34
34
  ```
35
35
 
36
36
  ### Install from Git
@@ -168,7 +168,7 @@ module Kleister
168
168
  # @param fabric_id [String] A fabric identifier or slug
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @option opts [String] :search Search query
171
- # @option opts [String] :sort Sorting column (default to 'name')
171
+ # @option opts [String] :sort Sorting column (default to 'build_name')
172
172
  # @option opts [String] :order Sorting order (default to 'asc')
173
173
  # @option opts [Integer] :limit Paging limit (default to 100)
174
174
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -182,7 +182,7 @@ module Kleister
182
182
  # @param fabric_id [String] A fabric identifier or slug
183
183
  # @param [Hash] opts the optional parameters
184
184
  # @option opts [String] :search Search query
185
- # @option opts [String] :sort Sorting column (default to 'name')
185
+ # @option opts [String] :sort Sorting column (default to 'build_name')
186
186
  # @option opts [String] :order Sorting order (default to 'asc')
187
187
  # @option opts [Integer] :limit Paging limit (default to 100)
188
188
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -196,7 +196,7 @@ module Kleister
196
196
  raise ArgumentError, "Missing the required parameter 'fabric_id' when calling FabricApi.list_fabric_builds"
197
197
  end
198
198
 
199
- allowable_values = %w[name public]
199
+ allowable_values = %w[build_name build_public pack_slug pack_name]
200
200
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
201
201
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
202
202
  end
@@ -168,7 +168,7 @@ module Kleister
168
168
  # @param forge_id [String] A forge identifier or slug
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @option opts [String] :search Search query
171
- # @option opts [String] :sort Sorting column (default to 'name')
171
+ # @option opts [String] :sort Sorting column (default to 'build_name')
172
172
  # @option opts [String] :order Sorting order (default to 'asc')
173
173
  # @option opts [Integer] :limit Paging limit (default to 100)
174
174
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -182,7 +182,7 @@ module Kleister
182
182
  # @param forge_id [String] A forge identifier or slug
183
183
  # @param [Hash] opts the optional parameters
184
184
  # @option opts [String] :search Search query
185
- # @option opts [String] :sort Sorting column (default to 'name')
185
+ # @option opts [String] :sort Sorting column (default to 'build_name')
186
186
  # @option opts [String] :order Sorting order (default to 'asc')
187
187
  # @option opts [Integer] :limit Paging limit (default to 100)
188
188
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -196,7 +196,7 @@ module Kleister
196
196
  raise ArgumentError, "Missing the required parameter 'forge_id' when calling ForgeApi.list_forge_builds"
197
197
  end
198
198
 
199
- allowable_values = %w[name public]
199
+ allowable_values = %w[build_name build_public pack_slug pack_name]
200
200
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
201
201
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
202
202
  end
@@ -168,7 +168,7 @@ module Kleister
168
168
  # @param minecraft_id [String] A minecraft identifier or slug
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @option opts [String] :search Search query
171
- # @option opts [String] :sort Sorting column (default to 'name')
171
+ # @option opts [String] :sort Sorting column (default to 'build_name')
172
172
  # @option opts [String] :order Sorting order (default to 'asc')
173
173
  # @option opts [Integer] :limit Paging limit (default to 100)
174
174
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -182,7 +182,7 @@ module Kleister
182
182
  # @param minecraft_id [String] A minecraft identifier or slug
183
183
  # @param [Hash] opts the optional parameters
184
184
  # @option opts [String] :search Search query
185
- # @option opts [String] :sort Sorting column (default to 'name')
185
+ # @option opts [String] :sort Sorting column (default to 'build_name')
186
186
  # @option opts [String] :order Sorting order (default to 'asc')
187
187
  # @option opts [Integer] :limit Paging limit (default to 100)
188
188
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -196,7 +196,7 @@ module Kleister
196
196
  raise ArgumentError, "Missing the required parameter 'minecraft_id' when calling MinecraftApi.list_minecraft_builds"
197
197
  end
198
198
 
199
- allowable_values = %w[name public]
199
+ allowable_values = %w[build_name build_public pack_slug pack_name]
200
200
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
201
201
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
202
202
  end
@@ -246,7 +246,7 @@ module Kleister
246
246
  # Create a new mod
247
247
  # @param mod [Mod] The mod data to create
248
248
  # @param [Hash] opts the optional parameters
249
- # @return [User]
249
+ # @return [Mod]
250
250
  def create_mod(mod, opts = {})
251
251
  data, _status_code, _headers = create_mod_with_http_info(mod, opts)
252
252
  data
@@ -255,7 +255,7 @@ module Kleister
255
255
  # Create a new mod
256
256
  # @param mod [Mod] The mod data to create
257
257
  # @param [Hash] opts the optional parameters
258
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
258
+ # @return [Array<(Mod, Integer, Hash)>] Mod data, response status code and response headers
259
259
  def create_mod_with_http_info(mod, opts = {})
260
260
  if @api_client.config.debugging
261
261
  @api_client.config.logger.debug 'Calling API: ModApi.create_mod ...'
@@ -288,7 +288,7 @@ module Kleister
288
288
  post_body = opts[:debug_body] || @api_client.object_to_http_body(mod)
289
289
 
290
290
  # return_type
291
- return_type = opts[:debug_return_type] || 'User'
291
+ return_type = opts[:debug_return_type] || 'Mod'
292
292
 
293
293
  # auth_names
294
294
  auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
@@ -937,7 +937,7 @@ module Kleister
937
937
  if @api_client.config.debugging
938
938
  @api_client.config.logger.debug 'Calling API: ModApi.list_mods ...'
939
939
  end
940
- allowable_values = %w[name public]
940
+ allowable_values = %w[slug name public]
941
941
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
942
942
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
943
943
  end
@@ -1030,7 +1030,7 @@ module Kleister
1030
1030
  raise ArgumentError, "Missing the required parameter 'version_id' when calling ModApi.list_version_builds"
1031
1031
  end
1032
1032
 
1033
- allowable_values = %w[slug name]
1033
+ allowable_values = %w[name public]
1034
1034
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
1035
1035
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1036
1036
  end
@@ -1117,7 +1117,7 @@ module Kleister
1117
1117
  raise ArgumentError, "Missing the required parameter 'mod_id' when calling ModApi.list_versions"
1118
1118
  end
1119
1119
 
1120
- allowable_values = %w[slug name]
1120
+ allowable_values = %w[name public]
1121
1121
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
1122
1122
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1123
1123
  end
@@ -168,7 +168,7 @@ module Kleister
168
168
  # @param neoforge_id [String] A neoforge identifier or slug
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @option opts [String] :search Search query
171
- # @option opts [String] :sort Sorting column (default to 'name')
171
+ # @option opts [String] :sort Sorting column (default to 'build_name')
172
172
  # @option opts [String] :order Sorting order (default to 'asc')
173
173
  # @option opts [Integer] :limit Paging limit (default to 100)
174
174
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -182,7 +182,7 @@ module Kleister
182
182
  # @param neoforge_id [String] A neoforge identifier or slug
183
183
  # @param [Hash] opts the optional parameters
184
184
  # @option opts [String] :search Search query
185
- # @option opts [String] :sort Sorting column (default to 'name')
185
+ # @option opts [String] :sort Sorting column (default to 'build_name')
186
186
  # @option opts [String] :order Sorting order (default to 'asc')
187
187
  # @option opts [Integer] :limit Paging limit (default to 100)
188
188
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -196,7 +196,7 @@ module Kleister
196
196
  raise ArgumentError, "Missing the required parameter 'neoforge_id' when calling NeoforgeApi.list_neoforge_builds"
197
197
  end
198
198
 
199
- allowable_values = %w[name public]
199
+ allowable_values = %w[build_name build_public pack_slug pack_name]
200
200
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
201
201
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
202
202
  end
@@ -747,7 +747,7 @@ module Kleister
747
747
  # @option opts [String] :order Sorting order (default to 'asc')
748
748
  # @option opts [Integer] :limit Paging limit
749
749
  # @option opts [Integer] :offset Paging offset
750
- # @return [UserTeams]
750
+ # @return [BuildVersions]
751
751
  def list_build_versions(pack_id, build_id, opts = {})
752
752
  data, _status_code, _headers = list_build_versions_with_http_info(pack_id, build_id, opts)
753
753
  data
@@ -762,7 +762,7 @@ module Kleister
762
762
  # @option opts [String] :order Sorting order (default to 'asc')
763
763
  # @option opts [Integer] :limit Paging limit
764
764
  # @option opts [Integer] :offset Paging offset
765
- # @return [Array<(UserTeams, Integer, Hash)>] UserTeams data, response status code and response headers
765
+ # @return [Array<(BuildVersions, Integer, Hash)>] BuildVersions data, response status code and response headers
766
766
  def list_build_versions_with_http_info(pack_id, build_id, opts = {})
767
767
  if @api_client.config.debugging
768
768
  @api_client.config.logger.debug 'Calling API: PackApi.list_build_versions ...'
@@ -776,7 +776,7 @@ module Kleister
776
776
  raise ArgumentError, "Missing the required parameter 'build_id' when calling PackApi.list_build_versions"
777
777
  end
778
778
 
779
- allowable_values = %w[slug name]
779
+ allowable_values = %w[name public]
780
780
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
781
781
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
782
782
  end
@@ -809,7 +809,7 @@ module Kleister
809
809
  post_body = opts[:debug_body]
810
810
 
811
811
  # return_type
812
- return_type = opts[:debug_return_type] || 'UserTeams'
812
+ return_type = opts[:debug_return_type] || 'BuildVersions'
813
813
 
814
814
  # auth_names
815
815
  auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
@@ -863,7 +863,7 @@ module Kleister
863
863
  raise ArgumentError, "Missing the required parameter 'pack_id' when calling PackApi.list_builds"
864
864
  end
865
865
 
866
- allowable_values = %w[slug name]
866
+ allowable_values = %w[name public]
867
867
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
868
868
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
869
869
  end
@@ -1117,7 +1117,7 @@ module Kleister
1117
1117
  if @api_client.config.debugging
1118
1118
  @api_client.config.logger.debug 'Calling API: PackApi.list_packs ...'
1119
1119
  end
1120
- allowable_values = %w[name public]
1120
+ allowable_values = %w[slug name public]
1121
1121
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
1122
1122
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1123
1123
  end
@@ -176,7 +176,7 @@ module Kleister
176
176
  return_type = opts[:debug_return_type] || 'Profile'
177
177
 
178
178
  # auth_names
179
- auth_names = opts[:debug_auth_names] || []
179
+ auth_names = opts[:debug_auth_names] || %w[Cookie Basic Header Bearer]
180
180
 
181
181
  new_options = opts.merge(
182
182
  operation: :'ProfileApi.update_profile',
@@ -168,7 +168,7 @@ module Kleister
168
168
  # @param quilt_id [String] A quilt identifier or slug
169
169
  # @param [Hash] opts the optional parameters
170
170
  # @option opts [String] :search Search query
171
- # @option opts [String] :sort Sorting column (default to 'name')
171
+ # @option opts [String] :sort Sorting column (default to 'build_name')
172
172
  # @option opts [String] :order Sorting order (default to 'asc')
173
173
  # @option opts [Integer] :limit Paging limit (default to 100)
174
174
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -182,7 +182,7 @@ module Kleister
182
182
  # @param quilt_id [String] A quilt identifier or slug
183
183
  # @param [Hash] opts the optional parameters
184
184
  # @option opts [String] :search Search query
185
- # @option opts [String] :sort Sorting column (default to 'name')
185
+ # @option opts [String] :sort Sorting column (default to 'build_name')
186
186
  # @option opts [String] :order Sorting order (default to 'asc')
187
187
  # @option opts [Integer] :limit Paging limit (default to 100)
188
188
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -196,7 +196,7 @@ module Kleister
196
196
  raise ArgumentError, "Missing the required parameter 'quilt_id' when calling QuiltApi.list_quilt_builds"
197
197
  end
198
198
 
199
- allowable_values = %w[name public]
199
+ allowable_values = %w[build_name build_public pack_slug pack_name]
200
200
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
201
201
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
202
202
  end
@@ -589,7 +589,7 @@ module Kleister
589
589
  # @param team_id [String] A team identifier or slug
590
590
  # @param [Hash] opts the optional parameters
591
591
  # @option opts [String] :search Search query
592
- # @option opts [String] :sort Sorting column (default to 'modname')
592
+ # @option opts [String] :sort Sorting column (default to 'name')
593
593
  # @option opts [String] :order Sorting order (default to 'asc')
594
594
  # @option opts [Integer] :limit Paging limit (default to 100)
595
595
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -603,7 +603,7 @@ module Kleister
603
603
  # @param team_id [String] A team identifier or slug
604
604
  # @param [Hash] opts the optional parameters
605
605
  # @option opts [String] :search Search query
606
- # @option opts [String] :sort Sorting column (default to 'modname')
606
+ # @option opts [String] :sort Sorting column (default to 'name')
607
607
  # @option opts [String] :order Sorting order (default to 'asc')
608
608
  # @option opts [Integer] :limit Paging limit (default to 100)
609
609
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -617,7 +617,7 @@ module Kleister
617
617
  raise ArgumentError, "Missing the required parameter 'team_id' when calling TeamApi.list_team_mods"
618
618
  end
619
619
 
620
- allowable_values = %w[modname email fullname admin active]
620
+ allowable_values = %w[slug name public]
621
621
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
622
622
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
623
623
  end
@@ -676,7 +676,7 @@ module Kleister
676
676
  # @param team_id [String] A team identifier or slug
677
677
  # @param [Hash] opts the optional parameters
678
678
  # @option opts [String] :search Search query
679
- # @option opts [String] :sort Sorting column (default to 'packname')
679
+ # @option opts [String] :sort Sorting column (default to 'name')
680
680
  # @option opts [String] :order Sorting order (default to 'asc')
681
681
  # @option opts [Integer] :limit Paging limit (default to 100)
682
682
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -690,7 +690,7 @@ module Kleister
690
690
  # @param team_id [String] A team identifier or slug
691
691
  # @param [Hash] opts the optional parameters
692
692
  # @option opts [String] :search Search query
693
- # @option opts [String] :sort Sorting column (default to 'packname')
693
+ # @option opts [String] :sort Sorting column (default to 'name')
694
694
  # @option opts [String] :order Sorting order (default to 'asc')
695
695
  # @option opts [Integer] :limit Paging limit (default to 100)
696
696
  # @option opts [Integer] :offset Paging offset (default to 0)
@@ -704,7 +704,7 @@ module Kleister
704
704
  raise ArgumentError, "Missing the required parameter 'team_id' when calling TeamApi.list_team_packs"
705
705
  end
706
706
 
707
- allowable_values = %w[packname email fullname admin active]
707
+ allowable_values = %w[slug name public]
708
708
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
709
709
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
710
710
  end
@@ -617,7 +617,7 @@ module Kleister
617
617
  raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_mods"
618
618
  end
619
619
 
620
- allowable_values = %w[slug name]
620
+ allowable_values = %w[slug name public]
621
621
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
622
622
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
623
623
  end
@@ -704,7 +704,7 @@ module Kleister
704
704
  raise ArgumentError, "Missing the required parameter 'user_id' when calling UserApi.list_user_packs"
705
705
  end
706
706
 
707
- allowable_values = %w[slug name]
707
+ allowable_values = %w[slug name public]
708
708
  if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
709
709
  raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
710
710
  end
@@ -14,14 +14,13 @@ require 'time'
14
14
  module Kleister
15
15
  # Model to represent build
16
16
  class Build
17
- attr_accessor :id, :pack_id, :pack, :minecraft_id, :minecraft, :forge_id, :forge, :neoforge_id, :neoforge, :quilt_id, :quilt, :fabric_id, :fabric, :slug, :name, :java, :memory, :public,
18
- :created_at, :updated_at, :versions
17
+ attr_accessor :id, :pack, :minecraft_id, :minecraft, :forge_id, :forge, :neoforge_id, :neoforge, :quilt_id, :quilt, :fabric_id, :fabric, :slug, :name, :java, :memory, :latest, :recommended,
18
+ :public, :created_at, :updated_at
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
23
  id: :id,
24
- pack_id: :pack_id,
25
24
  pack: :pack,
26
25
  minecraft_id: :minecraft_id,
27
26
  minecraft: :minecraft,
@@ -37,10 +36,11 @@ module Kleister
37
36
  name: :name,
38
37
  java: :java,
39
38
  memory: :memory,
39
+ latest: :latest,
40
+ recommended: :recommended,
40
41
  public: :public,
41
42
  created_at: :created_at,
42
- updated_at: :updated_at,
43
- versions: :versions
43
+ updated_at: :updated_at
44
44
  }
45
45
  end
46
46
 
@@ -53,7 +53,6 @@ module Kleister
53
53
  def self.openapi_types
54
54
  {
55
55
  id: :String,
56
- pack_id: :String,
57
56
  pack: :Pack,
58
57
  minecraft_id: :String,
59
58
  minecraft: :Minecraft,
@@ -69,10 +68,11 @@ module Kleister
69
68
  name: :String,
70
69
  java: :String,
71
70
  memory: :String,
71
+ latest: :Boolean,
72
+ recommended: :Boolean,
72
73
  public: :Boolean,
73
74
  created_at: :Time,
74
- updated_at: :Time,
75
- versions: :'Array<BuildVersion>'
75
+ updated_at: :Time
76
76
  }
77
77
  end
78
78
 
@@ -88,8 +88,9 @@ module Kleister
88
88
  name
89
89
  java
90
90
  memory
91
+ latest
92
+ recommended
91
93
  public
92
- versions
93
94
  ])
94
95
  end
95
96
 
@@ -113,10 +114,6 @@ module Kleister
113
114
  self.id = attributes[:id]
114
115
  end
115
116
 
116
- if attributes.key?(:pack_id)
117
- self.pack_id = attributes[:pack_id]
118
- end
119
-
120
117
  if attributes.key?(:pack)
121
118
  self.pack = attributes[:pack]
122
119
  end
@@ -177,6 +174,14 @@ module Kleister
177
174
  self.memory = attributes[:memory]
178
175
  end
179
176
 
177
+ if attributes.key?(:latest)
178
+ self.latest = attributes[:latest]
179
+ end
180
+
181
+ if attributes.key?(:recommended)
182
+ self.recommended = attributes[:recommended]
183
+ end
184
+
180
185
  if attributes.key?(:public)
181
186
  self.public = attributes[:public]
182
187
  end
@@ -188,10 +193,6 @@ module Kleister
188
193
  if attributes.key?(:updated_at)
189
194
  self.updated_at = attributes[:updated_at]
190
195
  end
191
-
192
- if attributes.key?(:versions) && (value = attributes[:versions]).is_a?(Array)
193
- self.versions = value
194
- end
195
196
  end
196
197
 
197
198
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -215,7 +216,6 @@ module Kleister
215
216
 
216
217
  self.class == other.class &&
217
218
  id == other.id &&
218
- pack_id == other.pack_id &&
219
219
  pack == other.pack &&
220
220
  minecraft_id == other.minecraft_id &&
221
221
  minecraft == other.minecraft &&
@@ -231,10 +231,11 @@ module Kleister
231
231
  name == other.name &&
232
232
  java == other.java &&
233
233
  memory == other.memory &&
234
+ latest == other.latest &&
235
+ recommended == other.recommended &&
234
236
  public == other.public &&
235
237
  created_at == other.created_at &&
236
- updated_at == other.updated_at &&
237
- versions == other.versions
238
+ updated_at == other.updated_at
238
239
  end
239
240
 
240
241
  # @see the `==` method
@@ -246,7 +247,8 @@ module Kleister
246
247
  # Calculates hash code according to all attributes.
247
248
  # @return [Integer] Hash code
248
249
  def hash
249
- [id, pack_id, pack, minecraft_id, minecraft, forge_id, forge, neoforge_id, neoforge, quilt_id, quilt, fabric_id, fabric, slug, name, java, memory, public, created_at, updated_at, versions].hash
250
+ [id, pack, minecraft_id, minecraft, forge_id, forge, neoforge_id, neoforge, quilt_id, quilt, fabric_id, fabric, slug, name, java, memory, latest, recommended, public, created_at,
251
+ updated_at].hash
250
252
  end
251
253
 
252
254
  # Builds the object from hash
@@ -14,28 +14,7 @@ require 'time'
14
14
  module Kleister
15
15
  # Model to represent mod
16
16
  class Mod
17
- attr_accessor :id, :slug, :name, :side, :description, :author, :website, :donate, :public, :created_at, :updated_at, :versions, :users, :teams
18
-
19
- class EnumAttributeValidator
20
- attr_reader :datatype, :allowable_values
21
-
22
- def initialize(datatype, allowable_values)
23
- @allowable_values = allowable_values.map do |value|
24
- case datatype.to_s
25
- when /Integer/i
26
- value.to_i
27
- when /Float/i
28
- value.to_f
29
- else
30
- value
31
- end
32
- end
33
- end
34
-
35
- def valid?(value)
36
- !value || allowable_values.include?(value)
37
- end
38
- end
17
+ attr_accessor :id, :slug, :name, :side, :description, :author, :website, :donate, :public, :created_at, :updated_at
39
18
 
40
19
  # Attribute mapping from ruby-style variable name to JSON key.
41
20
  def self.attribute_map
@@ -50,10 +29,7 @@ module Kleister
50
29
  donate: :donate,
51
30
  public: :public,
52
31
  created_at: :created_at,
53
- updated_at: :updated_at,
54
- versions: :versions,
55
- users: :users,
56
- teams: :teams
32
+ updated_at: :updated_at
57
33
  }
58
34
  end
59
35
 
@@ -75,10 +51,7 @@ module Kleister
75
51
  donate: :String,
76
52
  public: :Boolean,
77
53
  created_at: :Time,
78
- updated_at: :Time,
79
- versions: :'Array<Version>',
80
- users: :'Array<UserMod>',
81
- teams: :'Array<TeamMod>'
54
+ updated_at: :Time
82
55
  }
83
56
  end
84
57
 
@@ -93,9 +66,6 @@ module Kleister
93
66
  website
94
67
  donate
95
68
  public
96
- versions
97
- users
98
- teams
99
69
  ])
100
70
  end
101
71
 
@@ -158,18 +128,6 @@ module Kleister
158
128
  if attributes.key?(:updated_at)
159
129
  self.updated_at = attributes[:updated_at]
160
130
  end
161
-
162
- if attributes.key?(:versions) && (value = attributes[:versions]).is_a?(Array)
163
- self.versions = value
164
- end
165
-
166
- if attributes.key?(:users) && (value = attributes[:users]).is_a?(Array)
167
- self.users = value
168
- end
169
-
170
- if attributes.key?(:teams) && (value = attributes[:teams]).is_a?(Array)
171
- self.teams = value
172
- end
173
131
  end
174
132
 
175
133
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -183,23 +141,9 @@ module Kleister
183
141
  # @return true if the model is valid
184
142
  def valid?
185
143
  warn '[DEPRECATED] the `valid?` method is obsolete'
186
- side_validator = EnumAttributeValidator.new('String', %w[both server client])
187
- return false unless side_validator.valid?(@side)
188
-
189
144
  true
190
145
  end
191
146
 
192
- # Custom attribute writer method checking allowed values (enum).
193
- # @param [Object] side Object to be assigned
194
- def side=(side)
195
- validator = EnumAttributeValidator.new('String', %w[both server client])
196
- unless validator.valid?(side)
197
- raise ArgumentError, "invalid value for \"side\", must be one of #{validator.allowable_values}."
198
- end
199
-
200
- @side = side
201
- end
202
-
203
147
  # Checks equality by comparing each attribute.
204
148
  # @param [Object] Object to be compared
205
149
  def ==(other)
@@ -216,10 +160,7 @@ module Kleister
216
160
  donate == other.donate &&
217
161
  public == other.public &&
218
162
  created_at == other.created_at &&
219
- updated_at == other.updated_at &&
220
- versions == other.versions &&
221
- users == other.users &&
222
- teams == other.teams
163
+ updated_at == other.updated_at
223
164
  end
224
165
 
225
166
  # @see the `==` method
@@ -231,7 +172,7 @@ module Kleister
231
172
  # Calculates hash code according to all attributes.
232
173
  # @return [Integer] Hash code
233
174
  def hash
234
- [id, slug, name, side, description, author, website, donate, public, created_at, updated_at, versions, users, teams].hash
175
+ [id, slug, name, side, description, author, website, donate, public, created_at, updated_at].hash
235
176
  end
236
177
 
237
178
  # Builds the object from hash