warframe 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +3 -3
  3. data/README.md +99 -93
  4. data/lib/warframe/cache.rb +37 -37
  5. data/lib/warframe/client_wrapper.rb +39 -39
  6. data/lib/warframe/models/alert.rb +30 -30
  7. data/lib/warframe/models/attributes/active.rb +31 -31
  8. data/lib/warframe/models/attributes/description.rb +21 -21
  9. data/lib/warframe/models/attributes/eta.rb +14 -14
  10. data/lib/warframe/models/attributes/expiry.rb +30 -30
  11. data/lib/warframe/models/attributes/id.rb +14 -14
  12. data/lib/warframe/models/attributes/reward_types.rb +14 -14
  13. data/lib/warframe/models/attributes/start_string.rb +14 -14
  14. data/lib/warframe/models/attributes/translations.rb +18 -18
  15. data/lib/warframe/models/base.rb +36 -36
  16. data/lib/warframe/models/cambion_drift.rb +26 -26
  17. data/lib/warframe/models/cetus.rb +40 -40
  18. data/lib/warframe/models/conclave_challenge.rb +54 -54
  19. data/lib/warframe/models/global_upgrade.rb +41 -41
  20. data/lib/warframe/models/invasion.rb +71 -71
  21. data/lib/warframe/models/news.rb +54 -54
  22. data/lib/warframe/models/nightwave.rb +40 -40
  23. data/lib/warframe/models/sortie.rb +36 -36
  24. data/lib/warframe/models/steel_path.rb +34 -34
  25. data/lib/warframe/models/syndicate_mission.rb +32 -32
  26. data/lib/warframe/rest/api/alerts.rb +23 -23
  27. data/lib/warframe/rest/api/cambion_drift.rb +23 -23
  28. data/lib/warframe/rest/api/cetus.rb +23 -23
  29. data/lib/warframe/rest/api/conclave_challenges.rb +23 -23
  30. data/lib/warframe/rest/api/global_upgrades.rb +23 -23
  31. data/lib/warframe/rest/api/invasions.rb +23 -23
  32. data/lib/warframe/rest/api/news.rb +23 -23
  33. data/lib/warframe/rest/api/nightwave.rb +23 -23
  34. data/lib/warframe/rest/api/sortie.rb +23 -23
  35. data/lib/warframe/rest/api/steel_path.rb +23 -23
  36. data/lib/warframe/rest/api/syndicate_missions.rb +23 -23
  37. data/lib/warframe/rest/api.rb +37 -37
  38. data/lib/warframe/rest/client.rb +42 -42
  39. data/lib/warframe/rest/request.rb +61 -61
  40. data/lib/warframe/rest/utils.rb +23 -23
  41. data/lib/warframe/version.rb +6 -6
  42. data/lib/warframe.rb +7 -7
  43. metadata +14 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7131e27d764e61e4219caef65a2b3485090e6f5c2076ea9bbb15a53e3c9ff0f2
4
- data.tar.gz: 9b1627bfa5cefc5665e0a51a0fcc697c3ef57a9a2a4c633554e6f188ca5717cd
3
+ metadata.gz: d14b695f778a8720be1940cede86886f31104f9d0760ff6fc2ec83c38234fc0d
4
+ data.tar.gz: 5d06096041b3915849b52d18df667e98c441373fb7fef054d0d9b77aa9117b6a
5
5
  SHA512:
6
- metadata.gz: ad1132a20ca44e9991439d279e78582fff13779426be2edac6ef980b5acf5d1dceeede32f3b47122e388e831165a6c50d59473be16adb6ac96f549de694f7647
7
- data.tar.gz: 7211fc972c45fdeef66b287a26e6a8ff6bd2eda0e8a0ff2579a8b9476f1e44ad09c573f0dbdb29a758e5414cc4199f5291279bbd50f0626b65da402cb0d92953
6
+ metadata.gz: 924f6fd8fb604b19dbb77a2f9088f3c0e4f2edfe27df2df16dd08fe3fafb4273b89a81feedf512998fc7509c2dcc88c05aa1abe3d84242e48607f4ad4757420b
7
+ data.tar.gz: a87e8635e2b5983344cea2b6ae92fe16ec378d3f42c431638322034ed732f4b0f8b1c37c0eed2cd749614f641ac0d0bd771d5ce845f16d732341a07a34053bfe
data/.yardopts CHANGED
@@ -1,4 +1,4 @@
1
- --no-private
2
- --protected
3
- -
1
+ --no-private
2
+ --protected
3
+ -
4
4
  README.md
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).
@@ -1,37 +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
+ # 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,39 +1,39 @@
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
+ # 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::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,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