-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
41 lines (26 loc) · 968 Bytes
/
apiary.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
FORMAT: 1A
HOST: http://headlines.tristenallen.com
# Headlines
Headlines is an API allowing for the retreival of markov-chain generated headlines.
Information is seeded from a list of over 3000 headlines from the Red and Black, uGA's student newspaper.
## Headlines Collection [/headlines{?length}]
### Generate a Headline [GET]
Retrieves a markov-generated headline from the generator.
+ Parameters
+ length: 10 (optional) - The length of headline to be generated (approximate).
+ Default: `20`
+ Response 200 (application/json)
{
"headline": "DUI, registers"
}
### Add a Seed Headline [POST]
You may add a new headline to the seeding file using this method.
+ Request (application/json)
{
"headline": "This is an average student newspaper."
}
+ Response 200 (application/json)
+ Body
{
"headline": "This is an average student newspaper."
}