lib/film_on/services/video_on_demand.rb
# convert_vod_search: takes the raw JSON
# and coverts it into an object, which includes
# the total, total_found and a nice array of movies as ruby objects
# normally for use after storing the JSON in a caching mechanism
#
takes the raw JSON
and coverts it into an object, which includes
the total, total_found and a nice array of movies as ruby objects
normally for use after storing the JSON in a caching mechanism
takes the raw JSON and coverts it into an object which includes the total total_found and a nice array of movies as ruby objects normally for use after storing the JSON in a caching mechanism
def convert_vod_search(json)
        hash = JSON.parse(json)
        VodSearchResult.new(
           hash["total"],
           hash["total_found"],
           hash["response"].map{|movie| FilmOn::Movie.new(movie) }
        )
      end
def convert_vod_search ( json ) hash = JSON . parse ( json ) VodSearchResult . new ( hash [ "total" ] , hash [ "total_found" ] , hash [ "response" ] . map { | movie | FilmOn :: Movie . new ( movie ) } ) end
convert_vod_search: takes the raw JSON
and coverts it into an object, which includes
the total, total_found and a nice array of movies as ruby objects
normally for use after storing the JSON in a caching mechanism
convert_vod_search : takes the raw JSON and coverts it into an object which includes the total total_found and a nice array of movies as ruby objects normally for use after storing the JSON in a caching mechanism
json
<not_specific>