warframe 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fbb7e4ec10b0e0025f2a7270e2c29dd709999cba7658aaea54a21fd3be00947
4
- data.tar.gz: 0477ac222872fc1409b196c25b570264b1a828fedf72590e9edf75bceca63464
3
+ metadata.gz: 064d0649ace9ff7b79f1beaa548ac113c1e8b4b1067d102c628f18b20d7b868a
4
+ data.tar.gz: 1f003893b70c4649472ca7643fb596bd112492641b30d96bfc22cc4b86db48cc
5
5
  SHA512:
6
- metadata.gz: 3365b0ea6f6d4d24a5504a9ae3d9245b2dd7fe4aa25a9a8975fd3e93c82fd3e3401aa56968fa5590c3873f3ca0097748d62b8764b2d4f100aa2db8a2d37a501f
7
- data.tar.gz: 140f505cae2155b0666d8335734818ed46a9becf42eafe77e6034dcb47d3f07311b6989e69bcd788764021855331030385225589792b655db6391e7dd43c68b2
6
+ metadata.gz: 24e0ff2c60f49fbd6e6234c517a75c2c005253f1c460e7fef99b0e488680d265f641009afe52cd5503551df99e1f0cacc4009d72e79aafb0726a7120f5d73b79
7
+ data.tar.gz: 20168043a6f49861b071e03305b416e87d1752d305827532ff8080477116bf8b8ec5400bc463a515fc40681a2a836151b199d4fe3e8d3c789c45eeee4a537563
data/README.md CHANGED
@@ -55,14 +55,14 @@ After checking out the repo, run `bundle install` to install required dependenci
55
55
  ### Testing
56
56
  To check if your changes are passing tests, run:
57
57
 
58
- $ rake test
58
+ $ thor test:rspec
59
59
 
