EmojiHub provides an opportunity to get random emojis from already sorted categories and groups. You can also get a whole list of emojis by a certain category, group, or get the entire emoji database consisting of 1791 objects.
All emoji data is stored in a simple JSON object from which you can get html codes to insert into your web applications.
π API documentation
- Get random emoji
GET https://emojihub.yurace.pro/api/random{
"name": "hugging face",
"category": "smileys and people",
"group": "face positive",
"htmlCode": ["🤗"],
"unicode": ["U+1F917"]
}- Get an array of all emojis
GET https://emojihub.yurace.pro/api/allEach endpoint can be supplemented by a path to a specific category or group:
/category/{category-name}
/group/{group-name}
| Category | Groups |
|---|---|
| smileys-and-people | body, cat-face, clothing, creature-face, emotion, face-negative, face-neutral, face-positive, face-positive, face-role, face-sick, family, monkey-face, person, person-activity, person-gesture, person-role, skin-tone |
| animals-and-nature | animal-amphibian, animal-bird, animal-bug, animal-mammal, animal-marine, animal-reptile, plant-flower, plant-other |
| food-and-drink | dishware, drink, food-asian, food-fruit, food-prepared, food-sweat, food-vegetable |
| travel-and-places | travel-and-places |
| activities | activities |
| objects | objects |
| symbols | symbols |
| flags | flags |
π― Examples
https://emojihub.yurace.pro/api/random/group/face-positive
https://emojihub.yurace.pro/api/random/category/food-and-drink
https://emojihub.yurace.pro/api/all/category/travel-and-places
https://emojihub.yurace.pro/api/all/group/animal-bird
π Server startup
- Clone this repository:
git clone -b go-version --single-branch https://github.com/cheatsnake/emojihub.git- Inside the project, run this command to install the necessary packages:
go mod downloadMake sure you have already installed Go on your computer.
- Start the server by running the last command:
go run cmd/main.goThe server will start at the address: http://localhost:4000
π³ Docker container startup
Run the following commands to create an image and start the container:
docker build -t emojihub . --target productiondocker run -p 4000:4000 --name emojihub-server emojihub