0.0
No commit activity in last 3 years
No release in over 3 years
Ruby Client to interact with CBSA api as described on PeerStreet take home assignment.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 0

Runtime

>= 0
 Project Readme

PeerStreet Population Estimate Ruby Client

This is gem is built as Ruby client to access to the endpoint:
https://pstreet-api.herokuapp.com/api/v1/cbsa/find?cbsa_ids[]=15540&cbsa_ids[]=11260&zip_codes[]=79607

Other Repositories:

Installation

  1. Rails App

Add the following line to Gemfile

gem 'ps_pop_client'

Execute 'bundle'

bundle install
  1. Cli
gem install 'ps_pop_client'

Usage

Send Request

step 1.
 required 'ps_pop_client'
step 2.
# request params
params = {:cbsa_ids => [11260,3232],
           :zip_codes => [79607, 90254],
           :name => "South Bay"
          }
## 1. default endpoint is "https://pstreet-api.herokuapp.com"
PSClient::Api.new.find(params)

## 2. include your own endpoint:
PSClient::Api.new({:base_uri => "https://myown-api.com"}).find(params)
Params Fields Definition
Items Description Type
cbsa_ids CBSA Codes Array
zip_codes Zip Codes Array
name MSA Name String

Run Rspec

rspec