warframe 0.2.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +3 -3
  3. data/CHANGELOG.md +26 -0
  4. data/README.md +99 -93
  5. data/lib/warframe/cache.rb +37 -0
  6. data/lib/warframe/client_wrapper.rb +39 -37
  7. data/lib/warframe/models/alert.rb +30 -30
  8. data/lib/warframe/models/attributes/active.rb +31 -31
  9. data/lib/warframe/models/attributes/description.rb +21 -21
  10. data/lib/warframe/models/attributes/eta.rb +14 -14
  11. data/lib/warframe/models/attributes/expiry.rb +30 -30
  12. data/lib/warframe/models/attributes/id.rb +14 -14
  13. data/lib/warframe/models/attributes/reward_types.rb +14 -14
  14. data/lib/warframe/models/attributes/start_string.rb +14 -14
  15. data/lib/warframe/models/attributes/translations.rb +18 -18
  16. data/lib/warframe/models/base.rb +36 -36
  17. data/lib/warframe/models/cambion_drift.rb +26 -26
  18. data/lib/warframe/models/cetus.rb +40 -40
  19. data/lib/warframe/models/conclave_challenge.rb +54 -54
  20. data/lib/warframe/models/global_upgrade.rb +41 -41
  21. data/lib/warframe/models/invasion.rb +71 -71
  22. data/lib/warframe/models/news.rb +54 -54
  23. data/lib/warframe/models/nightwave.rb +40 -40
  24. data/lib/warframe/models/sortie.rb +36 -36
  25. data/lib/warframe/models/steel_path.rb +34 -34
  26. data/lib/warframe/models/syndicate_mission.rb +32 -32
  27. data/lib/warframe/models/vallis_cycle.rb +35 -0
  28. data/lib/warframe/rest/api/alerts.rb +23 -23
  29. data/lib/warframe/rest/api/cambion_drift.rb +23 -23
  30. data/lib/warframe/rest/api/cetus.rb +23 -23
  31. data/lib/warframe/rest/api/conclave_challenges.rb +23 -23
  32. data/lib/warframe/rest/api/global_upgrades.rb +23 -23
  33. data/lib/warframe/rest/api/invasions.rb +23 -23
  34. data/lib/warframe/rest/api/news.rb +23 -23
  35. data/lib/warframe/rest/api/nightwave.rb +23 -23
  36. data/lib/warframe/rest/api/sortie.rb +23 -23
  37. data/lib/warframe/rest/api/steel_path.rb +23 -23
  38. data/lib/warframe/rest/api/syndicate_missions.rb +23 -23
  39. data/lib/warframe/rest/api/vallis_cycle.rb +23 -0
  40. data/lib/warframe/rest/api.rb +39 -37
  41. data/lib/warframe/rest/client.rb +42 -42
  42. data/lib/warframe/rest/request.rb +61 -55
  43. data/lib/warframe/rest/utils.rb +23 -19
  44. data/lib/warframe/version.rb +6 -6
  45. data/lib/warframe.rb +7 -7
  46. data/warframe.gemspec +45 -0
  47. metadata +30 -65
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 064d0649ace9ff7b79f1beaa548ac113c1e8b4b1067d102c628f18b20d7b868a
4
- data.tar.gz: 1f003893b70c4649472ca7643fb596bd112492641b30d96bfc22cc4b86db48cc
3
+ metadata.gz: 78748576f24eb1184699a2140bc9fefefd272db2ca66d34368e0654915b68e3e
4
+ data.tar.gz: 8b5f568ff6cae893642de84e623e4e042eb533a8aba61b6f818967423b192d92
5
5
  SHA512:
