Method: ACTV::Client#find_asset_by_url

Defined in:
lib/actv/client.rb

#find_asset_by_url(url) ⇒ ACTV::Asset

Returns an asset with the specified url path

Examples:

ACTV.asset_by_path("http://www.active.com/miami-fl/running/miami-marathon-and-half-marathon-2014")

Parameters:

  • path (String)

Returns:



119
120
121
122
123
124
# File 'lib/actv/client.rb', line 119

def find_asset_by_url(url)
  url_md5 = Digest::MD5.hexdigest(url)
  response = get("/v2/seourls/#{url_md5}?load_asset=true")

  ACTV::Asset.from_response(response)
end