Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mbrioski/symfony2blogapi

Exemple of Symfony2 API implementation for a blog
https://github.com/mbrioski/symfony2blogapi

Last synced: 8 days ago
JSON representation

Exemple of Symfony2 API implementation for a blog

Awesome Lists containing this project

README

        

# Symfony2BlogApi ![](https://travis-ci.org/ridesoft/Symfony2BlogApi.svg?branch=master)

"Blog" Api to insert data in a mysql database with these functions:
- Create a topic
- Delete a topic
- List all topics
- Show a specific topic

- Create an article for a topic
- Delete an article
- List all articles from a topic
- Show a specific article

##INSTALL (from linux)
- Clone this repo: ```$ git clone [email protected]:ridesoft/Symfony2BlogApi.git```
- Create a schema into database, for exemple use the name *blog*
- Restore mysql database structure ```$ mysql -uUser -pMyPassword blog < blog_structure.sql```
- ```$ composer install```
- Configure database parameters inside *app/config/parameters.yml*
- See the routes in symfony for the application: ```$ php app/console router:debug```

All the routes with **/api/** prefix are for the API.

The parameter **{_format}** in the route is the format of the output, this can be **json**,**xml**,**html**

##Run test with
```
$ phpunit -c app
```