https://github.com/onlyonehas/perk_php_api
retrieves coupons for one time use, implements api authentication
https://github.com/onlyonehas/perk_php_api
api authentication docker-compose php
Last synced: 9 days ago
JSON representation
retrieves coupons for one time use, implements api authentication
- Host: GitHub
- URL: https://github.com/onlyonehas/perk_php_api
- Owner: onlyonehas
- Created: 2018-07-04T23:55:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-05T00:10:04.000Z (almost 8 years ago)
- Last Synced: 2025-08-11T07:29:35.544Z (11 months ago)
- Topics: api, authentication, docker-compose, php
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PERK PHP REST API
## TO INSTALL
### Database
>Import the coupons.sql file in your database
>Configure the db params in the config/Database.php file to your own
### RUN Server
>Alternatively run docker-compose up -d
Which uses port :9906
private $db_name = 'discounts';
private $username = 'perk_user';
private $password = 'perk321';
>IN POSTMAN RUN GET http://localhost:8100/api/getcoupons
Alternative can RUN php -S localhost:80 inside the directory eg http://localhost:8100/api/getcoupons.php
### Aunthentication
>To request a token
set Secret in header use key: secret value: secretcode
this will return a token
add the token along with the secret in headers
e.g. key: token value: RANDOM2131
>Once Aunthenticated continue with your query
e.g. GET http://localhost/api/getcoupons?brand=tesco&limit=1