warframe 0.1.3 → 0.2.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.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/lib/warframe/models/attributes/description.rb +9 -2
- data/lib/warframe/models/conclave_challenge.rb +54 -0
- data/lib/warframe/models/global_upgrade.rb +1 -1
- data/lib/warframe/models/sortie.rb +35 -0
- data/lib/warframe/models/steel_path.rb +33 -0
- data/lib/warframe/models/syndicate_mission.rb +31 -0
- data/lib/warframe/rest/api/conclave_challenges.rb +23 -0
- 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 +8 -0
- data/lib/warframe/version.rb +1 -1
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fbb7e4ec10b0e0025f2a7270e2c29dd709999cba7658aaea54a21fd3be00947
|
4
|
+
data.tar.gz: 0477ac222872fc1409b196c25b570264b1a828fedf72590e9edf75bceca63464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3365b0ea6f6d4d24a5504a9ae3d9245b2dd7fe4aa25a9a8975fd3e93c82fd3e3401aa56968fa5590c3873f3ca0097748d62b8764b2d4f100aa2db8a2d37a501f
|
7
|
+
data.tar.gz: 140f505cae2155b0666d8335734818ed46a9becf42eafe77e6034dcb47d3f07311b6989e69bcd788764021855331030385225589792b655db6391e7dd43c68b2
|
data/README.md
CHANGED
@@ -66,6 +66,28 @@ To auto-correct styling offenses, run:
|
|
66
66
|
|
67
67
|
> All linting is provided by [RuboCop](https://github.com/rubocop/rubocop).
|
68
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
|
+
|
69
91
|
## Contributing
|
70
92
|
|
71
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).
|
@@ -3,11 +3,18 @@
|
|
3
3
|
module Warframe
|
4
4
|
module Models
|
5
5
|
module Attributes
|
6
|
-
# Includes the desc attribute
|
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.
|
7
14
|
module Description
|
8
15
|
# The description of the data requested.
|
9
16
|
# @return [String]
|
10
|
-
attr_reader :
|
17
|
+
attr_reader :description
|
11
18
|
end
|
12
19
|
end
|
13
20
|
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
|
+
# Model for ConclaveChallenge Data
|
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
|
@@ -9,7 +9,7 @@ module Warframe
|
|
9
9
|
# Global Upgrades data model.
|
10
10
|
class GlobalUpgrade < Warframe::Models::Base
|
11
11
|
include Warframe::Models::Attributes::Expired
|
12
|
-
include Warframe::Models::Attributes::
|
12
|
+
include Warframe::Models::Attributes::Desc
|
13
13
|
include Warframe::Models::Attributes::ETA
|
14
14
|
|
15
15
|
# The start of the global upgrade.
|
@@ -0,0 +1,35 @@
|
|
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
|
+
|
9
|
+
module Warframe
|
10
|
+
module Models
|
11
|
+
# Model for Sortie Data {https://api.warframestat.us/pc/sortie> /:platform/sortie}
|
12
|
+
class Sortie < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::ID
|
14
|
+
include Warframe::Models::Attributes::Activation
|
15
|
+
include Warframe::Models::Attributes::Expiration
|
16
|
+
include Warframe::Models::Attributes::ETA
|
17
|
+
|
18
|
+
# The boss for this part of the sortie.
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :boss
|
21
|
+
|
22
|
+
# The faction fighting you in this mission.
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :faction
|
25
|
+
|
26
|
+
# Modifiers active for this challenge.
|
27
|
+
# @return [Array<OpenStruct>]
|
28
|
+
attr_reader :variants
|
29
|
+
|
30
|
+
# The reward pool which this is pulling from.
|
31
|
+
# @return [String]
|
32
|
+
attr_reader :reward_pool
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
|
5
|
+
module Warframe
|
6
|
+
module Models
|
7
|
+
# Model for SteelPath Data {https://api.warframestat.us/pc/steelPath> /:platform/steelPath}
|
8
|
+
class SteelPath < Warframe::Models::Base
|
9
|
+
include Warframe::Models::Attributes::Active
|
10
|
+
include Warframe::Models::Attributes::Expiry
|
11
|
+
|
12
|
+
# The currently available item from Teshin.
|
13
|
+
# @return [OpenStruct]
|
14
|
+
attr_reader :current_reward
|
15
|
+
|
16
|
+
# The time remaining of the current reward.
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :remaining
|
19
|
+
|
20
|
+
# Current rotation of items the Arbiters have to offer.
|
21
|
+
# @return [Array<OpenStruct>]
|
22
|
+
attr_reader :rotation
|
23
|
+
|
24
|
+
# Current rotation of items Teshin has to offer.
|
25
|
+
# @return [Array<OpenStruct>]
|
26
|
+
attr_reader :evergreens
|
27
|
+
|
28
|
+
# Current incursion data
|
29
|
+
# @return [OpenStruct]
|
30
|
+
attr_reader :incursions
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/eta'
|
5
|
+
require_relative 'attributes/id'
|
6
|
+
require_relative 'attributes/active'
|
7
|
+
require_relative 'attributes/start_string'
|
8
|
+
|
9
|
+
module Warframe
|
10
|
+
module Models
|
11
|
+
# Model for SyndicateMission Data {https://api.warframestat.us/pc/syndicateMissions> /:platform/syndicateMissions}
|
12
|
+
class SyndicateMission < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::ETA
|
14
|
+
include Warframe::Models::Attributes::ID
|
15
|
+
include Warframe::Models::Attributes::ActiveBoth
|
16
|
+
include Warframe::Models::Attributes::StartString
|
17
|
+
|
18
|
+
# 'Jobs' or challenges currently available.
|
19
|
+
# @return [Array<OpenStruct>]
|
20
|
+
attr_reader :jobs
|
21
|
+
|
22
|
+
# The syndicate you will be fighting.
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :syndicate
|
25
|
+
|
26
|
+
# The nodes that this mission is available on.
|
27
|
+
# @return [Array]
|
28
|
+
attr_reader :nodes
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/conclave_challenge'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current ConclaveChallenge data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/conclaveChallenges> Example Response}
|
12
|
+
module ConclaveChallenges
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current conclave challenges.
|
16
|
+
# @return [Array<Warframe::Models::ConclaveChallenge>]
|
17
|
+
def conclave_challenges
|
18
|
+
get('/conclaveChallenges', Warframe::Models::ConclaveChallenge)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/sortie'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current Sortie data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/sortie> Example Response}
|
12
|
+
module Sortie
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current sortie missions.
|
16
|
+
# @return [Array<Warframe::Models::Sortie>]
|
17
|
+
def sortie
|
18
|
+
get('/sortie', Warframe::Models::Sortie)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/steel_path'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current SteelPath data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/steelPath> Example Response}
|
12
|
+
module SteelPath
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Steel Path data
|
16
|
+
# @return [Warframe::Models::SteelPath]
|
17
|
+
def steel_path
|
18
|
+
get('/steelPath', Warframe::Models::SteelPath)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/syndicate_mission'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current SyndicateMission data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/syndicateMissions> Example Response}
|
12
|
+
module SyndicateMissions
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current syndicateMissions Data.
|
16
|
+
# @return [Array<Warframe::Models::SyndicateMission>]
|
17
|
+
def syndicate_missions
|
18
|
+
get('/syndicateMissions', Warframe::Models::SyndicateMission)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/warframe/rest/api.rb
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'api/alerts'
|
4
|
+
require_relative 'api/conclave_challenges'
|
4
5
|
require_relative 'api/global_upgrades'
|
5
6
|
require_relative 'api/invasions'
|
6
7
|
require_relative 'api/news'
|
7
8
|
require_relative 'api/nightwave'
|
9
|
+
require_relative 'api/sortie'
|
10
|
+
require_relative 'api/steel_path'
|
11
|
+
require_relative 'api/syndicate_missions'
|
8
12
|
|
9
13
|
module Warframe
|
10
14
|
# A REST-ful API service, provided by https://api.warframestat.us
|
@@ -16,10 +20,14 @@ module Warframe
|
|
16
20
|
# Module names are 'routes' to this API. See {Warframe::REST::API::Alerts Alerts} for example.
|
17
21
|
module API
|
18
22
|
include Warframe::REST::API::Alerts
|
23
|
+
include Warframe::REST::API::ConclaveChallenges
|
19
24
|
include Warframe::REST::API::GlobalUpgrades
|
20
25
|
include Warframe::REST::API::Invasions
|
21
26
|
include Warframe::REST::API::News
|
22
27
|
include Warframe::REST::API::Nightwave
|
28
|
+
include Warframe::REST::API::Sortie
|
29
|
+
include Warframe::REST::API::SteelPath
|
30
|
+
include Warframe::REST::API::SyndicateMissions
|
23
31
|
end
|
24
32
|
end
|
25
33
|
end
|
data/lib/warframe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warframe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Romaniello
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_underscore
|
@@ -207,16 +207,24 @@ files:
|
|
207
207
|
- lib/warframe/models/attributes/start_string.rb
|
208
208
|
- lib/warframe/models/attributes/translations.rb
|
209
209
|
- lib/warframe/models/base.rb
|
210
|
+
- lib/warframe/models/conclave_challenge.rb
|
210
211
|
- lib/warframe/models/global_upgrade.rb
|
211
212
|
- lib/warframe/models/invasion.rb
|
212
213
|
- lib/warframe/models/news.rb
|
213
214
|
- lib/warframe/models/nightwave.rb
|
215
|
+
- lib/warframe/models/sortie.rb
|
216
|
+
- lib/warframe/models/steel_path.rb
|
217
|
+
- lib/warframe/models/syndicate_mission.rb
|
214
218
|
- lib/warframe/rest/api.rb
|
215
219
|
- lib/warframe/rest/api/alerts.rb
|
220
|
+
- lib/warframe/rest/api/conclave_challenges.rb
|
216
221
|
- lib/warframe/rest/api/global_upgrades.rb
|
217
222
|
- lib/warframe/rest/api/invasions.rb
|
218
223
|
- lib/warframe/rest/api/news.rb
|
219
224
|
- lib/warframe/rest/api/nightwave.rb
|
225
|
+
- lib/warframe/rest/api/sortie.rb
|
226
|
+
- lib/warframe/rest/api/steel_path.rb
|
227
|
+
- lib/warframe/rest/api/syndicate_missions.rb
|
220
228
|
- lib/warframe/rest/client.rb
|
221
229
|
- lib/warframe/rest/request.rb
|
222
230
|
- lib/warframe/rest/utils.rb
|