Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 60 lines (40 sloc) 2.465 kb
1f0688d @dacort Some readme updates
authored
1 MWhich -- Because searching Netflix, Amazon, Hulu, and iTunes sucks rocks
a8b5bed @dacort Initial revision
authored
2 ==========
3
4 ## DESCRIPTION
5
6 MWhich was created because I'm lazy, and that laziness led to a loss of money.
7 Many times I end up watching on movie on iTunes simply because it is the first
8 place I look, even though had I taken another minute I would have found the
9 same movie available via Netflix Instant Play, or cheaper on Amazon's Video on
10 Demand service.
11
6d3e62e @dacort Added gem requirements
authored
12 ## API ACCESS
a8b5bed @dacort Initial revision
authored
13
14 Of course there is no easy standard for accessing this movie data, Tim
1f0688d @dacort Some readme updates
authored
15 Berners-Lee's wishes be damned. Here is how these services are accessed:
a8b5bed @dacort Initial revision
authored
16
45675a2 @dacort Linkifying
authored
17 * Netflix: OData(!) via [odata.netflix.com](http://odata.netflix.com)
1f0688d @dacort Some readme updates
authored
18 * Amazon: [Product Advertising(?) API](http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/)
a8b5bed @dacort Initial revision
authored
19 * Hulu: Some hack of their publisher tool endpoint
45675a2 @dacort Linkifying
authored
20 * iTunes: Their Store Web Service Search API via [AffiliatesSearch2.1.pdf](http://www.apple.com/itunesaffiliates/API/AffiliatesSearch2.1.pdf)
a8b5bed @dacort Initial revision
authored
21
6d3e62e @dacort Added gem requirements
authored
22 ## REQUIREMENTS
23
24 You'll need the following gems:
25
26 * yajl-ruby
27 * nokogiri
28 * ruby-hmac
29
30 ## USAGE
a8b5bed @dacort Initial revision
authored
31
32 This is very bare bones right now:
33
34 To create a basic MWhich instance:
1f0688d @dacort Some readme updates
authored
35
49a1f53 @dacort More formatting and examples.
authored
36 m = MWhich::Client.new
a8b5bed @dacort Initial revision
authored
37
38 Search for a movie:
1f0688d @dacort Some readme updates
authored
39
49a1f53 @dacort More formatting and examples.
authored
40 m.search("The Prestige")
193a350 @dacort By default, ignore trailers and clips on Hulu.
authored
41 # => {:amazon=>[], :hulu=>[], :itunes=>["feature-movie: The Prestige ($9.99)"], :netflix=>["Movie: The Prestige"]}
a8b5bed @dacort Initial revision
authored
42
43 At this time, this merely returns a hash of key/value pairs indicating which
44 services the movie or TV show was found on. The value is a simple string with
45 the type of media found and the title. Comments specific to each service
46 may also appear. For example:
47
48 * If available on Netflix Instant Play, "Watch now!" will show up.
49 * Hulu sometimes links to external content, "Not on hulu!" will identify this.
1f0688d @dacort Some readme updates
authored
50 * iTunes prices will be displayed
a8b5bed @dacort Initial revision
authored
51
52 An array of services can be passed to the MWhich instance to limit the search.
53
54 Only want to search Netflix and Hulu?
1f0688d @dacort Some readme updates
authored
55
56 m = MWhich::Client.new(:services => [:netflix, :hulu])
57 m.search("Knight Rider")
49a1f53 @dacort More formatting and examples.
authored
58 # => {:hulu=>["episode: I Love the Knight Life", "episode: Knight and the City", "episode: Fly By Knight", "episode: Fight Knight", "episode: Exit Light, Enter Knight", "episode: Knight to King's Pawn", "episode: Day Turns Into Knight", "episode: Don't Stop the Knight", "episode: Knight Fever", "episode: Knight of the Zodiac"], :netflix=>["Series: Knight Rider", "Series: Knight Rider"]}
a8b5bed @dacort Initial revision
authored
59
60 This is obviously imperfect, but does provide an initial abstracted search.
Something went wrong with that request. Please try again.