class UnderFire::Registration

Register an application using client_id (only needs to be done once per application).

@see developer.gracenote.com/sites/default/files/web/html/index.html#Music%20Web%20API/Registration%20and%20Authentication.html#_Toc344907213

Attributes

client_id[R]

@return [String] Gracenote Client ID

query[R]

@return [String] XML string for query

Public Class Methods

new(client_id) click to toggle source

@param [String] client_id Gracenote Client ID.

# File lib/under_fire/registration.rb, line 16
def initialize(client_id)
  @client_id = client_id
  @query = build_query
end

Public Instance Methods

build_query() click to toggle source

Builds XML for REGISTRATION query.

@return [String] XML string for REGISTRATION

# File lib/under_fire/registration.rb, line 24
def build_query
  builder = Builder::XmlMarkup.new
  xml = builder.QUERIES {
    builder.QUERY(CMD: 'REGISTER'){
    builder.CLIENT client_id
    }
  }
  xml
end