Project

tmsapi

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Ruby gem for the TMS API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.7.0
~> 1.3.0
~> 10.1.1
~> 2.0
~> 2.4

Runtime

~> 0.8.7
~> 1.8.1
~> 0.4.0
~> 1.0.1
 Project Readme

TMS API

Build Status Coverage Status Dependency Status

A Ruby wrapper around connecting to the TMS API

This is my first project in Ruby so I'm using petems/riot_api as a template.

Installation

Add this line to your application's Gemfile

gem 'tmsapi'

and then execute:

bundle

or install it yourself with:

gem install tmsapi

Usage:

You'll need to get an API key from http://developer.tmsapi.com/.

The free Public key has access to the following methods:

movies.theatres.showings

movies.tv.airings

programs.new_shows

sports.event_airings

require 'tmsapi'

# Create Instace of the API
tms = TMSAPI::API.new :api_key => 'API_KEY_HERE'

# Get all movie showtimes for Austin Texas
movie_showings = tms.movies.theatres.showings({ :zip => "78701" })

# Print out the movie name, theatre name, and date/time of the showing.
movie_showings.each do |movie|
  movie.showtimes.each do |showing|
    puts "#{movie.title} is playing at '#{showing.theatre.name}' at #{showing.date_time}."
  end
end

# 12 Years a Slave is playing at 'Violet Crown Cinema' at 2013-12-23T12:45.
# A Christmas Story is playing at 'Alamo Drafthouse at the Ritz' at 2013-12-23T16:00.
# American Hustle is playing at 'Violet Crown Cinema' at 2013-12-23T11:00.
# American Hustle is playing at 'Violet Crown Cinema' at 2013-12-23T13:40.
# American Hustle is playing at 'Violet Crown Cinema' at 2013-12-23T16:20.
# American Hustle is playing at 'Violet Crown Cinema' at 2013-12-23T19:00.
# American Hustle is playing at 'Violet Crown Cinema' at 2013-12-23T21:40.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Testing

bundle install

If adding new test:

RECORDING=1 TMS_API_KEY=your-api-key rspec

If running existing tests:

rspec