Skip to content

cheatsnake/emojihub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

EmojiHub GitHub repo size GitHub repo size GitHub repo size

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/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

๐ŸŽฏ 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

  1. Clone this repository:
git clone https://github.com/cheatsnake/emojihub.git
cd ./emojihub
  1. Inside the project, run this command to install the necessary packages:
go mod download

Make sure you have already installed Go on your computer.

  1. Start the server by running the last command:
go run cmd/main.go

The 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 production
docker run -p 4000:4000 --name emojihub-server emojihub