geoffkip / philagov

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Phila address lookup
Calls philly api concurrently to get address details

#To run

go build

The runtime file (philagov) expects a file "address.in.txt" that contains address and unit number separated by comma.
It calls the api concurrently for each line in address.in.txt.
The response for each API call for each address is logged in address.out.txt

As the json response comes back it is parsed into a struct which is printed to the command line.

If you want to build a OS specific runtime you can us GOOS env variable (https://golang.org/cmd/go/)

#Output

Output for test data in address.in.txt

./philagov
line -  0
Feed URL -  https://api.phila.gov/ais_ps/v1/addresses/1500 market street?include_units=42&opa_only=
[{{1500 MARKET ST  883320000}} {{1500S MARKET ST  875100060}}]
line -  1
Feed URL -  https://api.phila.gov/ais_ps/v1/addresses/1600 market street?include_units=44&opa_only=
[{{1600 MARKET ST  883031500}} {{1600R MARKET ST  883031500}}]
line -  2
Feed URL -  https://api.phila.gov/ais_ps/v1/addresses/1700 market street?include_units=45&opa_only=
[{{1700 MARKET ST  883032000}}]

About


Languages

Language:Go 100.0%