Skip to content

Commit 5504d6f

Browse files
committed
Cleanup and added OAuth2 documentation
1 parent fb7fc95 commit 5504d6f

15 files changed

+997
-796
lines changed

.vscode/settings.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"markdownlint.config": {
3+
"no-inline-html": {
4+
"allowed_elements": [
5+
"aside",
6+
"b",
7+
"br",
8+
"span",
9+
"code",
10+
"ul",
11+
"ol",
12+
"li",
13+
],
14+
},
15+
"link-fragments": false,
16+
"no-duplicate-heading": false,
17+
"single-h1": false,
18+
}
19+
}

docker-compose.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
slate-dev:
3+
image: slatedocs/slate:latest
4+
ports:
5+
- 127.0.0.1:4567:4567
6+
volumes:
7+
- ./source:/srv/slate/source:ro
8+
command: serve

source/includes/_account.md

+99-95
Large diffs are not rendered by default.

source/includes/_errors.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
The SimplyPrint API uses the following HTTP error codes:
44

5-
Error Code | Meaning
6-
---------- | -------
7-
400 | Bad Request -- Your request is invalid.
8-
401 | Unauthorized -- Your API key is wrong.
9-
403 | Forbidden -- Request not allowed.
10-
404 | Not Found -- Endpoint not found.
11-
405 | Method Not Allowed -- You tried to access an endpoint with an invalid method.
12-
406 | Not Acceptable -- You requested a format that isn't json.
13-
410 | Gone -- The endpoint requested has been removed from our servers.
14-
429 | Too Many Requests -- You're requesting too much - slow down
15-
500 | Internal Server Error -- We had a problem with our server. Try again later.
16-
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
5+
| Error Code | Meaning |
6+
| ---------- | ----------------------------------------------------------------------------------------- |
7+
| 400 | Bad Request -- Your request is invalid. |
8+
| 401 | Unauthorized -- Your API key is wrong. |
9+
| 403 | Forbidden -- Request not allowed. |
10+
| 404 | Not Found -- Endpoint not found. |
11+
| 405 | Method Not Allowed -- You tried to access an endpoint with an invalid method. |
12+
| 406 | Not Acceptable -- You requested a format that isn't json. |
13+
| 410 | Gone -- The endpoint requested has been removed from our servers. |
14+
| 429 | Too Many Requests -- You're requesting too much - slow down |
15+
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
16+
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
1717

1818
## Error Response
1919

@@ -28,7 +28,7 @@ Error Code | Meaning
2828

2929
When an error occurs, the API will return a JSON object with the following fields:
3030

31-
Field | Description | Type
32-
----- | ----------- | ----
33-
status | The status of the request | Boolean
34-
message | A message describing the error | String|null
31+
| Field | Description | Type |
32+
| ------- | ------------------------------ | ----------- |
33+
| status | The status of the request | Boolean |
34+
| message | A message describing the error | String/null |

source/includes/_filament.md

+108-108
Large diffs are not rendered by default.

source/includes/_files.md

+47-47
Original file line numberDiff line numberDiff line change
@@ -139,25 +139,25 @@ This endpoint returns a list of files and folders in a given folder. If no folde
139139

140140
`GET /{id}/files/GetFiles`
141141

142-
| Parameter | Type | Required | Description |
143-
| --------- | ---- | -------- | ----------- |
144-
| `f` | integer | no | Folder ID to get files for. **Defaults to 0 (root folder)** |
145-
| `search` | string | no | Search string to filter files by. |
146-
| `global_search` | boolean | no | If true, search all files in the account, not just the folder specified by `f`. |
147-
| `pid` | integer | no | For print cost calculation, if you want the files to use the material of a printer, request with the ID of the printer - don't include the `pid` argument otherwise |
142+
| Parameter | Type | Required | Description |
143+
| --------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
144+
| `f` | integer | no | Folder ID to get files for. **Defaults to 0 (root folder)** |
145+
| `search` | string | no | Search string to filter files by. |
146+
| `global_search` | boolean | no | If true, search all files in the account, not just the folder specified by `f`. |
147+
| `pid` | integer | no | For print cost calculation, if you want the files to use the material of a printer, request with the ID of the printer - don't include the `pid` argument otherwise |
148148

149149
### Response
150150

151-
| Parameter | Type | Description |
152-
| --------- | ---- | ----------- |
153-
| `status` | boolean | True if the request was successful. |
154-
| `message` | string | Error message if `status` is false. |
155-
| `files` | array | Array of file objects. |
156-
| `folders` | array | Array of folder objects. |
157-
| `path` | array | Array of arrays containing the path to the current folder. |
158-
| `sort_type` | string | Sort type from user's settings. |
159-
| `space` | integer | The total space available in bytes. |
160-
| `space_used` | integer | The total space used in bytes. |
151+
| Parameter | Type | Description |
152+
| ------------ | ------- | ---------------------------------------------------------- |
153+
| `status` | boolean | True if the request was successful. |
154+
| `message` | string | Error message if `status` is false. |
155+
| `files` | array | Array of file objects. |
156+
| `folders` | array | Array of folder objects. |
157+
| `path` | array | Array of arrays containing the path to the current folder. |
158+
| `sort_type` | string | Sort type from user's settings. |
159+
| `space` | integer | The total space available in bytes. |
160+
| `space_used` | integer | The total space used in bytes. |
161161

