A platform for subbscribing to different surfspots based on the forecast
- NPM
- Docker
- PHP (optional but recommended)
- Composer (optional but recommended)
- clone the repo
- run
docker-compose up
- run
composer install
or if you don't want to install composer run
docker exec -it surfscribe-local composer install
- run
php artisan migrate
or
docker exec -it surfscribe-local php artisan migrate
go to http://localhost to see if it's running.
The Api has 3 main features. Embeds, search, and pagination.
to call the api use:
/api/{entity}/{id?}
The id is optional.
On the list call (api/{entity}
) you can use the embed like so:
api/locations?embeds[]=images&embeds[]=users
To search the api use
api/locations?filters[all]=canggu indonesia
To change the responsesize from the paginator use the pagesize
paramater:
api/locations?pagesize=20
Or use the page
parameter to go the next page:
api/locations?page=2
- All these can be used together to create more complex queries
- The
filter[all]
parameter filters the data on country name, region name, wavebreak name and slug. - The only available embed is currently
images
- The migrate command pulls some testdata, not all, due to high bandwitdth demand.
- The migration is also syncronous to prevent looking like a ddos.