Skip to content

ninnemana/API

 
 

Repository files navigation

CURT API v3 - Code Freeze


The new version of the CURT API used the GoEngine Boilerplate for being Content-Type agnostic to XML and JSON. Some of the best features are listed below:


Endpoints


Our API Reference can be found in the Docs folder. Below you can see a summary of our most commonly used APIs.

Note: this application is still in heavy development and all endpoints/objects have the potential to change at any time.

You can view example endpoints for all of the routes in the index_test.go file.

Vehicle


https://github.com/curt-labs/API/blob/goapi/docs/Vehicle.md


Parts


*Get Part by Part #

GET - http://goapi.curtmfg.com/part/110003?key=[public api key]

*Reverse Lookup by Part #

GET - http://goapi.curtmfg.com/part/110003/vehicles?key=[public api key]

Categories


https://github.com/curt-labs/API/blob/master/docs/Categories.md


Customer


Authentication

POST - http://goapi.curtmfg.com/customer/auth

Payload
--------------------------
email: user@example.com
password: password

The following GET route for the customer user authentication is only useful if in the last 6 hours this user has logged in through the POST directive of the /customer/auth endpoint.

GET - http://goapi.curtmfg.com/customer/auth?key=c8bd5d89-8d16-11e2-801f-00155d47bb0a

Customer Locations

POST - http://goapi.curtmfg.com/customer/locations

Payload
--------------------------
key: CEB28F99-F03A-4568-B004-E4FFA87CBDF1

Customer Users

POST - http://goapi.curtmfg.com/customer/users

Payload
--------------------------
key: CEB28F99-F03A-4568-B004-E4FFA87CBDF1

The customer users endpoint will only return data if the requesting user is marked as sudo user

Philoshopy

This version if the API is meant to focus on data quantity while maintaining, if not improving performance, by leveraging concurrency. We would like the client to have the ability to make fewer requests to the API Server and be provided with a larger amount of data in the response.

Local Development

Directions for setting up a local development environment can be found in DEVELOPER.md.

Testing

The project uses GoConvey as a testing framework. Follow the install directions from the GitHub repo and make sure you have$GOPATH/bin in your $PATH. Then go to the directory you want to test and run goconvey

Example

~/workspace/gocode/src/github.com/curt-labs/API $ cd models/products/
~/workspace/gocode/src/github.com/curt-labs/API/models/products $ goconvey

Deployment

Deployment will be done using the master branch on Github. Once a commit is pushed to Github it will route that commit to Drone.io, which will then running CI testing across the project and then deploy new Docker containers to all CURT servers.

Contributors

License

MIT

Free-ish software? Open, we'll call it open software. Oh and 🍻

About

Version 3 of the public API. 🌐

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%