class DX::Lookup::QRZ::Callsign

Public Class Methods

from_response(xml) click to toggle source
# File lib/dx/lookup/qrz/callsign.rb, line 42
def self.from_response(xml)
  Callsign.new(
    :callsign => xml['call'],
    :aliases => xml['aliases'].to_s.split(','),
    :dxcc => xml['dxcc'],
    :first_name => xml['fname'],
    :last_name => xml['name'],
    :address_1 => xml['addr1'],
    :address_2 => xml['addr2'],
    :address_state => xml['state'],
    :address_zip => xml['zip'],
    :address_country => xml['country'],
    :address_dxcc => xml['ccode'],
    :coordinate => [xml['lat'], xml['lon']],
    :grid => xml['grid'],
    :county => xml['county'],
    :dxcc_name => xml['land'],
    :effective_date => xml['efdate'],
    :expiration_date => xml['expdate'],
    :fips => xml['fips'],
    :previous_callsign => xml['p_call'],
    :license_class => xml['class'],
    :license_codes => xml['codes'],
    :qsl_info => xml['qslmgr'],
    :email => xml['email'],
    :url => xml['url'],
    :profile_views => xml['u_views'],
    :eqsl_accepted => xml['eqsl'],
    :qsl_accepted => xml['mqsl'],
    :cq_zone => xml['cqzone'],
    :itu_zone => xml['ituzone'],
    :birth_year => xml['born'],
    :qrz_admin => xml['user'],
    :lotw_accepted => xml['lotw'],
    :iota => xml['iota'],
    :geo_source => xml['geoloc']
  )
end