42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# 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
|