Skip to content

sapien-pixel/Address-Directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Address Directory

This assignment contains RESTful APIs in Golang with the basic CRUD operations. It is a address directory where you can add, update, get and delete the address.

The webservice fetches the co-ordinates data from Google Maps API and saves to the Mongo Labs.

Following are the sample Request and Responses:

POST: /locations/ Request:

{ "name" : "John Smith", "address" : "123 Main St", "city" : "San Francisco", "state" : "CA", "zip" : "94113" }

Response: { "id" : 12345, "name" : "John Smith", "address" : "123 Main St", "city" : "San Francisco", "state" : "CA", "zip" : "94113", "coordinate" : { "lat" : 38.4220352, "lng" : -222.0841244 } }

Get: /locations/{location_id} Response: { "id" : 12345, "name" : "John Smith", "address" : "123 Main St", "city" : "San Francisco", "state" : "CA", "zip" : "94113", "coordinate" : { "lat" : 38.4220352, "lng" : -222.0841244 } }

Update: /locations/{location_id} Request: { "address" : "1600 Amphitheatre Parkway", "city" : "Mountain View", "state" : "CA", "zip" : "94043" }

Response: { "id" : 12345, "name" : "John Smith", "address" : "1600 Amphitheatre Parkway", "city" : "Mountain View", "state" : "CA", "zip" : "94043" "coordinate" : { "lat" : 37.4220352, "lng" : -122.0841244 } }

Delete: /locations/{location_id}

About

Address directory where you can add, update, get and delete the address

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages