warframe 0.2.0 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +3 -3
  3. data/CHANGELOG.md +19 -0
  4. data/README.md +99 -97
  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 -29
  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 -0
  18. data/lib/warframe/models/cetus.rb +40 -0
  19. data/lib/warframe/models/conclave_challenge.rb +54 -54
  20. data/lib/warframe/models/global_upgrade.rb +41 -40
  21. data/lib/warframe/models/invasion.rb +71 -70
  22. data/lib/warframe/models/news.rb +54 -53
  23. data/lib/warframe/models/nightwave.rb +40 -39
  24. data/lib/warframe/models/sortie.rb +36 -35
  25. data/lib/warframe/models/steel_path.rb +34 -33
  26. data/lib/warframe/models/syndicate_mission.rb +32 -31
  27. data/lib/warframe/rest/api/alerts.rb +23 -23
  28. data/lib/warframe/rest/api/cambion_drift.rb +23 -0
  29. data/lib/warframe/rest/api/cetus.rb +23 -0
  30. data/lib/warframe/rest/api/conclave_challenges.rb +23 -23
  31. data/lib/warframe/rest/api/global_upgrades.rb +23 -23
  32. data/lib/warframe/rest/api/invasions.rb +23 -23
  33. data/lib/warframe/rest/api/news.rb +23 -23
  34. data/lib/warframe/rest/api/nightwave.rb +23 -23
  35. data/lib/warframe/rest/api/sortie.rb +23 -23
  36. data/lib/warframe/rest/api/steel_path.rb +23 -23
  37. data/lib/warframe/rest/api/syndicate_missions.rb +23 -23
  38. data/lib/warframe/rest/api.rb +37 -33
  39. data/lib/warframe/rest/client.rb +42 -42
  40. data/lib/warframe/rest/request.rb +61 -55
  41. data/lib/warframe/rest/utils.rb +23 -19
  42. data/lib/warframe/version.rb +6 -6
  43. data/lib/warframe.rb +7 -7
  44. data/warframe.gemspec +45 -0
  45. metadata +32 -85
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fbb7e4ec10b0e0025f2a7270e2c29dd709999cba7658aaea54a21fd3be00947
4
- data.tar.gz: 0477ac222872fc1409b196c25b570264b1a828fedf72590e9edf75bceca63464
3
+ metadata.gz: b716fffff85670e6edf2b10c1eedca0814d4cd1b99e5689c095722cf16285a9d
4
+ data.tar.gz: f310cf2ebae9b6692a0450010a2bb35175aa52fb10fe3b47a55fc124b77b3891
5
5
  SHA512:
6
- metadata.gz: 3365b0ea6f6d4d24a5504a9ae3d9245b2dd7fe4aa25a9a8975fd3e93c82fd3e3401aa56968fa5590c3873f3ca0097748d62b8764b2d4f100aa2db8a2d37a501f
7
- data.tar.gz: 140f505cae2155b0666d8335734818ed46a9becf42eafe77e6034dcb47d3f07311b6989e69bcd788764021855331030385225589792b655db6391e7dd43c68b2
6
+ metadata.gz: c364ec3740bfe9754d4e132a9307e4b42223497d5d6686faff4e6bd7672a005786dd3fec881079e428908d538153a9bc079e282c3274ed086aa97becdf81bb8b
7
+ data.tar.gz: 0c9edf81d881ed08d0b8bbb222d965b8f8daa5c8d36f89c7d57b7383a64c647d325b39cf5bfb01db890d42384ff11445aa6b2cd8edd98cc11190e8b2ff6a07e7
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,19 @@
1
+ # Changelog
2
+
3
+ ### [0.3.2](https://www.github.com/WFCD/warframe-ruby/compare/v0.3.1...v0.3.2) (2021-12-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **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))
9
+ * **dependencies:** add support for no bundler ([741aff8](https://www.github.com/WFCD/warframe-ruby/commit/741aff8c9d271c80419d1c8046aab37889443514))
10
+ * **dependencies:** remove lock file ([86890fe](https://www.github.com/WFCD/warframe-ruby/commit/86890fec76e702db5d8ee397d875aae28299a262))
11
+ * **docs:** fix incorrect attribute module ([cad978b](https://www.github.com/WFCD/warframe-ruby/commit/cad978bc42679e6a7240b5f6045b70e0fc157f3c))
12
+
13
+ ### [0.3.1](https://www.github.com/WFCD/warframe-ruby/compare/v0.3.0...v0.3.1) (2021-12-14)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **dependencies:** generify runtime bundler dependency ([d0bd8ad](https://www.github.com/WFCD/warframe-ruby/commit/d0bd8ad2f4096dade9175461c0c4a1c8cc2114ca))
19
+ * **dependencies:** update thor to v1.1.0 ([2598318](https://www.github.com/WFCD/warframe-ruby/commit/2598318b351cfd07f7a691305cc1141681db598b))
data/README.md CHANGED
@@ -1,97 +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
- $ rake test
59
-
60
- > Testing framework provided by [RSpec](https://rspec.info/).
61
-
62
- ### Linting
63
- To auto-correct styling offenses, run:
64
-
65
- $ rake lint
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 run:
86
-
87
- $ rake test
88
-
89
- To ensure the new model is able to be created and accessed correctly, feel free to create more tests in the [spec directory](/spec/models).
90
-
91
- ## Contributing
92
-
93
- 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).
94
-
95
- ## License
96
-
97
- 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,29 +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 World State data {https://api.warframestat.hub/pc/alerts /:platform/alerts}
13
- class Alert < Warframe::Models::Base
14
- include Warframe::Models::Attributes::Expired
15
- include Warframe::Models::Attributes::Active
16
- include Warframe::Models::Attributes::ETA
17
- include Warframe::Models::Attributes::RewardTypes
18
- include Warframe::Models::Attributes::StartString
19
-
20
- # The id of the Alert.
21
- # @return [String]
22
- attr_reader :id
23
-
24
- # The mission data of this alert.
25
- # @return [OpenStruct]
26
- attr_reader :mission
27
- end
28
- end
29
- 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