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 ```rs GET https://emojihub.yurace.pro/api/random ``` ```json { "name": "hugging face", "category": "smileys and people", "group": "face positive", "htmlCode": ["🤗"], "unicode": ["U+1F917"] } ``` - Get an array of all emojis ```rs GET https://emojihub.yurace.pro/api/all ``` - Get all available categories ```rs GET https://emojihub.yurace.pro/api/categories ``` ```json ["smileys and people","animals and nature","food and drink","travel and places","activities","objects","symbols","flags"] ``` - Get all available groups ```rs GET https://emojihub.yurace.pro/api/groups ``` ```json ["face positive","face neutral","face negative","face role","face sick","creature face",...and more] ``` - Search emojis by name ```rs GET https://emojihub.yurace.pro/api/search?q={query} ``` ```json [ { "name": "cat face with wry smile", "category": "smileys and people", "group": "cat face", "htmlCode": ["😼"], "unicode": ["U+1F63C"] } ] ``` - Get similar emojis by name ```rs GET https://emojihub.yurace.pro/api/similar/{name} ``` ```json [ { "name": "grinning face", "category": "smileys and people", "group": "face positive", "htmlCode": ["😀"], "unicode": ["U+1F600"] }, { "name": "smiling face with smiling eyes", "category": "smileys and people", "group": "face positive", "htmlCode": ["😁"], "unicode": ["U+1F601"] } ] ``` 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/categories ``` ``` https://emojihub.yurace.pro/api/groups ``` ``` 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 ``` ``` https://emojihub.yurace.pro/api/search?q=smile ``` ``` https://emojihub.yurace.pro/api/similar/cat ``` ## 🚀 Server startup 1. Clone this repository: ```sh git clone https://github.com/cheatsnake/emojihub.git ``` ```sh cd ./emojihub ``` 2. Inside the project, run this command to install the necessary packages: ```sh go mod download ``` > Make sure you have already [installed Go](https://go.dev) on your computer. 3. Start the server by running the last command: ```sh 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: ```sh docker build -t emojihub . --target production ``` ```sh docker run -p 4000:4000 --name emojihub-server emojihub ```