GitXplorerGitXplorer
a

odeon_uk

public
5 stars
1 forks
1 issues

Commits

List of commits on branch master.
Unverified
9eead4e6e2a16bc6bb3d9fb5eafb368e79080c67

Add filter for test files

aandycroll committed 7 years ago
Unverified
42092ab07e6f686c97a8428940083e7ec1d335c9

Code Climate / Travis update

aandycroll committed 7 years ago
Unverified
73a124cadd1f5865d6db5a2d7b759aa48a676f22

v4.0.1

aandycroll committed 9 years ago
Unverified
491db34a42b73e8bd57ad813f3dcf4fe5035ccb3

Force Performance.at param to be integer

aandycroll committed 9 years ago
Unverified
bcb64bf85d021ae60a276a541234ced79d27cb68

Embarrassing copy-paste docs typo.

aandycroll committed 9 years ago
Unverified
cd0a24e719a1c25f62ab4f4b70b14c72770b845d

v4.0.0

aandycroll committed 9 years ago

README

The README file for this repository.

OdeonUk

A simple gem to parse the Odeon UK website and spit out useful formatted info.

Gem Version Code Climate Test Coverage Build Status Inline docs

Installation

Add this line to your application's Gemfile:

gem 'odeon_uk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install odeon_uk

Usage

The gem conforms to the API set down in the cinebase gem, andycroll/cinebase, which provides a lot of useful base vocabulary and repetitive code for this series of cinema focussed gems.

Performance titles are sanitized as much as possible, removing 'screening type' information and 'dimension' as well as standardising all the theatre/cultural event naming (NT Live, Royal Opera House etc).

Cinema

OdeonUk::Cinema.all
#=> [<OdeonUk::Cinema ...>, <OdeonUk::Cinema ...>, ...]

cinema = OdeonUk::Cinema.new(71)
#=> <OdeonUk::Cinema ...>

cinema.adr
#=> {
  street_address:   'Kingswest',
  extended_address: nil,
  locality:         'Brighton',
  region:           nil,
  postal_code:      'BN1 2RE',
  country:          'United Kingdom'
}

cinema.brand
#=> 'Odeon'

cinema.full_name
#=> 'Odeon Brighton'

cinema.id
#=> 71

cinema.postal_code
#=> 'BN1 2RE'

Performances

OdeonUk::Performance.at(17)
#=> [<OdeonUk::Performance ...>, <OdeonUk::Performance ...>, ...]

performance = OdeonUk::Performance.at(17).first
#=> <OdeonUk::Performance ...>

performance.film_name
#=> 'Star Wars: The Force Awakens'

performance.dimension
#=> '2d'

performance.variant
#=> ['imax', 'kids']

performance.starting_at
#=> 2016-02-04 13:00:00 UTC

performance.showing_on
#=> #<Date: 2016-02-04 ((2457423j,0s,0n),+0s,2299161j)>

performance.booking_url # for now
#=> nil

performance.cinema_name
#=> 'Brighton'

performance.cinema_id
#=> 71

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

Note that contributors assign all rights to the owner, Andy Croll (github), of this gem.