Project

callsign

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Provides a simple Ruby interface to the callook.info API by Joshua Dick, W1JDD.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
>= 0
 Project Readme

Callsign Gem

Build Status

This gem accesses the Callook.info API, made by Joshua Dick, W1JDD.

The original version of this gem was one of my (N8SQL) first Ruby projects. It wasn't great, and with version 2.x I hope to change that.

How to use

Invalid callsigns, or attempts to use callsign when callook.info is down for its daily update will result in an exception being thrown. You should catch these if you need to handle it gracefully.

They are called InvalidCallsignException and CallookUpdateException respectively.

>> require 'rubygems'
>> require 'callsign'

>> me = Callsign.search 'n8sql'
=> #<Hashie::Mash address=#<Hashie::Mash attn="" line1="410 HERMS CT APT 14" line2="BARBERTON, OH 44203"> current=#<Hashie::Mash callsign="N8SQL" operClass="GENERAL"> location=#<Hashie::Mash gridsquare="EN90ex" latitude="40.999965" longitude="-81.589174" quality="87"> name="RICHARD B ELROD" otherInfo=#<Hashie::Mash expiryDate="10/30/2020" frn="0011477486" grantDate="10/30/2010" lastActionDate="11/17/2011" ulsUrl="http://wireless2.fcc.gov/UlsApp/UlsSearch/license.jsp?licKey=3237962"> previous=#<Hashie::Mash callsign="KB3LLM" operClass="TECHNICIAN"> status="VALID" trustee=#<Hashie::Mash callsign="" name=""> type="PERSON">

>> me.name
=> "RICHARD B ELROD" 

>> me.current.callsign
=> "N8SQL"

>> invalid = Callsign.search 'ZZ2YYY'
InvalidCallsignException: Invalid callsign

Contributing, Licensing, etc.

I gladly accept contributions to this project. I would be even more thrilled if they included tests to go along with them. The project is released under the MIT license. Information about the Callook API can be found at http://callook.info/api_reference.php.