Module: Vinegar::Client::Review

Included in:
Vinegar::Client
Defined in:
lib/vinegar/client/movie/review.rb

Overview

Reviews

Instance Method Summary collapse

Instance Method Details

#all_movie_reviews(movie_id, country = "us", per_page = "", page = "", options = {}) ⇒ Hashie::Mash

Retrieves all reviews for a movie. Results are paginated if they go past the specified page limit

Examples:

Get the search results for a query

@client.all_movie_reviews("12345")

Parameters:

  • movie_id (Integer)

    The id of the movie from Rotten Tomatoes

  • country (String) (defaults to: "us")

    Provides localized data for the selected country if available. Otherwise, returns US data.

  • page_limit (Integer)

    The amount of movie search results to show per page

  • page (Integer) (defaults to: "")

    The selected page of movie search results

Returns:

  • (Hashie::Mash)

    Movies reviews Response

See Also:

Author:

  • Jason Truluck



23
24
25
26
27
28
29
30
31
# File 'lib/vinegar/client/movie/review.rb', line 23

def all_movie_reviews(movie_id, country = "us", per_page = "", page = "", options = {})
  options.merge!(
    :review_type  => :all,
    :country      => country,
    :page_limit   => per_page,
    :page         => page
  )
  reviews(movie_id, options)
end

#dvd_movie_reviews(movie_id, country = "us", per_page = "", page = "", options = {}) ⇒ Hashie::Mash

Retrieves dvd reviews for a movie. Results are paginated if they go past the specified page limit

Examples:

Get the search results for a query

@client.dvd_movie_reviews("12345")

Parameters:

  • movie_id (Integer)

    The id of the movie from Rotten Tomatoes

  • country (String) (defaults to: "us")

    Provides localized data for the selected country if available. Otherwise, returns US data.

  • page_limit (Integer)

    The amount of movie search results to show per page

  • page (Integer) (defaults to: "")

    The selected page of movie search results

Returns:

  • (Hashie::Mash)

    Movies reviews Response

See Also:

Author:

  • Jason Truluck



73
74
75
76
77
78
79
80
81
# File 'lib/vinegar/client/movie/review.rb', line 73

def dvd_movie_reviews(movie_id, country = "us", per_page = "", page = "", options = {})
  options.merge!(
    :review_type  => :dvd,
    :country      => country,
    :page_limit   => per_page,
    :page         => page
  )
  reviews(movie_id, options)
end

#top_critic_movie_reviews(movie_id, country = "us", per_page = "", page = "", options = {}) ⇒ Hashie::Mash

Retrieves top_critic reviews for a movie. Results are paginated if they go past the specified page limit

Examples:

Get the search results for a query

@client.top_critic_movie_reviews("12345")

Parameters:

  • movie_id (Integer)

    The id of the movie from Rotten Tomatoes

  • country (String) (defaults to: "us")

    Provides localized data for the selected country if available. Otherwise, returns US data.

  • page_limit (Integer)

    The amount of movie search results to show per page

  • page (Integer) (defaults to: "")

    The selected page of movie search results

Returns:

  • (Hashie::Mash)

    Movies reviews Response

See Also:

Author:

  • Jason Truluck



48
49
50
51
52
53
54
55
56
# File 'lib/vinegar/client/movie/review.rb', line 48

def top_critic_movie_reviews(movie_id, country = "us", per_page = "", page = "", options = {})
  options.merge!(
    :review_type  => :top_critic,
    :country      => country,
    :page_limit   => per_page,
    :page         => page
  )
  reviews(movie_id, options)
end