60
60
  > Testing framework provided by [RSpec](https://rspec.info/).
61
61
 
62
62
  ### Linting
63
63
  To auto-correct styling offenses, run:
64
64
 
65
- $ rake lint
65
+ $ thor style:fix
66
66
 
67
67
  > All linting is provided by [RuboCop](https://github.com/rubocop/rubocop).
68
68
 
@@ -82,11 +82,7 @@ For example if we wanted to add, [conclaveChallenges](https://docs.warframestat.
82
82
 
83
83
  > force lib/warframe/rest/api.rb
84
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).
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.
90
86
 
91
87
  ## Contributing
92
88
 
@@ -9,7 +9,8 @@ require_relative './attributes/start_string'
9
9
 
10
10
  module Warframe
11
11
  module Models
12
- # Model for World State data {https://api.warframestat.hub/pc/alerts /:platform/alerts}
12
+ # Model for Alert data.
13
+ # {https://api.warframestat.hub/pc/alerts /:platform/alerts}
13
14
  class Alert < Warframe::Models::Base
14
15
  include Warframe::Models::Attributes::Expired
15
16
  include Warframe::Models::Attributes::Active
@@ -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
@@ -9,7 +9,7 @@ require_relative 'attributes/active'
9
9
 
10
10
  module Warframe
11
11
  module Models
12
- # Model for ConclaveChallenge Data
12
+ # Conclave Challenges data model.
13
13
  # {https://api.warframestat.us/pc/conclaveChallenges /:platform/conclaveChallenges}
14
14
  class ConclaveChallenge < Warframe::Models::Base
15
15
  include Warframe::Models::Attributes::Expiration
@@ -7,6 +7,7 @@ require_relative './attributes/eta'
7
7
  module Warframe
8
8
  module Models
9
9
  # Global Upgrades data model.
10
+ # {https://api.warframestat.us/pc/globalUpgrades /:platform/globalUpgrades}
10
11
  class GlobalUpgrade < Warframe::Models::Base
11
12
  include Warframe::Models::Attributes::Expired
12
13
  include Warframe::Models::Attributes::Desc
@@ -12,6 +12,7 @@ require_relative './attributes/start_string'
12
12
  module Warframe
13
13
  module Models
14
14
  # Invasion data model.
15
+ # {https://api.warframestat.us/pc/invasions /:platform/invasions}
15
16
  class Invasion < Warframe::Models::Base
16
17
  include Warframe::Models::Attributes::ID
17
18
  include Warframe::Models::Attributes::Activation
@@ -7,7 +7,8 @@ require_relative './attributes/id'
7
7
 
8
8
  module Warframe
9
9
  module Models
10
- # Model for the response of {https://api.warframestat.us/pc/news /:platform/news}
10
+ # News data model.
11
+ # {https://api.warframestat.us/pc/news /:platform/news}
11
12
  class News < Warframe::Models::Base
12
13
  include Warframe::Models::Attributes::Translations
13
14
  include Warframe::Models::Attributes::ETA
@@ -8,7 +8,8 @@ require_relative './attributes/reward_types'
8
8
 
9
9
  module Warframe
10
10
  module Models
11
- # Model for the response of {https://api.warframestat.us/pc/nightwave /:platform/nightwave}
11
+ # Nightwave data model.
12
+ # {https://api.warframestat.us/pc/nightwave /:platform/nightwave}
12
13
  class Nightwave < Warframe::Models::Base
13
14
  include Warframe::Models::Attributes::Activation
14
15
  include Warframe::Models::Attributes::ID
@@ -8,10 +8,11 @@ require_relative 'attributes/eta'
8
8
 
9
9
  module Warframe
10
10
  module Models
11
- # Model for Sortie Data {https://api.warframestat.us/pc/sortie> /:platform/sortie}
11
+ # Sortie data model.
12
+ # {https://api.warframestat.us/pc/sortie /:platform/sortie}
12
13
  class Sortie < Warframe::Models::Base
13
14
  include Warframe::Models::Attributes::ID
14
- include Warframe::Models::Attributes::Activation
15
+ include Warframe::Models::Attributes::ActiveBoth
15
16
  include Warframe::Models::Attributes::Expiration
16
17
  include Warframe::Models::Attributes::ETA
17
18
 
@@ -4,7 +4,8 @@ require_relative './base'
4
4
 
5
5
  module Warframe
6
6
  module Models
7
- # Model for SteelPath Data {https://api.warframestat.us/pc/steelPath> /:platform/steelPath}
7
+ # SteelPath data model.
8
+ # {https://api.warframestat.us/pc/steelPath /:platform/steelPath}
8
9
  class SteelPath < Warframe::Models::Base
9
10
  include Warframe::Models::Attributes::Active
10
11
  include Warframe::Models::Attributes::Expiry
@@ -8,7 +8,8 @@ require_relative 'attributes/start_string'
8
8
 
9
9
  module Warframe
10
10
  module Models
11
- # Model for SyndicateMission Data {https://api.warframestat.us/pc/syndicateMissions> /:platform/syndicateMissions}
11
+ # SyndicateMission data model.
12
+ # {https://api.warframestat.us/pc/syndicateMissions /:platform/syndicateMissions}
12
13
  class SyndicateMission < Warframe::Models::Base
13
14
  include Warframe::Models::Attributes::ETA
14
15
  include Warframe::Models::Attributes::ID
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'warframe/models/cambion_drift'
4
+ require_relative '../utils'
5
+
6
+ module Warframe
7
+ module REST
8
+ module API
9
+ # API endpoint for getting information on current Cambion Drift data.
10
+ #
11
+ # {https://api.warframestat.us/pc/cambionDrift Example Response}
12
+ module CambionDrift
13
+ include Warframe::REST::Utils
14
+
15
+ # Gets the current cambionDrift Data.
16
+ # @return Warframe::Models::CambionDrift
17
+ def cambion_drift
18
+ get('/cambionCycle', Warframe::Models::CambionDrift)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'warframe/models/cetus'
4
+ require_relative '../utils'
5
+
6
+ module Warframe
7
+ module REST
8
+ module API
9
+ # API endpoint for getting information on current Cetus data.
10
+ #
11
+ # {https://api.warframestat.us/pc/cetusCycle Example Response}
12
+ module Cetus
13
+ include Warframe::REST::Utils
14
+
15
+ # Gets the current cetusCycle Data.
16
+ # @return [Warframe::Models::Cetus]
17
+ def cetus
18
+ get('/cetusCycle', Warframe::Models::Cetus)
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -6,9 +6,9 @@ require_relative '../utils'
6
6
  module Warframe
7
7
  module REST
8
8
  module API
9
- # API endpoint for getting information on current ConclaveChallenge data.
9
+ # API endpoint for getting information on current Conclave Challenge data.
10
10
  #
11
- # {https://api.warframestat.us/pc/conclaveChallenges> Example Response}
11
+ # {https://api.warframestat.us/pc/conclaveChallenges Example Response}
12
12
  module ConclaveChallenges
13
13
  include Warframe::REST::Utils
14
14
 
@@ -8,7 +8,7 @@ module Warframe
8
8
  module API
9
9
  # API endpoint for getting information on current Sortie data.
10
10
  #
11
- # {https://api.warframestat.us/pc/sortie> Example Response}
11
+ # {https://api.warframestat.us/pc/sortie Example Response}
12
12
  module Sortie
13
13
  include Warframe::REST::Utils
14
14
 
@@ -8,7 +8,7 @@ module Warframe
8
8
  module API
9
9
  # API endpoint for getting information on current SteelPath data.
10
10
  #
11
- # {https://api.warframestat.us/pc/steelPath> Example Response}
11
+ # {https://api.warframestat.us/pc/steelPath Example Response}
12
12
  module SteelPath
13
13
  include Warframe::REST::Utils
14
14
 
@@ -8,7 +8,7 @@ module Warframe
8
8
  module API
9
9
  # API endpoint for getting information on current SyndicateMission data.
10
10
  #
11
- # {https://api.warframestat.us/pc/syndicateMissions> Example Response}
11
+ # {https://api.warframestat.us/pc/syndicateMissions Example Response}
12
12
  module SyndicateMissions
13
13
  include Warframe::REST::Utils
14
14
 
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'api/alerts'
4
+ require_relative 'api/cambion_drift'
5
+ require_relative 'api/cetus'
4
6
  require_relative 'api/conclave_challenges'
5
7
  require_relative 'api/global_upgrades'
6
8
  require_relative 'api/invasions'
@@ -11,7 +13,7 @@ require_relative 'api/steel_path'
11
13
  require_relative 'api/syndicate_missions'
12
14
 
13
15
  module Warframe
14
- # A REST-ful API service, provided by https://api.warframestat.us
16
+ # A REST-ful API service, provided by https://api.warframestat.us.
15
17
  module REST
16
18
  # The API Router for getting live data.
17
19
  #
@@ -20,6 +22,8 @@ module Warframe
20
22
  # Module names are 'routes' to this API. See {Warframe::REST::API::Alerts Alerts} for example.
21
23
  module API
22
24
  include Warframe::REST::API::Alerts
25
+ include Warframe::REST::API::CambionDrift
26
+ include Warframe::REST::API::Cetus
23
27
  include Warframe::REST::API::ConclaveChallenges
24
28
  include Warframe::REST::API::GlobalUpgrades
25
29
  include Warframe::REST::API::Invasions
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Warframe
4
4
  # The current version of this gem.
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
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.2.0
4
+ version: 0.2.1
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-20 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fast_underscore
@@ -104,26 +104,6 @@ dependencies:
104
104
  - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: 2.2.31
107
- - !ruby/object:Gem::Dependency
108
- name: rake
109
- requirement: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: '13.0'
114
- - - ">="
115
- - !ruby/object:Gem::Version
116
- version: 13.0.6
117
- type: :development
118
- prerelease: false
119
- version_requirements: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '13.0'
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- version: 13.0.6
127
107
  - !ruby/object:Gem::Dependency
128
108
  name: rspec
129
109
  requirement: !ruby/object:Gem::Requirement
@@ -207,6 +187,8 @@ files:
207
187
  - lib/warframe/models/attributes/start_string.rb
208
188
  - lib/warframe/models/attributes/translations.rb
209
189
  - lib/warframe/models/base.rb
190
+ - lib/warframe/models/cambion_drift.rb
191
+ - lib/warframe/models/cetus.rb
210
192
  - lib/warframe/models/conclave_challenge.rb
211
193
  - lib/warframe/models/global_upgrade.rb
212
194
  - lib/warframe/models/invasion.rb
@@ -217,6 +199,8 @@ files:
217
199
  - lib/warframe/models/syndicate_mission.rb
218
200
  - lib/warframe/rest/api.rb
219
201
  - lib/warframe/rest/api/alerts.rb
202
+ - lib/warframe/rest/api/cambion_drift.rb
203
+ - lib/warframe/rest/api/cetus.rb
220
204
  - lib/warframe/rest/api/conclave_challenges.rb
221
205
  - lib/warframe/rest/api/global_upgrades.rb
222
206
  - lib/warframe/rest/api/invasions.rb