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.
- 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/all
Each endpoint can be supplemented by a path to a specific category or group:
/category/{category-name}
/group/{group-name}
๐ Table with all available emoji categories and groups:
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-sweet, food-vegetable |
travel-and-places | travel-and-places |
activities | activities |
objects | objects |
symbols | symbols |
flags | flags |
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
- Clone this repository:
git clone https://github.com/cheatsnake/emojihub.git
cd ./emojihub
- Inside the project, run this command to install the necessary packages:
go mod download
Make sure you have already installed Go on your computer.
- Start the server by running the last command:
go run cmd/main.go
The server will start at the address: http://localhost:4000
Run the following commands to create an image and start the container:
docker build -t emojihub . --target production
docker run -p 4000:4000 --name emojihub-server emojihub