lib/videoeta/client.rb
# Returns a list of upcoming titles in the given +month+ and +year+.
#
# @param month [Integer] the month to get releases for (can range from 1-12)
# @param year [Integer] the year to get releases for
#
# @note The data for the requested +year+ might not be available.
# @return [Array<Hash>] list of upcoming titles

Returns a list of upcoming titles in the given +month+ and +year+.
Returns a list of upcoming titles in the given + month + and + year + .
def bluray_releases_for_month(month, year = Time.now.year)
      authenticate unless @authenticated
      days_in_month = Date.new(year, month, -1).day
      params = {
        'blurayf[]' => 1,
        'keywords' => '*',
        'datetype' => 'bdreleases',
        'search_type' => 'daterange',
        'start_date' => "#{month}/01/#{year}",
        'end_date' => "#{month}/#{days_in_month}/#{year}",
        'ord_by' => 'box_office',
        'ord_sort' => 'desc',
      }
      page = @agent.get("/search.csv", params)
      results = []
      page.body.encode!('utf-8', 'iso-8859-1')
      CSV.parse(page.body, headers: true) do |row|
        result = format_hash_row!(row.to_hash)
        results << result
      end
      results
    end
def bluray_releases_for_month ( month , year = Time . now . year ) authenticate unless @authenticated days_in_month = Date . new ( year , month , - 1 ) . day params = { 'blurayf[]' => 1 , 'keywords' => '*' , 'datetype' => 'bdreleases' , 'search_type' => 'daterange' , 'start_date' => "#{month}/01/#{year}" , 'end_date' => "#{month}/#{days_in_month}/#{year}" , 'ord_by' => 'box_office' , 'ord_sort' => 'desc' , } page = @agent . get ( "/search.csv" , params ) results = [ ] page . body . encode! ( 'utf-8' , 'iso-8859-1' ) CSV . parse ( page . body , headers : true ) do | row | result = format_hash_row! ( row . to_hash ) results << result end results end
Returns a list of upcoming titles in the given +month+ and +year+.
Returns a list of upcoming titles in the given + month + and + year + .
# The CSV file is encoded as ISO-8559-1. Transcode it to UTF-8.

list of upcoming titles
list of upcoming titles
Array<Hash>
month
the month to get releases for (can range from 1-12)
the month to get releases for ( can range from 1 - 12 )
year
the year to get releases for
the year to get releases for
now
<not_specific>
note
The data for the requested +year+ might not be available.
The data for the requested + year + might not be available .