Skip to content

Commit c04ecbb

Browse files
author
Exybore
committed
Added : Arduino projects endpoint
1 parent ab6f994 commit c04ecbb

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 🕓 Change log
22

3+
## Added : Arduino projects endpoint
4+
5+
**April 9, 2019 :** The API now includes the future Arduino projects hub. [Details](resources/Arduino.md)
6+
37
## Changed : Optional fields
48

59
**April 9, 2019 :** All the fields in some PATCH requests are now optional, meaning that you can only include fields that you're going to edit.
@@ -14,7 +18,7 @@
1418

1519
## Added : Get user's permissions
1620

17-
**January 5, 2018 :** getting user's permissions is now in `/users/{username/permissions` and requires `USER_WRITE` permission. [Details](users/Endpoint.md#get-users-permissions)
21+
**January 5, 2018 :** getting user's permissions is now in `/users/{username/permissions` and requires `USER_WRITE` permission. [Details](resources/User.md#get-users-permissions)
1822

1923
**Affecting :** [Get user](resources/User.md#get-user)
2024

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Every response is in JSON format, and has in its body a `code` which is `1` or `
1818
- **Resources**
1919
- [Post](resources/Post.md)
2020
- [User](resources/User.md)
21+
- [Arduino](resources/Arduino.md)

resources/Arduino.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# 🔌 Arduino resource
2+
3+
All the Arduino projects from the [projects hub](https://arduino.becauseofprog.fr) are in this endpoint.
4+
5+
### Arduino project object
6+
7+
| Field | Type | Description | Can be null ? |
8+
| ------------- | ---------------------------------- | ---------------------------------- | ------------- |
9+
| url | string | project's URL | |
10+
| author | [user object](User.md#user-object) | project's author | |
11+
| name | string | project's name | |
12+
| summary | string | project's summary | |
13+
| illustration | string | picture to illustrate project ||
14+
| video | string | video to illustrate project ||
15+
| link | string | link to further informations ||
16+
| description | string | project's description ||
17+
| timestamp | int | unix timestamp, project's creation | |
18+
| is_from_staff | boolean | if the project is from the staff | |
19+
| is_featured | boolean | if the project is featured | |
20+
21+
## Get all projects
22+
23+
`GET /arduino-projects`
24+
25+
Get all the projects. Returns a `data` list with [arduino project objects](#arduino-project-object) inside.
26+
27+
## Create project
28+
29+
`POST /arduino-projects`
30+
31+
Create a new Arduino project. Requires auth.
32+
33+
### Required data
34+
35+
| Field | Type | Description |
36+
| ------- | ------ | ----------------- |
37+
| url | string | project's URL |
38+
| name | string | project's name |
39+
| summary | string | project's summary |
40+
41+
### Optional data
42+
43+
| Field | Type | Description |
44+
| ------------ | ------ | ----------------------------- |
45+
| illustration | string | picture to illustrate project |
46+
| video | string | video to illustrate project |
47+
| link | string | link to further informations |
48+
| description | string | project's description |
49+
50+
## Get project
51+
52+
`GET /arduino-projects/{arduino-project.url}`
53+
54+
Get one project by its URL. Returns a [arduino project object](#arduino-project-object) called `data`.
55+
56+
## Edit project
57+
58+
`PATCH /arduino-projects/{arduino-project.url}`
59+
60+
Edit a prokect. Requires auth and to be the project's author.
61+
62+
**Editable fields :** `name`, `summary`, `illustration`, `video`, `link`, `description`.
63+
64+
## Delete project
65+
66+
`DELETE /arduino-projects/{arduino-project.url}`
67+
68+
Delete a project. Requires auth and to be the project's author.

0 commit comments

Comments
 (0)