Code Monkey home page Code Monkey logo

arist-deliverability-analytics-api's Introduction

Code Challenge - Deliverablity Analytics API

System Requirements

Setup

git clone https://github.com/acasarsa/arist-deliverability-analytics-api.git
cd arist-deliverability-analytics-api

Once in the directory you can

bundle install
rake db:create
rake db:migrate
rails s

Run Tests

bundle install
rake db:create
RAILS_ENV=test rake db:migrate
rspec

Test Endpoints with Postman

Run in Postman

Postman Collection Docs for this API

In order to test my endpoints I aded an index action for the /devices route. This where you will be able to see all the changes you make by using the API!

The /devices route is especially important for the Postman testing because that's where you'll need to look to get the device_id for your other requests. I ordered the routes in the collection so they can be performed in order without running into an error even if you use the same uuid.

NOTE that the terminate route will disable a device. Any requests made with a disabled device will result in an error (this is intended). I created a to_disabled_device request for the /alive and /report endpoints which should be used for testing requests sent from disabled devices.

For /alive and /reports routes copy the id's uuid value sans quotes from the /devices route (make sure it's not disabled!) and paste it into the query parmas value for device_id. You'll see a big INSERT DEVICE ID HERE so you will know you're in the right place.

For those not familiar with uuid's it will look like something like this id: 5c4b60ad-f00d-4f89-9725-be16f84ecb9f

You will do the same for the /terminate PATCH, but I would recommend using a different device_id to avoid any confusion with repeated testing.

arist-deliverability-analytics-api's People

Contributors

acasarsa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.