File tree 1 file changed +55
-4
lines changed
1 file changed +55
-4
lines changed Original file line number Diff line number Diff line change 1
- # random- word-api
1
+ # Random word API
2
2
3
- Simple scala REST API, spits out random words.
3
+ ## It's alive at https:// random-word-api.herokuapp.com/
4
4
5
- It's alive at https://random-word-api.herokuapp.com/
5
+ ## Endpoints
6
6
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
8
59
```
9
60
pacman -S scala sbt
10
61
sbt run
You can’t perform that action at this time.
0 commit comments