162162
## Move File(s) to Folder
163163

@@ -182,17 +182,17 @@ This endpoint moves one or more files to a given folder.
182182

183183
`GET /{id}/files/MoveFiles`
184184

185-
| Parameter | Type | Required | Description |
186-
| --------- | ---- | -------- | ----------- |
187-
| `files` | array | yes | Array of file IDs to move. Separate multiple IDs with a comma. |
188-
| `folder` | integer | yes | Folder ID to move files to. |
185+
| Parameter | Type | Required | Description |
186+
| --------- | ------- | -------- | -------------------------------------------------------------- |
187+
| `files` | array | yes | Array of file IDs to move. Separate multiple IDs with a comma. |
188+
| `folder` | integer | yes | Folder ID to move files to. |
189189

190190
### Response
191191

192-
| Parameter | Type | Description |
193-
| --------- | ---- | ----------- |
194-
| `status` | boolean | True if the request was successful. |
195-
| `message` | string | Success message or error message if `status` is false. |
192+
| Parameter | Type | Description |
193+
| --------- | ------- | ------------------------------------------------------ |
194+
| `status` | boolean | True if the request was successful. |
195+
| `message` | string | Success message or error message if `status` is false. |
196196

197197
## Get Folder Details
198198

@@ -234,24 +234,24 @@ This endpoint returns details about a given folder.
234234

235235
`GET /{id}/files/GetFolder`
236236

237-
| Parameter | Type | Required | Description |
238-
| --------- | ---- | -------- | ----------- |
239-
| `id` | integer | yes | Folder ID to get details for. |
237+
| Parameter | Type | Required | Description |
238+
| --------- | ------- | -------- | ----------------------------- |
239+
| `id` | integer | yes | Folder ID to get details for. |
240240

241241
### Response
242242

243-
| Parameter | Type | Description |
244-
| --------- | ---- | ----------- |
245-
| `status` | boolean | True if the request was successful. |
246-
| `message` | string | Error message if `status` is false. |
247-
| `folder` | object | Folder object. |
248-
| `folder.id` | integer | Folder ID. |
249-
| `folder.name` | string | Folder name. |
250-
| `folder.org` | boolean | True if the folder is an organization folder.<br>**Requires Print Farm plan** |
251-
| `folder.permissions` | object|null | Folder permissions. |
252-
| `folder.permissions.view` | array | Array of [group IDs](#get-company-groups) that can view the folder. |
253-
| `folder.permissions.upload` | array | Array of [group IDs](#get-company-groups) that can upload files to the folder. |
254-
| `folder.permissions.modify` | array | Array of [group IDs](#get-company-groups) that can modify the folder. |
243+
| Parameter | Type | Description |
244+
| --------------------------- | ----------- | ------------------------------------------------------------------------------ |
245+
| `status` | boolean | True if the request was successful. |
246+
| `message` | string | Error message if `status` is false. |
247+
| `folder` | object | Folder object. |
248+
| `folder.id` | integer | Folder ID. |
249+
| `folder.name` | string | Folder name. |
250+
| `folder.org` | boolean | True if the folder is an organization folder.<br>**Requires Print Farm plan** |
251+
| `folder.permissions` | object/null | Folder permissions. |
252+
| `folder.permissions.view` | array | Array of [group IDs](#get-company-groups) that can view the folder. |
253+
| `folder.permissions.upload` | array | Array of [group IDs](#get-company-groups) that can upload files to the folder. |
254+
| `folder.permissions.modify` | array | Array of [group IDs](#get-company-groups) that can modify the folder. |
255255

256256
## Move Folder
257257

@@ -279,14 +279,14 @@ Also, folders cannot be moved into themselves.
279279

280280
`GET /{id}/files/MoveFolder`
281281

282-
| Parameter | Type | Required | Description |
283-
| --------- | ---- | -------- | ----------- |
284-
| `folder` | integer | yes | Folder ID to move. |
285-
| `target` | integer | yes | Folder ID to move to. |
282+
| Parameter | Type | Required | Description |
283+
| --------- | ------- | -------- | --------------------- |
284+
| `folder` | integer | yes | Folder ID to move. |
285+
| `target` | integer | yes | Folder ID to move to. |
286286

287287
### Response
288288

289-
| Parameter | Type | Description |
290-
| --------- | ---- | ----------- |
291-
| `status` | boolean | True if the request was successful. |
292-
| `message` | string | Success message or error message if `status` is false. |
289+
| Parameter | Type | Description |
290+
| --------- | ------- | ------------------------------------------------------ |
291+
| `status` | boolean | True if the request was successful. |
292+
| `message` | string | Success message or error message if `status` is false. |

0 commit comments

Comments
 (0)