Skip to content

strannik-06/friends-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Friends REST API - small REST application written using Symfony2 and MongoDB

Requirements:

PHP 5.6
MongoDB 3.0 (you need running server mongodb://localhost:27017)

Installation:

composer install

Usage:

php app/console server:start - run built-in symfony web server
php app/console doctrine:mongodb:fixtures:load - load initial fixtures

http://127.0.0.1:8000/send-request/{userEmail}/{friendEmail}
http://127.0.0.1:8000/confirm-request/{userEmail}/{requestEmail}
http://127.0.0.1:8000/reject-request/{userEmail}/{requestEmail}
http://127.0.0.1:8000/requests/{userEmail}
http://127.0.0.1:8000/friends/{userEmail}
http://127.0.0.1:8000/friends-friends/{userEmail}/{n}
(you can use john_joe@email.com, sara_joe@email.com, james_joe@email.com, jane_smith@email.com, anonymous@email.com)

To run tests:

php app/console doctrine:mongodb:schema:drop - clean database
php app/console doctrine:mongodb:fixtures:load - load fixtures
phpunit -c app/phpunit.xml.dist

Note:

To simplify writing functional tests its decided to use email instead of id in all requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published