warframe 0.1.3 → 0.3.1
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 +4 -4
- data/.yardopts +3 -3
- data/README.md +99 -75
- data/lib/warframe/cache.rb +37 -0
- data/lib/warframe/client_wrapper.rb +39 -37
- data/lib/warframe/models/alert.rb +30 -29
- data/lib/warframe/models/attributes/active.rb +31 -31
- data/lib/warframe/models/attributes/description.rb +21 -14
- data/lib/warframe/models/attributes/eta.rb +14 -14
- data/lib/warframe/models/attributes/expiry.rb +30 -30
- data/lib/warframe/models/attributes/id.rb +14 -14
- data/lib/warframe/models/attributes/reward_types.rb +14 -14
- data/lib/warframe/models/attributes/start_string.rb +14 -14
- data/lib/warframe/models/attributes/translations.rb +18 -18
- data/lib/warframe/models/base.rb +36 -36
- data/lib/warframe/models/cambion_drift.rb +26 -0
- data/lib/warframe/models/cetus.rb +40 -0
- data/lib/warframe/models/conclave_challenge.rb +54 -0
- data/lib/warframe/models/global_upgrade.rb +41 -40
- data/lib/warframe/models/invasion.rb +71 -70
- data/lib/warframe/models/news.rb +54 -53
- data/lib/warframe/models/nightwave.rb +40 -39
- data/lib/warframe/models/sortie.rb +36 -0
- data/lib/warframe/models/steel_path.rb +34 -0
- data/lib/warframe/models/syndicate_mission.rb +32 -0
- data/lib/warframe/rest/api/alerts.rb +23 -23
- data/lib/warframe/rest/api/cambion_drift.rb +23 -0
- data/lib/warframe/rest/api/cetus.rb +23 -0
- data/lib/warframe/rest/api/conclave_challenges.rb +23 -0
- data/lib/warframe/rest/api/global_upgrades.rb +23 -23
- data/lib/warframe/rest/api/invasions.rb +23 -23
- data/lib/warframe/rest/api/news.rb +23 -23
- data/lib/warframe/rest/api/nightwave.rb +23 -23
- data/lib/warframe/rest/api/sortie.rb +23 -0
- data/lib/warframe/rest/api/steel_path.rb +23 -0
- data/lib/warframe/rest/api/syndicate_missions.rb +23 -0
- data/lib/warframe/rest/api.rb +37 -25
- data/lib/warframe/rest/client.rb +42 -42
- data/lib/warframe/rest/request.rb +61 -55
- data/lib/warframe/rest/utils.rb +23 -19
- data/lib/warframe/version.rb +6 -6
- data/lib/warframe.rb +7 -7
- metadata +27 -63
@@ -1,18 +1,18 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Warframe
|
4
|
-
module Models
|
5
|
-
module Attributes
|
6
|
-
# Includes the translations attribute.
|
7
|
-
module Translations
|
8
|
-
# The message that can be translated.
|
9
|
-
# @return [String]
|
10
|
-
attr_reader :message
|
11
|
-
|
12
|
-
# Available translations for the requested data.
|
13
|
-
# @return [OpenStruct]
|
14
|
-
attr_reader :translations
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Warframe
|
4
|
+
module Models
|
5
|
+
module Attributes
|
6
|
+
# Includes the translations attribute.
|
7
|
+
module Translations
|
8
|
+
# The message that can be translated.
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :message
|
11
|
+
|
12
|
+
# Available translations for the requested data.
|
13
|
+
# @return [OpenStruct]
|
14
|
+
attr_reader :translations
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/warframe/models/base.rb
CHANGED
@@ -1,36 +1,36 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'fast_underscore'
|
4
|
-
|
5
|
-
module Warframe
|
6
|
-
# Models of HTTP responses.
|
7
|
-
module Models
|
8
|
-
# Warframe Base Model.
|
9
|
-
class Base
|
10
|
-
attr_reader :error, :code
|
11
|
-
|
12
|
-
# Creates a new [Warframe::Models::Base] instance.
|
13
|
-
# @param options [Hash, Array] a parsed JSON object, or collection of JSON objects.
|
14
|
-
def initialize(options = {})
|
15
|
-
if options.is_a? Array
|
16
|
-
from_array options
|
17
|
-
else
|
18
|
-
options.each do |k, v|
|
19
|
-
renamed = k.to_s.underscore
|
20
|
-
v = v.map { |obj| OpenStruct.new obj } if v.is_a?(Array) && v[0].is_a?(Hash)
|
21
|
-
v = OpenStruct.new v if v.is_a? Hash
|
22
|
-
instance_variable_set "@#{renamed}", v
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
# Constructs an Array of new [Warframe::Models::Base]'s'.
|
30
|
-
# @return [Array]
|
31
|
-
def from_array(arr)
|
32
|
-
arr.map { |obj| initialize obj }
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'fast_underscore'
|
4
|
+
|
5
|
+
module Warframe
|
6
|
+
# Models of HTTP responses.
|
7
|
+
module Models
|
8
|
+
# Warframe Base Model.
|
9
|
+
class Base
|
10
|
+
attr_reader :error, :code
|
11
|
+
|
12
|
+
# Creates a new [Warframe::Models::Base] instance.
|
13
|
+
# @param options [Hash, Array] a parsed JSON object, or collection of JSON objects.
|
14
|
+
def initialize(options = {})
|
15
|
+
if options.is_a? Array
|
16
|
+
from_array options
|
17
|
+
else
|
18
|
+
options.each do |k, v|
|
19
|
+
renamed = k.to_s.underscore
|
20
|
+
v = v.map { |obj| OpenStruct.new obj } if v.is_a?(Array) && v[0].is_a?(Hash)
|
21
|
+
v = OpenStruct.new v if v.is_a? Hash
|
22
|
+
instance_variable_set "@#{renamed}", v
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
# Constructs an Array of new [Warframe::Models::Base]'s'.
|
30
|
+
# @return [Array]
|
31
|
+
def from_array(arr)
|
32
|
+
arr.map { |obj| initialize obj }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/id'
|
5
|
+
require_relative 'attributes/expiry'
|
6
|
+
require_relative 'attributes/active'
|
7
|
+
|
8
|
+
module Warframe
|
9
|
+
module Models
|
10
|
+
# Cambion Drift data model.
|
11
|
+
# {https://api.warframestat.us/pc/cambionCycle /:platform/cambionCycle}
|
12
|
+
class CambionDrift < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::ID
|
14
|
+
include Warframe::Models::Attributes::Activation
|
15
|
+
include Warframe::Models::Attributes::Expiry
|
16
|
+
|
17
|
+
# Current active state of the world, either 'vome' or 'fass'.
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :active
|
20
|
+
|
21
|
+
# The time remaining until world state switches.
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :time_left
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/id'
|
5
|
+
require_relative 'attributes/active'
|
6
|
+
require_relative 'attributes/expiry'
|
7
|
+
|
8
|
+
module Warframe
|
9
|
+
module Models
|
10
|
+
# Cetus data model.
|
11
|
+
# {https://api.warframestat.us/pc/cetusCycle /:platform/cetusCycle}
|
12
|
+
class Cetus < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::ID
|
14
|
+
include Warframe::Models::Attributes::Activation
|
15
|
+
include Warframe::Models::Attributes::Expiry
|
16
|
+
|
17
|
+
# Whether or not it is currently day.
|
18
|
+
# @return [Boolean]
|
19
|
+
attr_reader :is_day
|
20
|
+
alias day? is_day
|
21
|
+
|
22
|
+
# Current world state of Cetus.
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :state
|
25
|
+
|
26
|
+
# Whether or not this is Cetus.
|
27
|
+
# @return [Boolean]
|
28
|
+
attr_reader :is_cetus
|
29
|
+
alias cetus? is_cetus
|
30
|
+
|
31
|
+
# Time left until state change.
|
32
|
+
# @return [String]
|
33
|
+
attr_reader :time_left
|
34
|
+
|
35
|
+
# A short string of the time left until state change.
|
36
|
+
# @return [String]
|
37
|
+
attr_reader :short_string
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/expiry'
|
5
|
+
require_relative 'attributes/eta'
|
6
|
+
require_relative 'attributes/description'
|
7
|
+
require_relative 'attributes/id'
|
8
|
+
require_relative 'attributes/active'
|
9
|
+
|
10
|
+
module Warframe
|
11
|
+
module Models
|
12
|
+
# Conclave Challenges data model.
|
13
|
+
# {https://api.warframestat.us/pc/conclaveChallenges /:platform/conclaveChallenges}
|
14
|
+
class ConclaveChallenge < Warframe::Models::Base
|
15
|
+
include Warframe::Models::Attributes::Expiration
|
16
|
+
include Warframe::Models::Attributes::ETA
|
17
|
+
include Warframe::Models::Attributes::Description
|
18
|
+
include Warframe::Models::Attributes::ID
|
19
|
+
include Warframe::Models::Attributes::Activation
|
20
|
+
|
21
|
+
# The mode of the conclave.
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :mode
|
24
|
+
|
25
|
+
# The amount of challenges that must be completed.
|
26
|
+
# @return [Integer]
|
27
|
+
attr_reader :amount
|
28
|
+
|
29
|
+
# The amount of standing you will gain upon completion.
|
30
|
+
# @return [Integer]
|
31
|
+
attr_reader :standing
|
32
|
+
|
33
|
+
# The title of the challenge.
|
34
|
+
# @return [String]
|
35
|
+
attr_reader :title
|
36
|
+
|
37
|
+
# The category of mission, usually 'weekly' / 'daily'.
|
38
|
+
# @return [String]
|
39
|
+
attr_reader :category
|
40
|
+
|
41
|
+
# Whether or not this is a daily mission.
|
42
|
+
# @return [Boolean]
|
43
|
+
attr_reader :daily
|
44
|
+
|
45
|
+
# The challenge information in a one line string.
|
46
|
+
# @return [String]
|
47
|
+
attr_reader :as_string
|
48
|
+
|
49
|
+
# Whether or not this is a root challenge.
|
50
|
+
# @return [Boolean]
|
51
|
+
attr_reader :root_challenge
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -1,40 +1,41 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './attributes/expiry'
|
4
|
-
require_relative './attributes/description'
|
5
|
-
require_relative './attributes/eta'
|
6
|
-
|
7
|
-
module Warframe
|
8
|
-
module Models
|
9
|
-
# Global Upgrades data model.
|
10
|
-
|
11
|
-
|
12
|
-
include Warframe::Models::Attributes::
|
13
|
-
include Warframe::Models::Attributes::
|
14
|
-
|
15
|
-
|
16
|
-
#
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
#
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
#
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
#
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './attributes/expiry'
|
4
|
+
require_relative './attributes/description'
|
5
|
+
require_relative './attributes/eta'
|
6
|
+
|
7
|
+
module Warframe
|
8
|
+
module Models
|
9
|
+
# Global Upgrades data model.
|
10
|
+
# {https://api.warframestat.us/pc/globalUpgrades /:platform/globalUpgrades}
|
11
|
+
class GlobalUpgrade < Warframe::Models::Base
|
12
|
+
include Warframe::Models::Attributes::Expired
|
13
|
+
include Warframe::Models::Attributes::Desc
|
14
|
+
include Warframe::Models::Attributes::ETA
|
15
|
+
|
16
|
+
# The start of the global upgrade.
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :start
|
19
|
+
|
20
|
+
# The end of the global upgrade.
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :end
|
23
|
+
|
24
|
+
# The upgrade to be received.
|
25
|
+
# @return [String]
|
26
|
+
attr_reader :upgrade
|
27
|
+
|
28
|
+
# The operation of the global upgrade.
|
29
|
+
# @return [String]
|
30
|
+
attr_reader :operation
|
31
|
+
|
32
|
+
# The symbol of the operation.
|
33
|
+
# @return [String]
|
34
|
+
attr_reader :operation_symbol
|
35
|
+
|
36
|
+
# The upgrade operation value.
|
37
|
+
# @return [Integer]
|
38
|
+
attr_reader :upgrade_operation_value
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -1,70 +1,71 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './base'
|
4
|
-
require_relative './attributes/id'
|
5
|
-
require_relative './attributes/expiry'
|
6
|
-
require_relative './attributes/active'
|
7
|
-
require_relative './attributes/eta'
|
8
|
-
require_relative './attributes/description'
|
9
|
-
require_relative './attributes/reward_types'
|
10
|
-
require_relative './attributes/start_string'
|
11
|
-
|
12
|
-
module Warframe
|
13
|
-
module Models
|
14
|
-
# Invasion data model.
|
15
|
-
|
16
|
-
|
17
|
-
include Warframe::Models::Attributes::
|
18
|
-
include Warframe::Models::Attributes::
|
19
|
-
include Warframe::Models::Attributes::
|
20
|
-
include Warframe::Models::Attributes::
|
21
|
-
include Warframe::Models::Attributes::
|
22
|
-
include Warframe::Models::Attributes::
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
#
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
#
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
#
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
#
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
#
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
#
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
#
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
#
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
#
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative './attributes/id'
|
5
|
+
require_relative './attributes/expiry'
|
6
|
+
require_relative './attributes/active'
|
7
|
+
require_relative './attributes/eta'
|
8
|
+
require_relative './attributes/description'
|
9
|
+
require_relative './attributes/reward_types'
|
10
|
+
require_relative './attributes/start_string'
|
11
|
+
|
12
|
+
module Warframe
|
13
|
+
module Models
|
14
|
+
# Invasion data model.
|
15
|
+
# {https://api.warframestat.us/pc/invasions /:platform/invasions}
|
16
|
+
class Invasion < Warframe::Models::Base
|
17
|
+
include Warframe::Models::Attributes::ID
|
18
|
+
include Warframe::Models::Attributes::Activation
|
19
|
+
include Warframe::Models::Attributes::Expiry
|
20
|
+
include Warframe::Models::Attributes::ETA
|
21
|
+
include Warframe::Models::Attributes::Description
|
22
|
+
include Warframe::Models::Attributes::RewardTypes
|
23
|
+
include Warframe::Models::Attributes::StartString
|
24
|
+
|
25
|
+
# Attacking faction data.
|
26
|
+
# @return [OpenStruct]
|
27
|
+
attr_reader :attacker
|
28
|
+
|
29
|
+
# The rewards for helping the attacking faction.
|
30
|
+
# @return [OpenStruct]
|
31
|
+
attr_reader :attacker_reward
|
32
|
+
|
33
|
+
# Attacking Faction Name
|
34
|
+
# @return [String]
|
35
|
+
attr_reader :attacking_faction
|
36
|
+
|
37
|
+
# Whether or not the invasion has been completed.
|
38
|
+
# @return [Boolean]
|
39
|
+
attr_reader :completed
|
40
|
+
alias completed? completed
|
41
|
+
|
42
|
+
# The status of completion of the invasion.
|
43
|
+
# @return [Array<Float>]
|
44
|
+
attr_reader :completion
|
45
|
+
|
46
|
+
# Defending faction data.
|
47
|
+
# @return [OpenStruct]
|
48
|
+
attr_reader :defender
|
49
|
+
|
50
|
+
# The rewards for helping the defending faction.
|
51
|
+
# @return [OpenStruct]
|
52
|
+
attr_reader :defender_reward
|
53
|
+
|
54
|
+
# The name of the defending faction.
|
55
|
+
# @return [String]
|
56
|
+
attr_reader :defending_faction
|
57
|
+
|
58
|
+
# The name of the node of the invasion.
|
59
|
+
# @return [String]
|
60
|
+
attr_reader :node
|
61
|
+
|
62
|
+
# The key of the node.
|
63
|
+
# @return [String]
|
64
|
+
attr_reader :node_key
|
65
|
+
|
66
|
+
# The amount of runs required for completion.
|
67
|
+
# @return [Integer]
|
68
|
+
attr_reader :required_runs
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
data/lib/warframe/models/news.rb
CHANGED
@@ -1,53 +1,54 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './base'
|
4
|
-
require_relative './attributes/translations'
|
5
|
-
require_relative './attributes/eta'
|
6
|
-
require_relative './attributes/id'
|
7
|
-
|
8
|
-
module Warframe
|
9
|
-
module Models
|
10
|
-
#
|
11
|
-
|
12
|
-
|
13
|
-
include Warframe::Models::Attributes::
|
14
|
-
include Warframe::Models::Attributes::
|
15
|
-
|
16
|
-
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
#
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
#
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
#
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
#
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
#
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative './attributes/translations'
|
5
|
+
require_relative './attributes/eta'
|
6
|
+
require_relative './attributes/id'
|
7
|
+
|
8
|
+
module Warframe
|
9
|
+
module Models
|
10
|
+
# News data model.
|
11
|
+
# {https://api.warframestat.us/pc/news /:platform/news}
|
12
|
+
class News < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::Translations
|
14
|
+
include Warframe::Models::Attributes::ETA
|
15
|
+
include Warframe::Models::Attributes::ID
|
16
|
+
|
17
|
+
# The date the news was released.
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :date
|
20
|
+
|
21
|
+
# The image link from the news page.
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :image_link
|
24
|
+
|
25
|
+
# Link for more information on this news.
|
26
|
+
# @return [String]
|
27
|
+
attr_reader :link
|
28
|
+
|
29
|
+
# Whether or not the news has to do with Prime Access.
|
30
|
+
# @return [Boolean]
|
31
|
+
attr_reader :prime_access
|
32
|
+
alias prime_access? prime_access
|
33
|
+
|
34
|
+
# Whether or not a DEV stream is available.
|
35
|
+
# @return [Boolean]
|
36
|
+
attr_reader :stream
|
37
|
+
alias stream? stream
|
38
|
+
|
39
|
+
# Whether or not this news is regarding an update.
|
40
|
+
# @return [Boolean]
|
41
|
+
attr_reader :update
|
42
|
+
alias update? update
|
43
|
+
|
44
|
+
# Whether or not this news is of priority.
|
45
|
+
# @return [Boolean]
|
46
|
+
attr_reader :priority
|
47
|
+
alias priority? priority
|
48
|
+
|
49
|
+
# The entire response as a long string.
|
50
|
+
# @return [String]
|
51
|
+
attr_reader :as_string
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -1,39 +1,40 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative './base'
|
4
|
-
require_relative './attributes/active'
|
5
|
-
require_relative './attributes/id'
|
6
|
-
require_relative './attributes/expiry'
|
7
|
-
require_relative './attributes/reward_types'
|
8
|
-
|
9
|
-
module Warframe
|
10
|
-
module Models
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
include Warframe::Models::Attributes::
|
15
|
-
include Warframe::Models::Attributes::
|
16
|
-
include Warframe::Models::Attributes::
|
17
|
-
|
18
|
-
|
19
|
-
#
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
#
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
#
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
#
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
#
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative './attributes/active'
|
5
|
+
require_relative './attributes/id'
|
6
|
+
require_relative './attributes/expiry'
|
7
|
+
require_relative './attributes/reward_types'
|
8
|
+
|
9
|
+
module Warframe
|
10
|
+
module Models
|
11
|
+
# Nightwave data model.
|
12
|
+
# {https://api.warframestat.us/pc/nightwave /:platform/nightwave}
|
13
|
+
class Nightwave < Warframe::Models::Base
|
14
|
+
include Warframe::Models::Attributes::Activation
|
15
|
+
include Warframe::Models::Attributes::ID
|
16
|
+
include Warframe::Models::Attributes::Expiry
|
17
|
+
include Warframe::Models::Attributes::RewardTypes
|
18
|
+
|
19
|
+
# The current phase of this event.
|
20
|
+
# @return [Integer]
|
21
|
+
attr_reader :phase
|
22
|
+
|
23
|
+
# The current Nightwave Tag
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :tag
|
26
|
+
|
27
|
+
# The current Nightwave Season
|
28
|
+
# @return [Integer]
|
29
|
+
attr_reader :season
|
30
|
+
|
31
|
+
# List of all possible challenges.
|
32
|
+
# @return [Array<OpenStruct>]
|
33
|
+
attr_reader :possible_challenges
|
34
|
+
|
35
|
+
# Active Challenges for this event.
|
36
|
+
# @return [Array<OpenStruct>]
|
37
|
+
attr_reader :active_challenges
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|