Skip to content

Commit

Permalink
Merge pull request #13 from Lugdunum3D/restify-api
Browse files Browse the repository at this point in the history
Restify API
  • Loading branch information
Sumenia authored Aug 9, 2017
2 parents d2b807c + 79d76af commit b15997b
Show file tree
Hide file tree
Showing 53 changed files with 8,663 additions and 4,019 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org

root = true

[*.js]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"rules": {
"semi": ["error", "never"],
"indent": ["error", 4],
"linebreak-style": ["error", "unix"],
"comma-dangle": ["error", "always-multiline"],
"quotes": ["error", "single"],
"camelcase": ["error", {"properties": "always"}],
"max-len": ["error", 140],
"strict": ["error", "global"]
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ jspm_packages

# Optional REPL history
.node_repl_history
.vs/LugBench-API/v15/.suo
.vs/ProjectSettings.json
.vs/slnx.sqlite
2 changes: 0 additions & 2 deletions .jshintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .jshintrc

This file was deleted.

27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# LugBench-API

## Table of contents
- [Continuous integration](#continuous-integration)
- [Prerequisites](#prerequisites)
- [Clone the repository](#clone-the-repository)
- [Installation](#installation)
- [Run the API](#run-the-api)
- [Routes](#routes)

# Continuous integration

### restify-api
[![CircleCI](https://circleci.com/gh/Lugdunum3D/LugBench-API/tree/restify-api.svg?style=shield)](https://circleci.com/gh/Lugdunum3D/LugBench-API/tree/restify-api)

# Prerequisites

Program | Version
Expand Down Expand Up @@ -45,10 +51,17 @@ export PORT=3000

# Routes

Routes | Description
---------------------------- | -----------
`GET /api/:version/gpus` | Return an array containing all existing gpus
`GET /api/:version/gpus/:id` | Return a specific gpu with a specific id
`PUT /api/:version/gpus` | Add a new gpu

Details for a Gpu can be found [here](./v1/models/gpu.js)
Routes | Description
--------------------- | -----------
`GET /devices` | Return an array containing all existing devices
`GET /devices/:id` | Return a specific device with a specific id
`POST /devices` | Add a new device
`GET /scenarios` | Return an array containing all existing scenarios
`GET /scenarios/:id` | Return a specific scenario with a specific id
`GET /scores` | Return an array containing all existing scores
`GET /scores/:id` | Return a specific score with a specific id
`POST /scores` | Add a new score

Details for a device can be found [here](./models/device.js)
Details for a scenario can be found [here](./models/scenario.js)
Details for a score can be found [here](./models/score.js)
Loading

0 comments on commit b15997b

Please sign in to comment.