README.md in fandango-1.0.0 vs README.md in fandango-2.0.0
- old
+ new
@@ -4,36 +4,59 @@
Uses Fandango's RSS moviesnearme feed. E.g. http://www.fandango.com/rss/moviesnearme_10023.rss
## Usage
-`Fandango.movies_near(73142)` returns an array of hashes.
-Each hash has 2 items: theater info and movies on sale at that theater.
-A theater is a hash of data containing: name, Fandango's theater id, address, and postal code.
-The movies are an array of hashes. Each hash contains title and Fandango's id.
-
-### Example output format
-
-```
+```ruby
+theaters_and_movies = Fandango.movies_near(73142)
+=begin
[
[ 0] {
- :theater => {
- :name => "AMC",
- :id => "abcde",
- :address => "123 Baker St., New York, NY 10001",
- :postal_code => "10001"
- },
- :movies => [
- [0] {
- :title => "Sherlock Holmes",
- :id => "123456"
+ :name => "AMC Quail Springs Mall 24",
+ :id => "aaktw",
+ :address => "2501 West Memorial Oklahoma City, OK 73134",
+ :postal_code => "73134",
+ :showtimes_link => "http://www.fandango.com/amcquailspringsmall24_aaktw/theaterpage?wssaffid=11836&wssac=123",
+ :movies => [
+ [ 0] {
+ :title => "Abraham Lincoln: Vampire Hunter",
+ :id => "141897"
},
- # more movies...
+ # ...
]
},
- # more hashes...
+ # ...
]
+=end
+
+movies_and_showtimes = Fandango.theater_showtimes(theaters_and_movies.first.fetch(:showtimes_link))
+=begin
+[
+ {
+ :title => "Bad Moms",
+ :id => "191125",
+ :runtime => 101,
+ :showtimes => [
+ [0] {
+ :datetime => #<DateTime: 2016-08-02T11:30:00-05:00 ((2457603j,59400s,0n),-18000s,2299161j)>
+ },
+ # ...
+ ]
+ },
+ # ...
+=end
```
-## Todo
+### `theaters_and_movies` with id and different date
-* Remove Feezirra. For what we're doing, it's not worth the dependency. Just make request and parse ourselves.
+```ruby
+Fandango.theater_showtimes(
+ :theater_id => theaters_and_movies.first.fetch(:id),
+ :date => Date.tomorrow, # optional, defaults to `Date.today`
+)
+```
+
+## Compatibility
+
+Development of this gem will only officially support Ruby versions 2.3.0. (see `.travis.yml`)
+It used to support 1.9.2. and 1.9.3, and it still may work, but it's not tested as of now.
+Contributions are very welcome, and I will do what I can to help.