6
- metadata.gz: 24e0ff2c60f49fbd6e6234c517a75c2c005253f1c460e7fef99b0e488680d265f641009afe52cd5503551df99e1f0cacc4009d72e79aafb0726a7120f5d73b79
7
- data.tar.gz: 20168043a6f49861b071e03305b416e87d1752d305827532ff8080477116bf8b8ec5400bc463a515fc40681a2a836151b199d4fe3e8d3c789c45eeee4a537563
6
+ metadata.gz: 932ca17b0a6a573edb25624b2be3c951cb1d84416c32cde4c91ac4a3cf319fb4a1579ddd076a0e2add9fe8306a018878912ea4debd45fce452fe6da94f2de8d9
7
+ data.tar.gz: b26454fb1d3f0e0b32c01bce42b66e79d930038018d8f5a6d9de02a2c8da036adcc6aa7e61b6226f864645ecb7e7d29130487f0653fde5b34eaa3dce2b94d04b
data/.yardopts CHANGED
@@ -1,4 +1,4 @@
1
- --no-private
2
- --protected
3
- -
1
+ --no-private
2
+ --protected
3
+ -
4
4
  README.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ ## [0.4.0](https://www.github.com/WFCD/warframe-ruby/compare/v0.3.2...v0.4.0) (2022-01-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * **REST:** add `vallisCycle` route. ([#61](https://www.github.com/WFCD/warframe-ruby/issues/61)) ([f81577f](https://www.github.com/WFCD/warframe-ruby/commit/f81577fc6af0ec45948cfd57cc1d67de684ce03c))
