Skip to content

Small RESTful application based on Silex micro framework

Notifications You must be signed in to change notification settings

e-moe/silex_rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silex RESTfull Address Book

Installation

Needed software:

  • Composer
  • Git

Local checkout

# Clone project
git clone ssh://[email protected]

# Go to clone and run
composer update

JSON API:

# Data format:
{
    "id": "13",
    "label": "My addrXX",
    "street": "Artema",
    "housenumber": "4",
    "postalcode": "83001",
    "city": "Donetsk",
    "country": "Ukraine"
}

# GET /api/ - get list of all addresses
response:
[ { <see Data format> }, { <see Data format> }, ... ]

# GET /api/{id} - get address with specified id
response:
{ <see Data format> }

# POST /api/ - create new
# PUT /api/{id} - update existing
# DELETE /api/{id} - delete address with specified id
params: { <see Data format> }
response:
{
    "hasErrors": false,
    "errors": null,
    "Id": "13"
}

Manual Testing:

$ curl /api/ -d '{"label":"test","street":"test",...}' -H 'Content-Type: application/json'

About

Small RESTful application based on Silex micro framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages