8000 GitHub - ibramsterdam/torn_ruby
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ibramsterdam/torn_ruby

Repository files navigation

TornRuby

Gem Version

An implementation of the Torn V2 API using Ruby.

Installation

Install the gem and add to the application's Gemfile by executing:

bundle add torn_ruby

If bundler is not being used to manage dependencies, install the gem by executing:

gem install torn_ruby 

Usage

To use the TornRuby gem, you’ll need a valid Torn API key.

require "torn_ruby"

api_key = "Valid Torn Api Key"
client = TornRuby::Client.new(api_key:)

# Fetch basic data
user = client.user
puts user.name  # => "YourTornName"

# Fetch specific selections by passing symbols
user = client.user(selections: [:profile])

# Some endpoints require you to specify a path
racing = client.racing(path: :carupgrades)

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ibramsterdam/torn_ruby.

License

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

Code of Conduct

Everyone interacting in the TornRuby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published
0