Skip to content

Commit 0e919a6

Browse files
committed
make a good readme
1 parent b4f9f24 commit 0e919a6

File tree

1 file changed

+55
-4
lines changed

1 file changed

+55
-4
lines changed

README.md

+55-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,61 @@
1-
# random-word-api
1+
# Random word API
22

3-
Simple scala REST API, spits out random words.
3+
## It's alive at https://random-word-api.herokuapp.com/
44

5-
It's alive at https://random-word-api.herokuapp.com/
5+
## Endpoints
66

7-
You will need scala and sbt for the development
7+
### /all
8+
Return all stored words. This will be a huge data dump and will take a long time to fetch and will probably slow down your application.
9+
10+
Example:
11+
https://random-word-api.herokuapp.com/all
12+
13+
---
14+
15+
### /word
16+
Return one stored word randomly. Options can be further specified, see the parameters menu.
17+
18+
Example:
19+
https://random-word-api.herokuapp.com/word
20+
21+
---
22+
23+
### /languages
24+
Return a list of stored language codes. Useful if you want a multilanguage app. See Github to find out how to add your own.
25+
26+
Example:
27+
https://random-word-api.herokuapp.com/languages
28+
29+
## Parameters
30+
31+
### ?number
32+
33+
Set number of requested words. If it exceeds the maximum stored amount, it will just return all of them.
34+
35+
Example:
36+
https://random-word-api.herokuapp.com/word?number=10
37+
38+
### ?length
39+
40+
Set length of requested words. This will only return words that contain x amount of letters.
41+
42+
Example:
43+
https://random-word-api.herokuapp.com/word?length=5
44+
45+
### ?lang
46+
47+
Set language of requested words. Go to Github to get more info on how to add your own language.
48+
49+
Currently supported languages:
50+
https://random-word-api.herokuapp.com/languages
51+
Example:
52+
https://random-word-api.herokuapp.com/word?lang=es
53+
54+
---
55+
56+
## Development
57+
58+
You will need scala and sbt
859
```
960
pacman -S scala sbt
1061
sbt run

0 commit comments

Comments
 (0)