Project

warframe

0.0
The project is in a healthy, maintained state
A Ruby interface to the WarframeStat API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Dependencies

Development

~> 5.0, >= 5.0.0.1
~> 2.1, >= 2.2.31
~> 13.0, >= 13.0.6
~> 3.10
~> 1.22, >= 1.22.3
~> 0.9.26
~> 0.19.1

Runtime

~> 5.0, >= 5.0.4
~> 2.6, >= 2.6.1
 Project Readme

warframe-ruby

Ruby Gem Version Downloads Ruby Style Guide Platform

A Ruby client for Warframe Stat bringing you live modeled data from their API.

Installation

Add this line to your application's Gemfile:

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

require 'warframe'

client = Warframe::REST::Client.new # => <Warframe::REST::Client platform='pc' language='en'>

# 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 # => <Warframe::REST::Client platform='ps4' language='de'>

This gives us access to a plethora of methods, check out the documentation for more info.

client = Warframe::REST::Client.new
client.nightwave # => <Warframe::Models::Nightwave>
client.alerts # => [ <Warframe::Models::Alert>, <Warframe::Models::Alert> ]

Documentation

Documentation is currently provided by 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 to install required dependencies.

Testing

To check if your changes are passing tests, run:

$ thor test:rspec

Testing framework provided by RSpec.

Linting

To auto-correct styling offenses, run:

$ thor style:fix

All linting is provided by 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 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 C:/Users/ajrom/RubymineProjects/warframe/lib/warframe/rest/api.rb? (enter "h" for help) [Ynaqdh] 

$ Y

>       force  lib/warframe/rest/api.rb

This creates a blank model for the data and a route with a name spaced method for it, and then adds this method to our 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.

License

The gem is available as open source under the terms of the MIT License.