minecraft_versions 0.10.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 +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +72 -0
- data/README.md +98 -0
- data/Rakefile +10 -0
- data/bin/bundle +109 -0
- data/bin/byebug +27 -0
- data/bin/coderay +27 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/pry +27 -0
- data/bin/racc +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -0
- data/docs/DefaultApi.md +132 -0
- data/docs/Download.md +22 -0
- data/docs/Version.md +26 -0
- data/docs/VersionManifest.md +20 -0
- data/docs/VersionManifestLatest.md +20 -0
- data/docs/VersionPackageInfo.md +40 -0
- data/docs/VersionPackageInfoAssetIndex.md +26 -0
- data/docs/VersionPackageInfoDownloads.md +24 -0
- data/docs/VersionPackageInfoJavaVersion.md +20 -0
- data/git_push.sh +57 -0
- data/lib/minecraft_versions/api/default_api.rb +142 -0
- data/lib/minecraft_versions/api_client.rb +391 -0
- data/lib/minecraft_versions/api_error.rb +56 -0
- data/lib/minecraft_versions/configuration.rb +293 -0
- data/lib/minecraft_versions/models/download.rb +230 -0
- data/lib/minecraft_versions/models/version.rb +248 -0
- data/lib/minecraft_versions/models/version_manifest.rb +223 -0
- data/lib/minecraft_versions/models/version_manifest_latest.rb +221 -0
- data/lib/minecraft_versions/models/version_package_info.rb +311 -0
- data/lib/minecraft_versions/models/version_package_info_asset_index.rb +248 -0
- data/lib/minecraft_versions/models/version_package_info_downloads.rb +239 -0
- data/lib/minecraft_versions/models/version_package_info_java_version.rb +221 -0
- data/lib/minecraft_versions/version.rb +13 -0
- data/lib/minecraft_versions.rb +46 -0
- data/minecraft_versions.gemspec +37 -0
- data/spec/api/default_api_spec.rb +55 -0
- data/spec/models/download_spec.rb +46 -0
- data/spec/models/version_manifest_latest_spec.rb +40 -0
- data/spec/models/version_manifest_spec.rb +40 -0
- data/spec/models/version_package_info_asset_index_spec.rb +58 -0
- data/spec/models/version_package_info_downloads_spec.rb +52 -0
- data/spec/models/version_package_info_java_version_spec.rb +40 -0
- data/spec/models/version_package_info_spec.rb +100 -0
- data/spec/models/version_spec.rb +58 -0
- data/spec/spec_helper.rb +109 -0
- metadata +144 -0
@@ -0,0 +1,239 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
require 'time'
|
13
|
+
|
14
|
+
module MinecraftVersionsClient
|
15
|
+
class VersionPackageInfoDownloads
|
16
|
+
attr_accessor :client
|
17
|
+
|
18
|
+
attr_accessor :client_mappings
|
19
|
+
|
20
|
+
attr_accessor :server
|
21
|
+
|
22
|
+
attr_accessor :server_mappings
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'client' => :'client',
|
28
|
+
:'client_mappings' => :'client_mappings',
|
29
|
+
:'server' => :'server',
|
30
|
+
:'server_mappings' => :'server_mappings'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns all the JSON keys this model knows about
|
35
|
+
def self.acceptable_attributes
|
36
|
+
attribute_map.values
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
:'client' => :'Download',
|
43
|
+
:'client_mappings' => :'Download',
|
44
|
+
:'server' => :'Download',
|
45
|
+
:'server_mappings' => :'Download'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# List of attributes with nullable: true
|
50
|
+
def self.openapi_nullable
|
51
|
+
Set.new([
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Initializes the object
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
57
|
+
def initialize(attributes = {})
|
58
|
+
if (!attributes.is_a?(Hash))
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MinecraftVersionsClient::VersionPackageInfoDownloads` initialize method"
|
60
|
+
end
|
61
|
+
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MinecraftVersionsClient::VersionPackageInfoDownloads`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
|
+
end
|
67
|
+
h[k.to_sym] = v
|
68
|
+
}
|
69
|
+
|
70
|
+
if attributes.key?(:'client')
|
71
|
+
self.client = attributes[:'client']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'client_mappings')
|
75
|
+
self.client_mappings = attributes[:'client_mappings']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'server')
|
79
|
+
self.server = attributes[:'server']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'server_mappings')
|
83
|
+
self.server_mappings = attributes[:'server_mappings']
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
88
|
+
# @return Array for valid properties with the reasons
|
89
|
+
def list_invalid_properties
|
90
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
91
|
+
invalid_properties = Array.new
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
client == o.client &&
|
108
|
+
client_mappings == o.client_mappings &&
|
109
|
+
server == o.server &&
|
110
|
+
server_mappings == o.server_mappings
|
111
|
+
end
|
112
|
+
|
113
|
+
# @see the `==` method
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def eql?(o)
|
116
|
+
self == o
|
117
|
+
end
|
118
|
+
|
119
|
+
# Calculates hash code according to all attributes.
|
120
|
+
# @return [Integer] Hash code
|
121
|
+
def hash
|
122
|
+
[client, client_mappings, server, server_mappings].hash
|
123
|
+
end
|
124
|
+
|
125
|
+
# Builds the object from hash
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
127
|
+
# @return [Object] Returns the model itself
|
128
|
+
def self.build_from_hash(attributes)
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
131
|
+
transformed_hash = {}
|
132
|
+
openapi_types.each_pair do |key, type|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
134
|
+
transformed_hash["#{key}"] = nil
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
136
|
+
# check to ensure the input is an array given that the attribute
|
137
|
+
# is documented as an array but the input is not
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
140
|
+
end
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
143
|
+
end
|
144
|
+
end
|
145
|
+
new(transformed_hash)
|
146
|
+
end
|
147
|
+
|
148
|
+
# Deserializes the data based on type
|
149
|
+
# @param string type Data type
|
150
|
+
# @param string value Value to be deserialized
|
151
|
+
# @return [Object] Deserialized data
|
152
|
+
def self._deserialize(type, value)
|
153
|
+
case type.to_sym
|
154
|
+
when :Time
|
155
|
+
Time.parse(value)
|
156
|
+
when :Date
|
157
|
+
Date.parse(value)
|
158
|
+
when :String
|
159
|
+
value.to_s
|
160
|
+
when :Integer
|
161
|
+
value.to_i
|
162
|
+
when :Float
|
163
|
+
value.to_f
|
164
|
+
when :Boolean
|
165
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
+
true
|
167
|
+
else
|
168
|
+
false
|
169
|
+
end
|
170
|
+
when :Object
|
171
|
+
# generic object (usually a Hash), return directly
|
172
|
+
value
|
173
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
+
inner_type = Regexp.last_match[:inner_type]
|
175
|
+
value.map { |v| _deserialize(inner_type, v) }
|
176
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
+
k_type = Regexp.last_match[:k_type]
|
178
|
+
v_type = Regexp.last_match[:v_type]
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each do |k, v|
|
181
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
else # model
|
185
|
+
# models (e.g. Pet) or oneOf
|
186
|
+
klass = MinecraftVersionsClient.const_get(type)
|
187
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the string representation of the object
|
192
|
+
# @return [String] String presentation of the object
|
193
|
+
def to_s
|
194
|
+
to_hash.to_s
|
195
|
+
end
|
196
|
+
|
197
|
+
# to_body is an alias to to_hash (backward compatibility)
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_body
|
200
|
+
to_hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Returns the object in the form of hash
|
204
|
+
# @return [Hash] Returns the object in the form of hash
|
205
|
+
def to_hash
|
206
|
+
hash = {}
|
207
|
+
self.class.attribute_map.each_pair do |attr, param|
|
208
|
+
value = self.send(attr)
|
209
|
+
if value.nil?
|
210
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
212
|
+
end
|
213
|
+
|
214
|
+
hash[param] = _to_hash(value)
|
215
|
+
end
|
216
|
+
hash
|
217
|
+
end
|
218
|
+
|
219
|
+
# Outputs non-array value in the form of hash
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
221
|
+
# @param [Object] value Any valid value
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
223
|
+
def _to_hash(value)
|
224
|
+
if value.is_a?(Array)
|
225
|
+
value.compact.map { |v| _to_hash(v) }
|
226
|
+
elsif value.is_a?(Hash)
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
+
end
|
230
|
+
elsif value.respond_to? :to_hash
|
231
|
+
value.to_hash
|
232
|
+
else
|
233
|
+
value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
|
239
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
require 'time'
|
13
|
+
|
14
|
+
module MinecraftVersionsClient
|
15
|
+
class VersionPackageInfoJavaVersion
|
16
|
+
attr_accessor :component
|
17
|
+
|
18
|
+
attr_accessor :major_version
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'component' => :'component',
|
24
|
+
:'major_version' => :'majorVersion'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'component' => :'String',
|
37
|
+
:'major_version' => :'Integer'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# List of attributes with nullable: true
|
42
|
+
def self.openapi_nullable
|
43
|
+
Set.new([
|
44
|
+
])
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MinecraftVersionsClient::VersionPackageInfoJavaVersion` initialize method"
|
52
|
+
end
|
53
|
+
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MinecraftVersionsClient::VersionPackageInfoJavaVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
59
|
+
h[k.to_sym] = v
|
60
|
+
}
|
61
|
+
|
62
|
+
if attributes.key?(:'component')
|
63
|
+
self.component = attributes[:'component']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.key?(:'major_version')
|
67
|
+
self.major_version = attributes[:'major_version']
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
+
# @return Array for valid properties with the reasons
|
73
|
+
def list_invalid_properties
|
74
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
75
|
+
invalid_properties = Array.new
|
76
|
+
invalid_properties
|
77
|
+
end
|
78
|
+
|
79
|
+
# Check to see if the all the properties in the model are valid
|
80
|
+
# @return true if the model is valid
|
81
|
+
def valid?
|
82
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
|
+
true
|
84
|
+
end
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def ==(o)
|
89
|
+
return true if self.equal?(o)
|
90
|
+
self.class == o.class &&
|
91
|
+
component == o.component &&
|
92
|
+
major_version == o.major_version
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Integer] Hash code
|
103
|
+
def hash
|
104
|
+
[component, major_version].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def self.build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
attributes = attributes.transform_keys(&:to_sym)
|
113
|
+
transformed_hash = {}
|
114
|
+
openapi_types.each_pair do |key, type|
|
115
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
116
|
+
transformed_hash["#{key}"] = nil
|
117
|
+
elsif type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
121
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
122
|
+
end
|
123
|
+
elsif !attributes[attribute_map[key]].nil?
|
124
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
125
|
+
end
|
126
|
+
end
|
127
|
+
new(transformed_hash)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def self._deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :Time
|
137
|
+
Time.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :Boolean
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
# models (e.g. Pet) or oneOf
|
168
|
+
klass = MinecraftVersionsClient.const_get(type)
|
169
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
if value.nil?
|
192
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
193
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
194
|
+
end
|
195
|
+
|
196
|
+
hash[param] = _to_hash(value)
|
197
|
+
end
|
198
|
+
hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
module MinecraftVersionsClient
|
12
|
+
VERSION = '0.10.0'
|
13
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
# Common files
|
12
|
+
require 'minecraft_versions/api_client'
|
13
|
+
require 'minecraft_versions/api_error'
|
14
|
+
require 'minecraft_versions/version'
|
15
|
+
require 'minecraft_versions/configuration'
|
16
|
+
|
17
|
+
# Models
|
18
|
+
require 'minecraft_versions/models/download'
|
19
|
+
require 'minecraft_versions/models/version'
|
20
|
+
require 'minecraft_versions/models/version_manifest'
|
21
|
+
require 'minecraft_versions/models/version_manifest_latest'
|
22
|
+
require 'minecraft_versions/models/version_package_info'
|
23
|
+
require 'minecraft_versions/models/version_package_info_asset_index'
|
24
|
+
require 'minecraft_versions/models/version_package_info_downloads'
|
25
|
+
require 'minecraft_versions/models/version_package_info_java_version'
|
26
|
+
|
27
|
+
# APIs
|
28
|
+
require 'minecraft_versions/api/default_api'
|
29
|
+
|
30
|
+
module MinecraftVersionsClient
|
31
|
+
class << self
|
32
|
+
# Customize default settings for the SDK using block.
|
33
|
+
# MinecraftVersionsClient.configure do |config|
|
34
|
+
# config.username = "xxx"
|
35
|
+
# config.password = "xxx"
|
36
|
+
# end
|
37
|
+
# If no block given, return the default Configuration object.
|
38
|
+
def configure
|
39
|
+
if block_given?
|
40
|
+
yield(Configuration.default)
|
41
|
+
else
|
42
|
+
Configuration.default
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#SDK for Minecraft versions info
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 0.10.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.6.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
$:.push File.expand_path("../lib", __FILE__)
|
14
|
+
require "minecraft_versions/version"
|
15
|
+
|
16
|
+
Gem::Specification.new do |s|
|
17
|
+
s.name = "minecraft_versions"
|
18
|
+
s.version = MinecraftVersionsClient::VERSION
|
19
|
+
s.platform = Gem::Platform::RUBY
|
20
|
+
s.authors = ["OpenAPI Clients Factory"]
|
21
|
+
s.email = ["blah+oapicf@cliffano.com"]
|
22
|
+
s.homepage = "https://github.com/oapicf/minecraft-versions"
|
23
|
+
s.summary = " Ruby Gem"
|
24
|
+
s.description = "SDK for Minecraft versions info"
|
25
|
+
s.license = "MIT"
|
26
|
+
s.required_ruby_version = ">= 2.0"
|
27
|
+
s.metadata = {}
|
28
|
+
|
29
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
30
|
+
|
31
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
32
|
+
|
33
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
34
|
+
s.test_files = `find spec/*`.split("\n")
|
35
|
+
s.executables = []
|
36
|
+
s.require_paths = ["lib"]
|
37
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
|
14
|
+
# Unit tests for MinecraftVersionsClient::DefaultApi
|
15
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
16
|
+
# Please update as you see appropriate
|
17
|
+
describe 'DefaultApi' do
|
18
|
+
before do
|
19
|
+
# run before each test
|
20
|
+
@api_instance = MinecraftVersionsClient::DefaultApi.new
|
21
|
+
end
|
22
|
+
|
23
|
+
after do
|
24
|
+
# run after each test
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'test an instance of DefaultApi' do
|
28
|
+
it 'should create an instance of DefaultApi' do
|
29
|
+
expect(@api_instance).to be_instance_of(MinecraftVersionsClient::DefaultApi)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# unit tests for get_minecraft_version_manifest
|
34
|
+
# Get Minecraft version manifest
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [VersionManifest]
|
37
|
+
describe 'get_minecraft_version_manifest test' do
|
38
|
+
it 'should work' do
|
39
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# unit tests for get_minecraft_version_package_info
|
44
|
+
# Get Minecraft version package info
|
45
|
+
# @param package_id
|
46
|
+
# @param version_id
|
47
|
+
# @param [Hash] opts the optional parameters
|
48
|
+
# @return [VersionPackageInfo]
|
49
|
+
describe 'get_minecraft_version_package_info test' do
|
50
|
+
it 'should work' do
|
51
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for MinecraftVersionsClient::Download
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe MinecraftVersionsClient::Download do
|
19
|
+
let(:instance) { MinecraftVersionsClient::Download.new }
|
20
|
+
|
21
|
+
describe 'test an instance of Download' do
|
22
|
+
it 'should create an instance of Download' do
|
23
|
+
# uncomment below to test the instance creation
|
24
|
+
#expect(instance).to be_instance_of(MinecraftVersionsClient::Download)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "sha1"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test attribute "size"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe 'test attribute "url"' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
=begin
|
2
|
+
#SDK for Minecraft versions info
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 0.10.0
|
5
|
+
Contact: blah+oapicf@cliffano.com
|
6
|
+
Generated by: https://openapi-generator.tech
|
7
|
+
Generator version: 7.6.0
|
8
|
+
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'spec_helper'
|
12
|
+
require 'json'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
# Unit tests for MinecraftVersionsClient::VersionManifestLatest
|
16
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
17
|
+
# Please update as you see appropriate
|
18
|
+
describe MinecraftVersionsClient::VersionManifestLatest do
|
19
|
+
let(:instance) { MinecraftVersionsClient::VersionManifestLatest.new }
|
20
|
+
|
21
|
+
describe 'test an instance of VersionManifestLatest' do
|
22
|
+
it 'should create an instance of VersionManifestLatest' do
|
23
|
+
# uncomment below to test the instance creation
|
24
|
+
#expect(instance).to be_instance_of(MinecraftVersionsClient::VersionManifestLatest)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "release"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
describe 'test attribute "snapshot"' do
|
35
|
+
it 'should work' do
|
36
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|