https://github.com/aj-rom/warframe-ruby
Ruby Client for the Warframe Stat API packaged into a gem.
https://github.com/aj-rom/warframe-ruby
ruby ruby-gem warframe warframe-community
Last synced: 3 months ago
JSON representation
Ruby Client for the Warframe Stat API packaged into a gem.
- Host: GitHub
- URL: https://github.com/aj-rom/warframe-ruby
- Owner: aj-rom
- License: mit
- Created: 2021-11-10T06:52:58.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T18:52:23.000Z (over 3 years ago)
- Last Synced: 2024-05-21T03:19:50.272Z (about 1 year ago)
- Topics: ruby, ruby-gem, warframe, warframe-community
- Language: Ruby
- Homepage: https://rubydoc.info/gems/warframe
- Size: 250 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# warframe-ruby
[](https://github.com/WFCD/banner/blob/main/PROJECTS.md "Supported by Warframe Community Developers")
[](https://rubygems.org/gems/warframe)
[](https://rubygems.org/gems/warframe)
[](https://github.com/rubocop/rubocop)
[](https://www.ruby-lang.org/en/)A Ruby client for [Warframe Stat](https://warframestat.us) bringing you live modeled data from their API.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'warframe'
```And then execute:
$ bundle install
Or install it yourself as:
$ gem install warframe
## Usage
To get started accessing live data, you must instantiate a new `Warframe::REST::Client`
```ruby
require 'warframe'client = Warframe::REST::Client.new # =>
# You can supply a hash to set your preferred platform or language.
my_custom_options = { platform: 'ps4', language: 'de' }
german_ps4 = Warframe::REST:Client.new my_custom_options # =>
```This gives us access to a plethora of methods, check out the [documentation](https://rubydoc.info/gems/warframe) for more info.
```rubyclient = Warframe::REST::Client.new
client.nightwave # =>
client.alerts # => [ , ]
```## Documentation
Documentation is currently provided by [rubydoc.info](https://rubydoc.info), check out the current versions documentation at https://rubydoc.info/gems/warframe.
## Development
### Dependency Management
After checking out the repo, run:$ bundle install
> This will install all required dependencies for this gem to run.### Testing
To check if your changes are passing tests, run:$ thor test:rspec
> Testing framework provided by [RSpec](https://rspec.info/).
### Linting
To auto-correct styling offenses, run:$ thor style:fix
> All linting is provided by [RuboCop](https://github.com/rubocop/rubocop).
### Generating New Routes / Models with Thor
Using Thor allows us to create new routes and models via the command line, making it very simple to add new elements.For example if we wanted to add, [conclaveChallenges](https://docs.warframestat.us/#tag/Worldstate/paths/~1{platform}~1conclaveChallenges/get) we run:
$ thor generate conclaveChallenges
> create lib/warframe/models/conclave_challenge.rb
> create lib/warframe/rest/api/conclave_challenges.rb
> conflict lib/warframe/rest/api.rb
> Overwrite ~/warframe/lib/warframe/rest/api.rb? (enter "h" for help) [Ynaqdh]
$ Y
> force lib/warframe/rest/api.rbThis 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.
## Contributing
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).
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).