Skip to content

Commit 215aba8

Browse files
committed
Update docs
1 parent a271156 commit 215aba8

25 files changed

+9027
-238
lines changed

.scribe/.filehashes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
2+
# Scribe uses this file to know when you change something manually in your docs.
3+
.scribe/intro.md=c8cb5fa262a4e2884e5c37d0ebead040
4+
.scribe/auth.md=6470d4e160c3f81e40dae7d54d9d09c4

.scribe/auth.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Authenticating requests
2+
3+
Authenticate requests to this API's endpoints by sending an **`Authorization`** header with the value **`"Bearer {YOUR_AUTH_KEY}"`**.
4+
5+
All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.
6+
7+
You can retrieve your token by using the `users/auth` endpoint.

.scribe/endpoints.cache/1.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## Autogenerated by Scribe. DO NOT MODIFY.
2+
3+
name: General
4+
description: ''
5+
endpoints:
6+
-
7+
httpMethods:
8+
- GET
9+
uri: api/healthcheck
10+
metadata:
11+
title: Healthcheck
12+
description: |-
13+
Check that the service is up. If everything is okay, you'll get a 200 OK response.
14+
15+
Otherwise, the request will fail with a 400 error, and a response listing the failed services.
16+
authenticated: false
17+
headers:
18+
Content-Type: application/json
19+
Accept: application/json
20+
urlParameters: []
21+
queryParameters: []
22+
bodyParameters: []
23+
responses:
24+
-
25+
status: 200
26+
content: '{"status":"up","services":{"database":"up","redis":"up"}}'
27+
headers:
28+
cache-control: 'no-cache, private'
29+
content-type: application/json
30+
x-ratelimit-limit: '60'
31+
x-ratelimit-remaining: '56'
32+
access-control-allow-origin: '*'
33+
description: null
34+
-
35+
status: 400
36+
content: '{"status": "down", "services": {"database": "up", "redis": "down"}}'
37+
headers: []
38+
description: '400, Service is unhealthy'
39+
responseFields:
40+
status:
41+
name: status
42+
description: 'The status of this API (`up` or `down`).'
43+
type: string
44+
services:
45+
name: services
46+
description: 'Map of each downstream service and their status (`up` or `down`).'
47+
type: object

