RazorSh4rk/random-word-api
소개
Simple scala rest api that serves random words
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalRandom word API
It's alive at https://random-word-api.herokuapp.com/
Endpoints
/all
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.
Example:
https://random-word-api.herokuapp.com/all
/word
Return one stored word randomly. Options can be further specified, see the parameters menu.
Example:
https://random-word-api.herokuapp.com/word
/languages
Return a list of stored language codes. Useful if you want a multilanguage app. See Github to find out how to add your own.
Example:
https://random-word-api.herokuapp.com/languages
Parameters
?number
Set number of requested words. If it exceeds the maximum stored amount, it will just return all of them.
Example:
https://random-word-api.herokuapp.com/word?number=10
?length
Set length of requested words. This will only return words that contain x amount of letters.
Example:
https://random-word-api.herokuapp.com/word?length=5
?lang
Set language of requested words. Go to Github to get more info on how to add your own language.
Currently supported languages:
https://random-word-api.herokuapp.com/languages
Example:
https://random-word-api.herokuapp.com/word?lang=es
?diff
Filter words by difficulty/commonality.
Note: Only works when requesting 5 or fewer words (number ≤ 5).
Note: Difficulty is a best-case guarantee, the app might run out of requests and have to fall back to completely random words.
| Value | Difficulty | Description |
|---|---|---|
| 1 | Easy | Very common words (e.g., "water", "house") |
| 2 | Medium-Easy | Common words |
| 3 | Medium | Moderately common words |
| 4 | Medium-Hard | Uncommon words |
| 5 | Hard | Rare words (e.g., "defenestration") |
Example:
https://random-word-api.herokuapp.com/word?number=3&diff=1
Development
Using Docker (recommended)
docker compose --profile dev up redis app-dev
Manual setup
You will need Scala and sbt:
pacman -S scala sbt
sbt run
Running tests
sbt test
관련 프로젝트 살펴보기
불러오는 중…