Module: Shazamio::Converter

Defined in:
lib/shazamio/converter.rb

Class Method Summary collapse

Class Method Details

.data_search(timezone, uri, samplems, timestamp) ⇒ Object

Builds the JSON payload sent to Shazam's /tag endpoint.



8
9
10
11
12
13
14
15
16
# File 'lib/shazamio/converter.rb', line 8

def data_search(timezone, uri, samplems, timestamp)
  {
    "timezone" => timezone,
    "signature" => { "uri" => uri, "samplems" => samplems },
    "timestamp" => timestamp,
    "context" => {},
    "geolocation" => {}
  }
end