-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINTERFACE.apib
120 lines (79 loc) · 2.9 KB
/
INTERFACE.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
FORMAT: 1A
HOST: https://jabberdexicon.herokuapp.com
# The Jabberdexicon
The Jabberdexicon is a simple API for a dictionary of jargon words. Formatted definitions are provided by the API.
## Authentication
*The Jabberdexicon API* uses token authentication. Your token can be any text you wish. As long as you use the same token between requests, you'll have access to the same list entries.
# Group Entries
## Entry Collections [/entries{?access_token,q}]
+ Attributes (array[Entry])
+ Parameters
+ access_token: illustriousvoyage (string) - Your unique access token
### List Entries [GET]
+ Parameters
+ q: duck (string, optional) - An optional search query
+ Response 200 (application/json)
[
{
"id": 1,
"term": "Common Law Feature",
"slug": "1-common-law-feature"
},
{
"id": 2,
"term": "Yoda Conditions",
"slug": "2-yoda-conditions"
}
]
### Create a New Entry [POST]
You may create new entries using this action. It takes a JSON object containing the term and definition.
+ Request (application/json)
{
"entry": {
"term": "React",
"definition": "I heard React was good."
}
}
+ Response 201 (application/json)
+ Headers
Location: /entries/3
+ Body
{
"id": 3,
"term": "React",
"slug": "3-react",
"definition": "I heard React was good.\n",
"formatted_definition": "\u003cp\u003eI heard React was good.\u003c/p\u003e\n"
}
## Singular Entry [/entries/{id}{?access_token}]
+ Attributes (Entry)
+ Parameters
+ id: 1 (number) - The unique identifier of the entry
+ access_token: illustriousvoyage (string) - Your unique access token
### Retrieve an Entry [GET]
+ Request (application/json)
+ Response 200 (application/json)
+ Attributes (Entry)
+ Body
{
"id": 1,
"term": "Common Law Feature",
"slug": "1-common-law-feature",
"definition": "A bug that has existed for so long that it is considered a feature.",
"formatted_definition": "\u003cp\u003eA bug that has existed for so long that it is considered a feature.\u003c/p\u003e\n"
}
### Update an Entry [PUT]
+ Request (application/json)
{
"entry": {
"definition": "Up in your API, vandalizing your content."
}
}
+ Response 204
### Remove an Entry [DELETE]
+ Request (application/json)
+ Response 200
# Data Structures
## Entry (object)
+ term (required, string) - The word, or phrase being defined.
+ definition (required, string) - A Markdown formatted string that describes a term.