.scribe/endpoints.cache/2.yaml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
## Autogenerated by Scribe. DO NOT MODIFY.
2+
3+
name: 'Side Projects'
4+
description: ''
5+
endpoints:
6+
-
7+
httpMethods:
8+
- GET
9+
uri: api/side_projects
10+
metadata:
11+
title: 'View all side projects'
12+
description: |-
13+
This endpoint's response was gotten via a "response call"—
14+
Scribe called our API in a test environment to get a sample response.
15+
authenticated: false
16+
headers:
17+
Content-Type: application/json
18+
Accept: application/json
19+
urlParameters: []
20+
queryParameters: []
21+
bodyParameters: []
22+
responses:
23+
-
24+
status: 200
25+
content: '[{"id":1,"name":"voluptas assumenda maiores","description":"Consequuntur aut ea est non.","url":null,"due_at":"20310222","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"2"},{"id":2,"name":"iusto ut dolor","description":"Voluptatem aspernatur dolorem quae quaerat harum.","url":null,"due_at":"20301215","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"1"},{"id":3,"name":"provident et consequatur","description":"Quos et ipsum cum pariatur ex perspiciatis eius.","url":null,"due_at":"20231022","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"3"},{"id":4,"name":"corporis consequuntur amet","description":"Dolores eveniet deleniti voluptatem saepe expedita.","url":null,"due_at":"20230712","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"1"},{"id":5,"name":"optio excepturi ea","description":"Error deleniti sint a nostrum consequuntur et.","url":null,"due_at":"20260324","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"4"},{"id":6,"name":"nihil voluptate quaerat","description":"Animi reprehenderit soluta id quo.","url":null,"due_at":"20290603","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"1"},{"id":7,"name":"aspernatur architecto assumenda","description":"Nisi ea aut vel sint vero voluptas tempore.","url":null,"due_at":"20280710","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"5"},{"id":8,"name":"vel perspiciatis quo","description":"Et qui praesentium consequatur distinctio natus.","url":null,"due_at":"20210605","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"},{"id":9,"name":"qui et totam","description":"Veritatis quo dolorum soluta ut.","url":null,"due_at":"20270203","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"}]'
26+
headers:
27+
cache-control: 'no-cache, private'
28+
content-type: application/json
29+
x-ratelimit-limit: '60'
30+
x-ratelimit-remaining: '54'
31+
access-control-allow-origin: '*'
32+
description: null
33+
responseFields: []
34+
-
35+
httpMethods:
36+
- POST
37+
uri: api/side_projects
38+
metadata:
39+
title: 'Start a new side project'
40+
description: |-
41+
_Even though we both know you'll never finish it._
42+
43+
This endpoint's body parameters were automatically generated by Scribe
44+
from the controller's code. Check out the source! </aside>
45+
authenticated: true
46+
headers:
47+
Authorization: 'Bearer {YOUR_AUTH_KEY}'
48+
Content-Type: application/json
49+
Accept: application/json
50+
urlParameters: []
51+
queryParameters: []
52+
bodyParameters:
53+
name:
54+
name: name
55+
description: 'The name of your side project. Must not be greater than 80 characters.'
56+
required: true
57+
example: 'The SideProject API'
58+
type: string
59+
description:
60+
name: description
61+
description: 'A longer description of your side project. Must not be greater than 255 characters.'
62+
required: false
63+
example: ovsnvfcwodowljclfphodypoplikvyotjovrjudbmxqvvdlccjyfgdivsjtacjokurmwmxjffismejdaobevyfcbyleqjgqcoefmvdnrazszstfwulwyendppvmxeocdljwpxkslcereqwua
64+
type: string
65+
url:
66+
name: url
67+
description: 'A url to your side project. Must be a valid URL.'
68+
required: false
69+
example: 'http://www.smitham.info/consequatur-tempora-aspernatur-officiis-omnis-sed-similique.html'
70+
type: string
71+
due_at:
72+
name: due_at
73+
description: 'Due date for the side project. Must be a valid date. Must be a valid date in the format <code>Ymd</code>. Must be a date after <code>today</code>.'
74+
required: false
75+
example: '2077-10-19'
76+
type: string
77+
responses: []
78+
responseFields: []
79+
-
80+
httpMethods:
81+
- GET
82+
uri: 'api/side_projects/{id}'
83+
metadata:
84+
title: 'View a side project'
85+
description: |-
86+
This endpoint's response uses a Fractal transformer, so we tell Scribe that using an annotation,
87+
and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
88+
89+
<aside class="success">Also, pretty cool: this endpoint's (and many others') URL parameters were figured out entirely by Scribe!</aside>
90+
authenticated: false
91+
headers:
92+
Content-Type: application/json
93+
Accept: application/json
94+
urlParameters:
95+
id:
96+
name: id
97+
description: 'The ID of the side project.'
98+
required: true
99+
example: 12
100+
type: integer
101+
queryParameters: []
102+
bodyParameters: []
103+
responses:
104+
-
105+
status: 200
106+
content: '{"data":{"name":"quo quo molestias","description":"Tempora aspernatur officiis omnis sed similique et et.","due_date":"20250122","owner":{"id":1,"name":"Pete","email":"[email protected]","email_verified_at":null,"created_at":"2021-05-29T22:53:05.000000Z","updated_at":"2021-05-29T22:53:05.000000Z"}}}'
107+
headers: []
108+
description: null
109+
responseFields: []
110+
-
111+
httpMethods:
112+
- PUT
113+
- PATCH
114+
uri: 'api/side_projects/{id}'
115+
metadata:
116+
title: 'Update a side project'
117+
description: ''
118+
authenticated: false
119+
headers:
120+
Content-Type: application/json
121+
Accept: application/json
122+
urlParameters:
123+
id:
124+
name: id
125+
description: 'The ID of the side project.'
126+
required: true
127+
example: 12
128+
type: integer
129+
queryParameters: []
130+
bodyParameters: []
131+
responses: []
132+
responseFields: []
133+
-
134+
httpMethods:
135+
- DELETE
136+
uri: 'api/side_projects/{id}'
137+
metadata:
138+
title: 'Delete a side project'
139+
description: ''
140+
authenticated: false
141+
headers:
142+
Content-Type: application/json
143+
Accept: application/json
144+
urlParameters:
145+
id:
146+
name: id
147+
description: 'The ID of the side project.'
148+
required: true
149+
example: 12
150+
type: integer
151+
queryParameters: []
152+
bodyParameters: []
153+
responses: []
154+
responseFields: []

