weather_api_task 1.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.
@@ -0,0 +1,35 @@
1
+ # weather_api_task
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module WeatherApiTask
7
+ # Sys Model.
8
+ class Sys < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [String]
11
+ attr_accessor :country
12
+
13
+ # A mapping from model property names to API property names.
14
+ def self.names
15
+ @_hash = {} if @_hash.nil?
16
+ @_hash['country'] = 'country'
17
+ @_hash
18
+ end
19
+
20
+ def initialize(country = nil)
21
+ @country = country
22
+ end
23
+
24
+ # Creates an instance of the object from a hash.
25
+ def self.from_hash(hash)
26
+ return nil unless hash
27
+
28
+ # Extract variables from the hash.
29
+ country = hash['country']
30
+
31
+ # Create object from extracted values.
32
+ Sys.new(country)
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,62 @@
1
+ # weather_api_task
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module WeatherApiTask
7
+ # Weather Model.
8
+ class Weather < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [Integer]
11
+ attr_accessor :id
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :main
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [String]
19
+ attr_accessor :description
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [String]
23
+ attr_accessor :icon
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['id'] = 'id'
29
+ @_hash['main'] = 'main'
30
+ @_hash['description'] = 'description'
31
+ @_hash['icon'] = 'icon'
32
+ @_hash
33
+ end
34
+
35
+ def initialize(id = nil,
36
+ main = nil,
37
+ description = nil,
38
+ icon = nil)
39
+ @id = id
40
+ @main = main
41
+ @description = description
42
+ @icon = icon
43
+ end
44
+
45
+ # Creates an instance of the object from a hash.
46
+ def self.from_hash(hash)
47
+ return nil unless hash
48
+
49
+ # Extract variables from the hash.
50
+ id = hash['id']
51
+ main = hash['main']
52
+ description = hash['description']
53
+ icon = hash['icon']
54
+
55
+ # Create object from extracted values.
56
+ Weather.new(id,
57
+ main,
58
+ description,
59
+ icon)
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,44 @@
1
+ # weather_api_task
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module WeatherApiTask
7
+ # Wind Model.
8
+ class Wind < BaseModel
9
+ # TODO: Write general description for this method
10
+ # @return [Float]
11
+ attr_accessor :speed
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [Integer]
15
+ attr_accessor :deg
16
+
17
+ # A mapping from model property names to API property names.
18
+ def self.names
19
+ @_hash = {} if @_hash.nil?
20
+ @_hash['speed'] = 'speed'
21
+ @_hash['deg'] = 'deg'
22
+ @_hash
23
+ end
24
+
25
+ def initialize(speed = nil,
26
+ deg = nil)
27
+ @speed = speed
28
+ @deg = deg
29
+ end
30
+
31
+ # Creates an instance of the object from a hash.
32
+ def self.from_hash(hash)
33
+ return nil unless hash
34
+
35
+ # Extract variables from the hash.
36
+ speed = hash['speed']
37
+ deg = hash['deg']
38
+
39
+ # Create object from extracted values.
40
+ Wind.new(speed,
41
+ deg)
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,27 @@
1
+ # weather_api_task
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module WeatherApiTask
7
+ # weather_api_task client class.
8
+ class WeatherApiTaskClient
9
+ # Singleton access to find_weather controller.
10
+ # @return [FindWeatherController] Returns the controller instance.
11
+ def find_weather
12
+ FindWeatherController.instance
13
+ end
14
+
15
+ # Returns the configuration class for easy access.
16
+ # @return [Configuration] Returns the actual configuration class.
17
+ def config
18
+ Configuration
19
+ end
20
+
21
+ # Initializer with authentication and configuration parameters.
22
+ def initialize(appid: 'e7b16ebe3fbe47e6b97f6821cff80e5d')
23
+ Configuration.appid = appid if
24
+ appid
25
+ end
26
+ end
27
+ end
metadata ADDED
@@ -0,0 +1,166 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: weather_api_task
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - APIMatic SDK Generator
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logging
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.10'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: faraday_middleware
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.13.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.13.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: test-unit
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.1'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 3.1.5
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '3.1'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 3.1.5
75
+ - !ruby/object:Gem::Dependency
76
+ name: certifi
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '2016'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '2016'
89
+ - !ruby/object:Gem::Dependency
90
+ name: faraday-http-cache
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.2'
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 1.2.2
99
+ type: :runtime
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '1.2'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 1.2.2
109
+ description: This is the new API for weather forecasting.
110
+ email: support@apimatic.io
111
+ executables: []
112
+ extensions: []
113
+ extra_rdoc_files: []
114
+ files:
115
+ - LICENSE
116
+ - README.md
117
+ - lib/weather_api_task.rb
118
+ - lib/weather_api_task/api_helper.rb
119
+ - lib/weather_api_task/configuration.rb
120
+ - lib/weather_api_task/controllers/base_controller.rb
121
+ - lib/weather_api_task/controllers/find_weather_controller.rb
122
+ - lib/weather_api_task/exceptions/api_exception.rb
123
+ - lib/weather_api_task/http/auth/custom_query_auth.rb
124
+ - lib/weather_api_task/http/faraday_client.rb
125
+ - lib/weather_api_task/http/http_call_back.rb
126
+ - lib/weather_api_task/http/http_client.rb
127
+ - lib/weather_api_task/http/http_context.rb
128
+ - lib/weather_api_task/http/http_method_enum.rb
129
+ - lib/weather_api_task/http/http_request.rb
130
+ - lib/weather_api_task/http/http_response.rb
131
+ - lib/weather_api_task/models/base_model.rb
132
+ - lib/weather_api_task/models/city_weather.rb
133
+ - lib/weather_api_task/models/clouds.rb
134
+ - lib/weather_api_task/models/coord.rb
135
+ - lib/weather_api_task/models/list.rb
136
+ - lib/weather_api_task/models/main.rb
137
+ - lib/weather_api_task/models/rain.rb
138
+ - lib/weather_api_task/models/sys.rb
139
+ - lib/weather_api_task/models/weather.rb
140
+ - lib/weather_api_task/models/wind.rb
141
+ - lib/weather_api_task/weather_api_task_client.rb
142
+ homepage: https://apimatic.io
143
+ licenses:
144
+ - MIT
145
+ metadata: {}
146
+ post_install_message:
147
+ rdoc_options: []
148
+ require_paths:
149
+ - lib
150
+ required_ruby_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - "~>"
153
+ - !ruby/object:Gem::Version
154
+ version: '2.0'
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ requirements: []
161
+ rubyforge_project:
162
+ rubygems_version: 2.7.6
163
+ signing_key:
164
+ specification_version: 4
165
+ summary: weather_api_task
166
+ test_files: []