PHPackages                             laztopaz/emoji-restful-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. laztopaz/emoji-restful-api

ActiveLibrary[API Development](/categories/api)

laztopaz/emoji-restful-api
==========================

This package creates an Emoji Restful API using Slim framework.

201PHP

Since Apr 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/olotintemitope/Emoji-REST-API)[ Packagist](https://packagist.org/packages/laztopaz/emoji-restful-api)[ RSS](/packages/laztopaz-emoji-restful-api/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Emoji-REST-API
--------------

[](#emoji-rest-api)

A Restful API using Slim framework v3 for a NaijaEmoji Service that implement JWT access token for Authentication.

[![Coverage Status](https://camo.githubusercontent.com/98a3eedd39d18390f3fee9f28808676cfe9f74b14711190df0c0c4b7f65fbba3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616e64656c612d746f6c6f74696e2f456d6f6a692d524553542d4150492f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/andela-tolotin/Emoji-REST-API?branch=master) [![Build Status](https://camo.githubusercontent.com/3694bdca526d60b8287eafe79fdd221ffc03aacd064c3c95d036a52e03309721/68747470733a2f2f7472617669732d63692e6f72672f616e64656c612d746f6c6f74696e2f456d6f6a692d524553542d4150492e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/andela-tolotin/Emoji-REST-API) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/c6ec450796305c81451750b1b2cc2bdc0fd8804f6f90923ca2a7e33eb1bc99ee/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616e64656c612d746f6c6f74696e2f456d6f6a692d524553542d4150492f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/andela-tolotin/Emoji-REST-API/?branch=master)

How to use this package
-----------------------

[](#how-to-use-this-package)

Composer installation is required before using this package. To install a composer, try running this command on your terminal.

```
$ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin

```

Installation
------------

[](#installation)

PHP 5.5+ and Composer are required.

### Via composer

[](#via-composer)

```
$ composer require laztopaz/emoji-restful-api

```

### Install

[](#install)

```
$ composer install

```

After you have installed this package, the next line of action is to consume the Emoji API.

### Database Configuration

[](#database-configuration)

You need set your environment variables to define your database parameters or rename .env.example file in project to .env and change the below to your local configuration.

```
DRIVER   = mysql
HOSTNAME = 127.0.0.1
USERNAME = username
PASSWORD = password
DBNAME   = YourDatabase
PORT     = port

```

Finally, boot-up the API service with PHP's Built-in web server:

```
php -S localhost:8000 -t public

```

All examples are shown in POSTMAN.

To this point we have several endpoints both the ones that requires authentication and non-athenticated.

Naija Emoji Endpoints
---------------------

[](#naija-emoji-endpoints)

- POST /auth/login Logs a user in
- GET /auth/logout Logs a user out
- GET /emojis List all the created emojis.
- GET /emojis/{id} Gets a single emoji
- POST /emojis Create a new emoji
- PUT /emojis/{id} Updates an emoji
- PATCH /emojis/{id} Partially updates an emoji
- DELETE /emojis/{id} Deletes a single emoji

Endpoints with access token
---------------------------

[](#endpoints-with-access-token)

- GET /auth/logout Logs a user out
- POST /emojis Create a new emoji
- PUT /emojis/{id} Updates an emoji
- PATCH /emojis/{id} Partially updates an emoji
- DELETE /emojis/{id} Deletes a single emoji

Endpoints without access token
------------------------------

[](#endpoints-without--access-token)

- POST /auth/login Logs a user in
- GET /emojis List all the created emojis.
- GET /emojis/{id} Gets a single emoji

Create User
-----------

[](#create-user)

You can create a user all you have to do is to send a POST request to the API endpoint

[![create user](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/createuser.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/createuser.png)

User Login
----------

[](#user-login)

For a user to be able to access some endpoints, a login access is required and after a successful login, access token will be generated for the user. The user can now include the token in the header of the incoming POST request to be sent to the API.

[![user login ](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/login.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/login.png)

Create Emoji
------------

[](#create-emoji)

To create an Emoji, you will need to send a POST request to the API along side with the token in order to create an Emoji.

[![create an emoji](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/createemoji.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/createemoji.png)

Get all Emoji
-------------

[](#get-all-emoji)

To get all emojis, you will need to send a GET request to the API

[![get all emojis](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/getallemojis.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/getallemojis.png)

Get a single Emoji
------------------

[](#get-a-single-emoji)

To get a single emoji, you will also need to a send a GET request and the id of the emoji to be retrieved.

[![get single emoji](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/getsingleemoji.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/getsingleemoji.png)

Update an Emoji fully
---------------------

[](#update-an-emoji-fully)

To update multiple fields of an Emoji, you will need to send a PUT request To update a single field of an Emoji, you will need to send a PATCH request and set the form encoding to x-www-form-url-encoded along side with access token as header along side with access token.

[![put update an emoji](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/putupdateemoji.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/putupdateemoji.png)

To update a single field of an Emoji, you will need to send a PATCH request and set the form encoding to x-www-form-url-encoded along side with access token as header.

Update an Emoji partially
-------------------------

[](#update-an-emoji-partially)

[![patch update an emoji](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/patchupdateemoji.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/patchupdateemoji.png)

Delete an Emoji
---------------

[](#delete-an-emoji)

To delete an Emoji, you will need to send a DELETE request along side with access token as header.

[![delete an emoji](https://github.com/andela-tolotin/Emoji-REST-API/raw/master/screenshots/deleteemoji.png)](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/screenshots/deleteemoji.png)

Testing
-------

[](#testing)

Run this command on your terminal

```
$ composer test or phpunit test

```

Contributing
------------

[](#contributing)

To contribute and extend the scope of this package, Please check out [CONTRIBUTING file](https://github.com/andela-tolotin/Emoji-REST-API/blob/master/contribution.md) for detailed contribution guidelines.

Credit
------

[](#credit)

Emoji RESTful API Package is created and maintained by Temitope Olotin.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9338a1c768c2e964e80b8d14adcdd91bcc0fd74f487661c348f5483c5acc3f23?d=identicon)[andela-tolotin](/maintainers/andela-tolotin)

---

Top Contributors

[![olotintemitope](https://avatars.githubusercontent.com/u/14159435?v=4)](https://github.com/olotintemitope "olotintemitope (179 commits)")

### Embed Badge

![Health badge](/badges/laztopaz-emoji-restful-api/health.svg)

```
[![Health](https://phpackages.com/badges/laztopaz-emoji-restful-api/health.svg)](https://phpackages.com/packages/laztopaz-emoji-restful-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
