Build Status

Table of Contents
  1. About The Project
  2. Getting Started
  3. ReST Endpoints

About The Project

This repository serves as a microservice to digest the zipcodebase api endpoints.

Built With

Getting Started

  1. Clone this repo
  2. Install gem packages: bundle install
  3. Local development needs an API key https://app.zipcodebase.com/register?plan=free
  4. Create .env under /app
ZIPCODEBASE_APIKEY = 'your token'
  1. Start sinatra server
 $rackup or shotgun
 "rackup or shotgun will let you know which localhost port to navigate to"

Prerequisites

  • Ruby 2.5.3
  • Rails 5.2.5
ReST Endpoints

Get Distance

  • Returns distance between two zipcodes

Required Parameters: :code :compare

GET /distance/:code/:compare

Get Radius

  • Returns all zipcodes within a given radius

Required Parameters: :original_code :valid_code

GET /distance/:original_code/:valid_code