pwmAPI is a RESTful api made with PHP OO in the MVC standard, which implements the http GET, POST, PUT and DELETE methods.
Basically works as a social network for people who play eletronic games, where the users can add and remove games from a list and interact with another users which are recommended according to the list of games.
Check the documentation to see all possible actions.
The game data is extracted from RAWG Video Games Database API
- Composer - package manager
- PHP7 - server/controllers/models
- PHPMailer - send keys for account activation by email
- JWT method (JSON Web Token) - user auth
- lcobucci/jwt - lib to work with JWT
- MySQL - game & user information storage
- RAWG Video Games Database API - game data
Documentation available at https://documenter.getpostman.com/view/11970203/T17J9muk?version=latest.
The application was made using Windows OS with the Xampp package, so the step by step too.
#Clone the repository
$ git clone https://github.com/rangel-pci/pwmAPI.git
#*it is important that the folder scheme looks like this:
/xampp/htdocs/api
/profile_image
/temp
#now install the dependencies
$ cd api/v1/inc
$ composer update
$ mysql -u root -p
$ create database pwm_db;
$ use pwm_db
$ source create_tables.sql;
$ source insert_games.sql;
Now that the database has ben set up, go to /api/v1/inc/
:
- Change the filename from
config.php.example
toconfig.php
- Set the environment variables in
config.php