Project

torn_ruby

0.0
The project is in a healthy, maintained state
A Ruby gem that provides a convenient wrapper around the Torn City API. Ideal for developers looking to integrate Torn City data into Ruby applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.1
~> 0.15
 Project Readme

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.