- GuzzleBundle - Integrates PHP HTTP Client, into Symfony 2/3
- JMSSerializerBundle - Allows you to serialize your data into a requested output format
- Mongo PHP Adapter - Provides ext-mongo interface on top of mongo-php-library
- Doctrine MongoDB ODM - Doctrine MongoDB Object Document Mapper
- DoctrineMongoDBBundle
- Composer
- Apache( or Nginx)
- MongoDB
At first you need to set up parameters.yml.
parameters:
neo_ws:
end_point: 'https://api.nasa.gov/neo/rest/v1'
api_key: N7LkblDsc5aen05FJqBQ8wU4qSdmsftwJagVK7UD
mongodb_server: mongodb://localhost:27017
mongodb_database: neo_wsThen you can run following command to install dependencies composer install.
First command must be ran to get feeds in last 3 days: php app/console neo:ws:feed.
Now you can start the server and view contents in browser: php app/console server:start.
Below you may find route list.
| Method | Path | Params |
|---|---|---|
| GET | / | |
| GET | /neo/hazardous | |
| GET | /neo/fastest | hazardous(required: false): boolean |
| GET | /neo/slowest | hazardous(required: false): boolean |
Following line will stop the server php app/console server:stop.
- Emrah Sifoğlu - Initial work - emrahsifoglu
- http://symfony.com/doc/2.8/setup.html
- https://stackoverflow.com/questions/39753772/how-to-get-the-query-parameters-in-a-guzzle-psr7-request
- https://stackoverflow.com/questions/23372598/adding-query-string-params-to-a-guzzle-get-request
- https://stackoverflow.com/questions/17488207/convert-a-string-to-json-object-php
- http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/introduction.html#using-php-7
- https://stackoverflow.com/questions/10978242/mongodb-odm-select-count-equivalent
- https://knpuniversity.com/blog/fun-with-symfonys-console
- https://knpuniversity.com/screencast/new-in-symfony3/console-styling