Skip to content

rukaury/crybAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#CRYB API REST API

This CRYB REST API in PHP for the CRYB Online Propety system. The file structure and architecture is already provided, including the key features needed for any API. Add the controller and model files and you should be ready to go.

Some of the key features:

  • MVC Framework
  • REST architectural style
  • Request handler
  • Selectable response structure - JSON or XML, using &format URL parameter
  • Enable/disable authentication, using public-private key encryption
  • Debugging mode for request and response
  • Exception handling - displaying end logging errors
  • Automatic metadata/help page
  • Sample Users controller with CRUD database operations
  • Automatic class loading for Models/Views/Controllers

The automatic metadata page is available when hitting the API's base URL, for example http://localhost:7080/REST_API_Framework

SAMPLE REQUESTS

GET USERS

http://localhost:7080/REST_API_Framework/users?format=json&public_key=abc&public_hash=a5d6ae8ac2d017771c075f887064d38e81169f8021be8ba473babcebb7459376

<public_key>abc</public_key><public_hash>a5d6ae8ac2d017771c075f887064d38e81169f8021be8ba473babcebb7459376</public_hash>

{"authentication":{"public_key":"abc","public_hash":"a5d6ae8ac2d017771c075f887064d38e81169f8021be8ba473babcebb7459376"}}

GET USER

http://localhost:7080/REST_API_Framework/users/1?format=json

INSERT USER

{"user":{"first_name":"Adrian","last_name":"Smith", "email":"adrian@test.com"}}

UPDATE USER

{"user":{"uid":1,"last_name":"Smith"}}

DELETE USER

{"user":{"uid":1}}

About

API for the OPR system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages