Skip to content

danielerat/chatapplication

Repository files navigation

Introduction

This phpChatApp Has an API which was built from the ground-up with a JSON API that makes it easy for developers and sysadmins To consume Provided Data .

Use Cases

There are many reasons to use an API. Down Here , there are quire Few things You Might Want to do with The API:

GET :: USER BY USERNAME : chatPrototype/API.php?api_name=get_user&username=username
GET :: ALL USERS chatPrototype/API.php?api_name=get_user&username=--all
USING POST YOU CAN CHANGE USER THEME
POST :: CHANGE USERS THEME chatPrototype/API.php?api_name=change_theme&username=danielerat&theme=1

Responses

SUCCESS RESPONSES

Many API endpoints return the JSON representation of the resources created or edited :

{
    unique_id	"2051224492162685558060f7d89cbcb6f"
    first_name	"Daniel"
    last_name	"Gisa Ilunga"
    username	"danielerat"
    email	    "[email protected]"
    avatar	    "9.svg"
}

FAILED RESPONSES

However, if an invalid request is submitted, or some other error occurs, A JSON response in the following format Will be returned

{
    "status" => 'int',
    "success" => 'failed',
    "message" => "ERROR DESCRIBING THE REQUEST"
}

The message attribute contains a message commonly used to indicate errors or

The success attribute describes if the transaction was successful or not.

The status attribute describes if the transaction was successful or not.

Status Codes

Codes Describing the status errors which will be returned to you ,

Status Code Description
200 OK
201 CREATED
400 BAD REQUEST
404 NOT FOUND
500 INTERNAL SERVER ERROR

https://www.postman.com/danielerat/workspace/chatapplicationurapi/collection/17257182-7fadd075-5f3f-4f10-befe-f70569b48da5

About

A simple chat application made with php and mysql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •