cheatsnake / emojihub

😺 A simple & free HTTP API with emojis for your cool apps

Home Page:https://emojihub.yurace.pro/api/random

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

😺 A simple & free HTTP API with emojis for your cool apps

https://emojihub.yurace.pro/api/random

License:MIT License


Languages

Language:Go 98.5%Language:Dockerfile 1.5%