9
+
10
+ ### [0.3.2](https://www.github.com/WFCD/warframe-ruby/compare/v0.3.1...v0.3.2) (2021-12-29)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **changelog:** added changelog to gemspec. [#54](https://www.github.com/WFCD/warframe-ruby/issues/54) ([0164546](https://www.github.com/WFCD/warframe-ruby/commit/01645466c75069800b2f69f1146625e5dc6f6775))
16
+ * **dependencies:** add support for no bundler ([741aff8](https://www.github.com/WFCD/warframe-ruby/commit/741aff8c9d271c80419d1c8046aab37889443514))
17
+ * **dependencies:** remove lock file ([86890fe](https://www.github.com/WFCD/warframe-ruby/commit/86890fec76e702db5d8ee397d875aae28299a262))
18
+ * **docs:** fix incorrect attribute module ([cad978b](https://www.github.com/WFCD/warframe-ruby/commit/cad978bc42679e6a7240b5f6045b70e0fc157f3c))
19
+
20
+ ### [0.3.1](https://www.github.com/WFCD/warframe-ruby/compare/v0.3.0...v0.3.1) (2021-12-14)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **dependencies:** generify runtime bundler dependency ([d0bd8ad](https://www.github.com/WFCD/warframe-ruby/commit/d0bd8ad2f4096dade9175461c0c4a1c8cc2114ca))
26
+ * **dependencies:** update thor to v1.1.0 ([2598318](https://www.github.com/WFCD/warframe-ruby/commit/2598318b351cfd07f7a691305cc1141681db598b))
data/README.md CHANGED
@@ -1,93 +1,99 @@
1
- # warframe-ruby
2
- [![Ruby Gem Version](https://badgen.net/rubygems/v/warframe)](https://rubygems.org/gems/warframe)
3
- [![Downloads](https://badgen.net/rubygems/dt/warframe)](https://rubygems.org/gems/warframe)
4
- [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
5
- [![Platform](https://badgen.net/rubygems/p/warframe)](https://www.ruby-lang.org/en/)
6
-
7
- A Ruby client for [Warframe Stat](https://warframestat.us) bringing you live modeled data from their API.
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- ```ruby
14
- gem 'warframe'
15
- ```
16
-
17
- And then execute:
18
-
19
- $ bundle install
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install warframe
24
-
25
- ## Usage
26
-
27
- To get started accessing live data, you must instantiate a new `Warframe::REST::Client`
28
- ```ruby
29
- require 'warframe'
30
-
31
- client = Warframe::REST::Client.new # => <Warframe::REST::Client platform='pc' language='en'>
32
-
33
- # You can supply a hash to set your preferred platform or language.
34
- my_custom_options = { platform: 'ps4', language: 'de' }
35
- german_ps4 = Warframe::REST:Client.new my_custom_options # => <Warframe::REST::Client platform='ps4' language='de'>
36
- ```
37
-
38
- This gives us access to a plethora of methods, check out the [documentation](https://rubydoc.info/gems/warframe) for more info.
39
- ```ruby
40
-
41
- client = Warframe::REST::Client.new
42
- client.nightwave # => <Warframe::Models::Nightwave>
43
- client.alerts # => [ <Warframe::Models::Alert>, <Warframe::Models::Alert> ]
44
- ```
45
-
46
- ## Documentation
47
-
48
- Documentation is currently provided by [rubydoc.info](https://rubydoc.info), check out the current versions documentation at https://rubydoc.info/gems/warframe.
49
-
50
- ## Development
51
-
52
- ### Dependency Management
53
- After checking out the repo, run `bundle install` to install required dependencies.
54
-
55
- ### Testing
56
- To check if your changes are passing tests, run:
57
-
58
- $ thor test:rspec
59
-
60
- > Testing framework provided by [RSpec](https://rspec.info/).
61
-
62
- ### Linting
63
- To auto-correct styling offenses, run:
64
-
65
- $ thor style:fix
66
-
67
- > All linting is provided by [RuboCop](https://github.com/rubocop/rubocop).
68
-
69
- ### Generating New Routes / Models with Thor
70
- Using Thor allows us to create new routes and models via the command line, making it very simple to add new elements.
71
-
72
- For example if we wanted to add, [conclaveChallenges](https://docs.warframestat.us/#tag/Worldstate/paths/~1{platform}~1conclaveChallenges/get) we run:
73
-
74
- $ thor generate conclaveChallenges
75
-
76
- > create lib/warframe/models/conclave_challenge.rb
77
- > create lib/warframe/rest/api/conclave_challenges.rb
78
- > conflict lib/warframe/rest/api.rb
79
- > Overwrite C:/Users/ajrom/RubymineProjects/warframe/lib/warframe/rest/api.rb? (enter "h" for help) [Ynaqdh]
80
-
81
- $ Y
82
-
83
- > force lib/warframe/rest/api.rb
84
-
85
- This creates a blank [model](/lib/warframe/models) for the data and a [route](/lib/warframe/rest/api) with a name spaced method for it, and then adds this method to our [REST::API](/lib/warframe/rest/api). Add attributes to the corresponding model and then write associated tests.
86
-
87
- ## Contributing
88
-
89
- Bug reports and pull requests are welcome on GitHub at https://github.com/aj-rom/warframe-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/aj-rom/warframe-ruby/blob/master/CODE_OF_CONDUCT.md).
90
-
91
- ## License
92
-
93
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
1
+ # warframe-ruby
2
+ [![Supported by Warframe Community Developers](https://warframestat.us/wfcd.png)](https://github.com/WFCD/banner/blob/main/PROJECTS.md "Supported by Warframe Community Developers")
3
+ [![Ruby Gem Version](https://badgen.net/rubygems/v/warframe)](https://rubygems.org/gems/warframe)
4
+ [![Downloads](https://badgen.net/rubygems/dt/warframe)](https://rubygems.org/gems/warframe)
5
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)
6
+ [![Platform](https://badgen.net/rubygems/p/warframe)](https://www.ruby-lang.org/en/)
7
+
8
+
9
+ A Ruby client for [Warframe Stat](https://warframestat.us) bringing you live modeled data from their API.
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'warframe'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle install
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install warframe
26
+
27
+ ## Usage
28
+
29
+ To get started accessing live data, you must instantiate a new `Warframe::REST::Client`
30
+ ```ruby
31
+ require 'warframe'
32
+
33
+ client = Warframe::REST::Client.new # => <Warframe::REST::Client platform='pc' language='en'>
34
+
35
+ # You can supply a hash to set your preferred platform or language.
36
+ my_custom_options = { platform: 'ps4', language: 'de' }
37
+ german_ps4 = Warframe::REST:Client.new my_custom_options # => <Warframe::REST::Client platform='ps4' language='de'>
38
+ ```
39
+
40
+ This gives us access to a plethora of methods, check out the [documentation](https://rubydoc.info/gems/warframe) for more info.
41
+ ```ruby
42
+
43
+ client = Warframe::REST::Client.new
44
+ client.nightwave # => <Warframe::Models::Nightwave>
45
+ client.alerts # => [ <Warframe::Models::Alert>, <Warframe::Models::Alert> ]
46
+ ```
47
+
48
+ ## Documentation
49
+
50
+ Documentation is currently provided by [rubydoc.info](https://rubydoc.info), check out the current versions documentation at https://rubydoc.info/gems/warframe.
51
+
52
+ ## Development
53
+
54
+ ### Dependency Management
55
+ After checking out the repo, run:
56
+
57
+ $ bundle install
58
+
59
+ > This will install all required dependencies for this gem to run.
60
+
61
+ ### Testing
62
+ To check if your changes are passing tests, run:
63
+
64
+ $ thor test:rspec
65
+
66
+ > Testing framework provided by [RSpec](https://rspec.info/).
67
+
68
+ ### Linting
69
+ To auto-correct styling offenses, run:
70
+
71
+ $ thor style:fix
72
+
73
+ > All linting is provided by [RuboCop](https://github.com/rubocop/rubocop).
74
+
75
+ ### Generating New Routes / Models with Thor
76
+ Using Thor allows us to create new routes and models via the command line, making it very simple to add new elements.
77
+
78
+ For example if we wanted to add, [conclaveChallenges](https://docs.warframestat.us/#tag/Worldstate/paths/~1{platform}~1conclaveChallenges/get) we run:
79
+
80
+ $ thor generate conclaveChallenges
81
+
82
+ > create lib/warframe/models/conclave_challenge.rb
83
+ > create lib/warframe/rest/api/conclave_challenges.rb
84
+ > conflict lib/warframe/rest/api.rb
85
+ > Overwrite ~/warframe/lib/warframe/rest/api.rb? (enter "h" for help) [Ynaqdh]
86
+
87
+ $ Y
88
+
89
+ > force lib/warframe/rest/api.rb
90
+
91
+ This creates a blank [model](/lib/warframe/models) for the data and a [route](/lib/warframe/rest/api) with a name spaced method for it, and then adds this method to our [REST::API](/lib/warframe/rest/api). Add attributes to the corresponding model and then write associated tests.
92
+
93
+ ## Contributing
94
+
95
+ Bug reports and pull requests are welcome on GitHub at https://github.com/aj-rom/warframe-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/aj-rom/warframe-ruby/blob/master/CODE_OF_CONDUCT.md).
96
+
97
+ ## License
98
+
99
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Warframe
4
+ # @private
5
+ class Cache
6
+ # Expiration time in seconds
7
+ EXPIRATION_TIME = 5 * 60
8
+ attr_accessor :cache
9
+
10
+ def initialize
11
+ @cache = {}
12
+ end
13
+
14
+ def get_from_cache(key)
15
+ cache[key][:result]
16
+ end
17
+
18
+ def find_in_cache(key)
19
+ cache[key][:result] if exist?(key) && !expired?(key)
20
+ end
21
+
22
+ def add_to_cache(key, val, time = EXPIRATION_TIME)
23
+ cache[key] = { time: Time.now.to_i + time, result: val }
24
+ val
25
+ end
26
+
27
+ private
28
+
29
+ def exist?(key)
30
+ !cache[key].nil?
31
+ end
32
+
33
+ def expired?(key)
34
+ cache[key][:time] - Time.now.to_i <= 0
35
+ end
36
+ end
37
+ end
@@ -1,37 +1,39 @@
1
- # frozen_string_literal: true
2
-
3
- module Warframe
4
- # @abstract
5
- # @private
6
- # Wraps the {Warframe::REST::Client REST::Client} with necessary variables and methods.
7
- #
8
- # This class should < not be used > for interacting with the API.
9
- class ClientWrapper
10
- # The base Warframe Stat API link
11
- BASE_URL = 'https://api.warframestat.us/'
12
- # Default attributes
13
- DEFAULT_OPTIONS = { platform: 'pc', language: 'en' }.freeze
14
- attr_accessor :platform, :language
15
-
16
- # Initialize the Wrapper for {Warframe::REST::Client REST::Client}
17
- #
18
- # @param options [Hash] merges with {DEFAULT_OPTIONS}
19
- #
20
- # See {Warframe::REST::Client REST::Client} for all accepted languages, platforms, and examples.
21
- #
22
- # This class is ABSTRACT and should not be instantiated outside of {Warframe::REST::Client REST::Client}.
23
- # @return [Warframe::ClientWrapper]
24
- def initialize(options = {})
25
- DEFAULT_OPTIONS.merge(options).each { |k, v| instance_variable_set "@#{k}", v }
26
-
27
- yield self if block_given?
28
- end
29
-
30
- # @return [String] the base url and platform combined.
31
- def base_url
32
- BASE_URL + platform
33
- end
34
-
35
- # might need to manipulate user_agent
36
- end
37
- end
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'cache'
4
+
5
+ module Warframe
6
+ # @abstract
7
+ # @private
8
+ # Wraps the {Warframe::REST::Client REST::Client} with necessary variables and methods.
9
+ #
10
+ # This class should < not be used > for interacting with the API.
11
+ class ClientWrapper < Warframe::Cache
12
+ # The base Warframe Stat API link
13
+ BASE_URL = 'https://api.warframestat.us/'
14
+ # Default attributes
15
+ DEFAULT_OPTIONS = { platform: 'pc', language: 'en' }.freeze
16
+
17
+ # The Client Cache
18
+ attr_accessor :platform, :language
19
+
20
+ # Initialize the Wrapper for {Warframe::REST::Client REST::Client}
21
+ #
22
+ # @param options [Hash] merges with {DEFAULT_OPTIONS}
23
+ #
24
+ # See {Warframe::REST::Client REST::Client} for all accepted languages, platforms, and examples.
25
+ #
26
+ # This class is ABSTRACT and should not be instantiated outside of {Warframe::REST::Client REST::Client}.
27
+ # @return [Warframe::ClientWrapper]
28
+ def initialize(options = {})
29
+ super()
30
+ DEFAULT_OPTIONS.merge(options).each { |k, v| instance_variable_set "@#{k}", v }
31
+ yield self if block_given?
32
+ end
33
+
34
+ # @return [String] the base url and platform combined.
35
+ def base_url
36
+ BASE_URL + platform
37
+ end
38
+ end
39
+ end
@@ -1,30 +1,30 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative './base'
4
- require_relative './attributes/expiry'
5
- require_relative './attributes/active'
6
- require_relative './attributes/eta'
7
- require_relative './attributes/reward_types'
8
- require_relative './attributes/start_string'
9
-
10
- module Warframe
11
- module Models
12
- # Model for Alert data.
13
- # {https://api.warframestat.hub/pc/alerts /:platform/alerts}
14
- class Alert < Warframe::Models::Base
15
- include Warframe::Models::Attributes::Expired
16
- include Warframe::Models::Attributes::Active
17
- include Warframe::Models::Attributes::ETA
18
- include Warframe::Models::Attributes::RewardTypes
19
- include Warframe::Models::Attributes::StartString
20
-
21
- # The id of the Alert.
22
- # @return [String]
23
- attr_reader :id
24
-
25
- # The mission data of this alert.
26
- # @return [OpenStruct]
27
- attr_reader :mission
28
- end
29
- end
30
- end
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './base'
4
+ require_relative './attributes/expiry'
5
+ require_relative './attributes/active'
6
+ require_relative './attributes/eta'
7
+ require_relative './attributes/reward_types'
8
+ require_relative './attributes/start_string'
9
+
10
+ module Warframe
11
+ module Models
12
+ # Model for Alert data.
13
+ # {https://api.warframestat.hub/pc/alerts /:platform/alerts}
14
+ class Alert < Warframe::Models::Base
15
+ include Warframe::Models::Attributes::Expired
16
+ include Warframe::Models::Attributes::Active
17
+ include Warframe::Models::Attributes::ETA
18
+ include Warframe::Models::Attributes::RewardTypes
19
+ include Warframe::Models::Attributes::StartString
20
+
21
+ # The id of the Alert.
22
+ # @return [String]
23
+ attr_reader :id
24
+
25
+ # The mission data of this alert.
26
+ # @return [OpenStruct]
27
+ attr_reader :mission
28
+ end
29
+ end
30
+ end
@@ -1,31 +1,31 @@
1
- # frozen_string_literal: true
2
-
3
- module Warframe
4
- module Models
5
- module Attributes
6
- # Includes the active? attribute.
7
- module Active
8
- # Whether or not the event is active.
9
- # @return [Boolean]
10
- attr_reader :active
11
- alias active? active
12
- end
13
-
14
- # Includes the activation date as an attribute.
15
- module Activation
16
- # The time the event was activated.
17
- # @return [String]
18
- attr_reader :activation
19
- end
20
-
21
- # For models that require both {Warframe::Models::Common::Active Common::Active}
22
- # and {Warframe::Models::Common::Activation Common::Activation}
23
- #
24
- # Includes both the active? and activation methods.
25
- module ActiveBoth
26
- include Activation
27
- include Active
28
- end
29
- end
30
- end
31
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Warframe
4
+ module Models
5
+ module Attributes
6
+ # Includes the active? attribute.
7
+ module Active
8
+ # Whether or not the event is active.
9
+ # @return [Boolean]
10
+ attr_reader :active
11
+ alias active? active
12
+ end
13
+
14
+ # Includes the activation date as an attribute.
15
+ module Activation
16
+ # The time the event was activated.
17
+ # @return [String]
18
+ attr_reader :activation
19
+ end
20
+
21
+ # For models that require both {Warframe::Models::Attributes::Active Attributes::Active}
22
+ # and {Warframe::Models::Attributes::Activation Attributes::Activation}
23
+ #
24
+ # Includes both the active? and activation methods.
25
+ module ActiveBoth
26
+ include Activation
27
+ include Active
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,21 +1,21 @@
1
- # frozen_string_literal: true
2
-
3
- module Warframe
4
- module Models
5
- module Attributes
6
- # Includes the desc attribute
7
- module Desc
8
- # The description of the data requested
9
- # @return [String]
10
- attr_reader :desc
11
- end
12
-
13
- # Includes the description attribute.
14
- module Description
15
- # The description of the data requested.
16
- # @return [String]
17
- attr_reader :description
18
- end
19
- end
20
- end
21
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Warframe
4
+ module Models
5
+ module Attributes
6
+ # Includes the desc attribute
7
+ module Desc
8
+ # The description of the data requested
9
+ # @return [String]
10
+ attr_reader :desc
11
+ end
12
+
13
+ # Includes the description attribute.
14
+ module Description
15
+ # The description of the data requested.
16
+ # @return [String]
17
+ attr_reader :description
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- module Warframe
4
- module Models
5
- module Attributes
6
- # Adds the eta attribute.
7
- module ETA
8
- # The estimated time until arrival.
9
- # @return [String]
10
- attr_reader :eta
11
- end
12
- end
13
- end
14
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Warframe
4
+ module Models
5
+ module Attributes
6
+ # Adds the eta attribute.
7
+ module ETA
8
+ # The estimated time until arrival.
9
+ # @return [String]
10
+ attr_reader :eta
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,30 +1,30 @@
1
- # frozen_string_literal: true
2
-
3
- module Warframe
4
- module Models
5
- # Common Attributes between models.
6
- module Attributes
7
- # Includes the expiry attribute.
8
- module Expiry
9
- # When the event will expire.
10
- # @return [String]
11
- attr_reader :expiry
12
- end
13
-
14
- # Adds a boolean attribute expired? to see whether or not the even has expired.
15
- module Expired
16
- # Whether or not the event has expired.
17
- # @return [Boolean]
18
- attr_reader :expired
19
- alias expired? expired
20
- end
21
-
22
- # Adds the {Warframe::Models::Attributes::Expiry Attributes::Expiry} &
23
- # {Warframe::Models::Attributes::Expired Attributes::Expired} attributes.
24
- module Expiration
25
- include Expiry
26
- include Expired
27
- end
28
- end
29
- end
30
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Warframe
4
+ module Models
5
+ # Common Attributes between models.
6
+ module Attributes
7
+ # Includes the expiry attribute.
8
+ module Expiry
9
+ # When the event will expire.
10
+ # @return [String]
11
+ attr_reader :expiry
12
+ end
13
+
14
+ # Adds a boolean attribute expired? to see whether or not the even has expired.
15
+ module Expired
16
+ # Whether or not the event has expired.
17
+ # @return [Boolean]
18
+ attr_reader :expired
19
+ alias expired? expired
20
+ end
21
+
22
+ # Adds the {Warframe::Models::Attributes::Expiry Attributes::Expiry} &
23
+ # {Warframe::Models::Attributes::Expired Attributes::Expired} attributes.
24
+ module Expiration
25
+ include Expiry
26
+ include Expired
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,14 +1,14 @@
1
- # frozen_string_literal: true
2
-
3
- module Warframe
4
- module Models
5
- module Attributes
6
- # Unique data response ID.
7
- module ID
8
- # The unique ID of the event.
9
- # @return [String]
10
- attr_reader :id
11
- end
12
- end
13
- end
14
- end
1
+ # frozen_string_literal: true
2
+
3
+ module Warframe
4
+ module Models
5
+ module Attributes
6
+ # Unique data response ID.
7
+ module ID
8
+ # The unique ID of the event.
9
+ # @return [String]
10
+ attr_reader :id
11
+ end
12
+ end
13
+ end
14
+ end