.scribe/endpoints.cache/3.yaml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
## Autogenerated by Scribe. DO NOT MODIFY.
2+
3+
name: Users
4+
description: ''
5+
endpoints:
6+
-
7+
httpMethods:
8+
- POST
9+
uri: api/users
10+
metadata:
11+
title: 'Create a user'
12+
description: 'This endpoint''s body parameters are automatically generated from a FormRequest.'
13+
authenticated: false
14+
headers:
15+
Content-Type: application/json
16+
Accept: application/json
17+
urlParameters: []
18+
queryParameters: []
19+
bodyParameters:
20+
name:
21+
name: name
22+
description: 'Must be at least 1 characters. Must not be greater than 255 characters.'
23+
required: true
24+
example: ovsnvfcwodowljclfphodypoplikvyotjovrjudbmxqvvdlccjyfgdivsjtacjokurmwmxjffismejdaobevyfcbyleqjgqcoefmvdnrazszstfwulwyendppvmxeocdljwpxkslcereqwua
25+
type: string
26+
email:
27+
name: email
28+
description: 'Must be a valid email address.'
29+
required: true
30+
31+
type: string
32+
password:
33+
name: password
34+
description: ''
35+
required: true
36+
example: error
37+
type: string
38+
responses: []
39+
responseFields: []
40+
-
41+
httpMethods:
42+
- GET
43+
uri: 'api/users/{id}'
44+
metadata:
45+
title: 'Fetch a user'
46+
description: |-
47+
This endpoint's response uses an Eloquent API resource, so we tell Scribe that using an annotation,
48+
and it figures out how to generate a sample. The 404 sample is gotten from a "response file".
49+
authenticated: false
50+
headers:
51+
Content-Type: application/json
52+
Accept: application/json
53+
urlParameters:
54+
id:
55+
name: id
56+
description: 'The ID of the user.'
57+
required: true
58+
example: 12
59+
type: integer
60+
queryParameters: []
61+
bodyParameters: []
62+
responses:
63+
-
64+
status: 200
65+
content: '{"data":{"id":6,"name":"Dr. Kallie Schroeder","email":"[email protected]","side_projects":[{"id":10,"name":"similique et et","description":"Odit molestiae non est nostrum sunt.","url":null,"due_at":"20221119","created_at":"2021-06-25T12:19:37.000000Z","updated_at":"2021-06-25T12:19:37.000000Z","user_id":"6"}]}}'
66+
headers: []
67+
description: null
68+
-
69+
status: 404
70+
content: '{"message":"Not found","resource":"user"}'
71+
headers: []
72+
description: '404, User not found'
73+
responseFields: []
74+
-
75+
httpMethods:
76+
- GET
77+
uri: api/users
78+
metadata:
79+
title: 'View all users'
80+
description: |-
81+
This endpoint uses a custom Scribe strategy that parses a
82+
`@usesPagination` annotation to add some query parameters.
83+
84+
The sample response is gotten by Scribe making a test API call (aka "response call").
85+
authenticated: false
86+
headers:
87+
Content-Type: application/json
88+
Accept: application/json
89+
urlParameters: []
90+
queryParameters:
91+
page:
92+
name: page
93+
description: 'Page number to return.'
94+
required: false
95+
example: 1
96+
type: string
97+
pageSize:
98+
name: pageSize
99+
description: 'Number of items to return in a page. Defaults to 10.'
100+
required: false
101+
example: null
102+
type: string
103+
bodyParameters: []
104+
responses:
105+
-
106+
status: 200
107+
content: '{"data":[{"id":1,"name":"Pete","email":"[email protected]","side_projects":[{"id":2,"name":"iusto ut dolor","description":"Voluptatem aspernatur dolorem quae quaerat harum.","url":null,"due_at":"20301215","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"1"},{"id":4,"name":"corporis consequuntur amet","description":"Dolores eveniet deleniti voluptatem saepe expedita.","url":null,"due_at":"20230712","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"1"},{"id":6,"name":"nihil voluptate quaerat","description":"Animi reprehenderit soluta id quo.","url":null,"due_at":"20290603","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"1"},{"id":8,"name":"vel perspiciatis quo","description":"Et qui praesentium consequatur distinctio natus.","url":null,"due_at":"20210605","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"},{"id":9,"name":"qui et totam","description":"Veritatis quo dolorum soluta ut.","url":null,"due_at":"20270203","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"1"}]},{"id":2,"name":"Alexane Weber","email":"[email protected]","side_projects":[{"id":1,"name":"voluptas assumenda maiores","description":"Consequuntur aut ea est non.","url":null,"due_at":"20310222","created_at":"2021-05-30T00:21:59.000000Z","updated_at":"2021-05-30T00:21:59.000000Z","user_id":"2"}]},{"id":3,"name":"John Kshlerin II","email":"[email protected]","side_projects":[{"id":3,"name":"provident et consequatur","description":"Quos et ipsum cum pariatur ex perspiciatis eius.","url":null,"due_at":"20231022","created_at":"2021-05-30T00:23:25.000000Z","updated_at":"2021-05-30T00:23:25.000000Z","user_id":"3"}]},{"id":4,"name":"Rebeca Morissette","email":"[email protected]","side_projects":[{"id":5,"name":"optio excepturi ea","description":"Error deleniti sint a nostrum consequuntur et.","url":null,"due_at":"20260324","created_at":"2021-05-30T00:24:27.000000Z","updated_at":"2021-05-30T00:24:27.000000Z","user_id":"4"}]},{"id":5,"name":"Prof. Adah Witting IV","email":"[email protected]","side_projects":[{"id":7,"name":"aspernatur architecto assumenda","description":"Nisi ea aut vel sint vero voluptas tempore.","url":null,"due_at":"20280710","created_at":"2021-05-30T00:25:43.000000Z","updated_at":"2021-05-30T00:25:43.000000Z","user_id":"5"}]}]}'
108+
headers:
109+
cache-control: 'no-cache, private'
110+
content-type: application/json
111+
x-ratelimit-limit: '60'
112+
x-ratelimit-remaining: '55'
113+
access-control-allow-origin: '*'
114+
description: null
115+
responseFields: []
116+
-
117+
httpMethods:
118+
- POST
119+
uri: 'api/users/{id}/auth'
120+
metadata:
121+
title: Authenticate
122+
description: |-
123+
Get a new API token.
124+
125+
<aside>Yes, we know you can impersonate any user.🙄</aside>
126+
authenticated: false
127+
headers:
128+
Content-Type: application/json
129+
Accept: application/json
130+
urlParameters:
131+
id:
132+
name: id
133+
description: 'The ID of the user.'
134+
required: true
135+
example: 12
136+
type: integer
137+
queryParameters: []
138+
bodyParameters: []
139+
responses:
140+
-
141+
status: 200
142+
content: '{"token": "2|KLDoUXc68Ko0JaFDZoX9qYkUqWglwdGxQsvTGBCg"}'
143+
headers: []
144+
description: '200'
145+
responseFields:
146+
token:
147+
name: token
148+
description: 'The new API token. Valid forever.'
149+
type: string

0 commit comments

Comments
 (0)