Skip to content

priyalweb/php_rest_memories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memories - A picture stream application

A picture stream application is like a open social media app where users can post interesting events that happened in their lives by providing their name, a caption for the pivture and the URL for the picture image as input. The page retrieve and display the latest 100 posted pictures(memories) (names + images + caption).

This is not a photo generator, but a simple app to pull created photos using their URL and listing them on this page with the user’s name and caption.

URL - https://xmeme-priyal.000webhostapp.com/

PHP REST API

This is a simple PHP REST API from scratch with no framework.

View on Docgen

Task screenshot1

Quick Start

Import the xmemes.sql file, change the params in the config/Database.php file to your own

Testing

Posts

Create a Post

{
	"name": "ashok kumar",

	"url": "https://images.pexels.com/photos/3573382/pexels-photo-3573382.jpeg",

	"caption": "This is a meme"
}
  • Sample Response
{
    "status": true,
    "message": "Post Created"
}

Get all Posts

{
    "status": true,
    "message": "Posts Found",
    "data": [

    {

	"id": "1",       

	"name": "MS Dhoni",

	"url": "https://images.pexels.com/photos/3573382/pexels-photo-3573382.jpeg",

	"caption": "Meme for my place"

    },

    {

	"id": "2",

	"name": "Viral Kohli",

	"url": "https://images.pexels.com/photos/1078983/pexels-photo-1078983.jpeg",

	"caption": "Another home meme"

    }

  ]

}

Get a Post

  {

	"id": "1",       

	"name": "MS Dhoni",

	"url": "https://images.pexels.com/photos/3573382/pexels-photo-3573382.jpeg",

	"caption": "Meme for my place"

    }

Update a Post

{
    "Key": "Content-Type",
    "Value": "application/json"
}
  • Sample Response
{

	"url": "new_url",

	"caption": "new_caption"

}

Delete a Post

{
    "Key": "Content-Type",
    "Value": "application/json"
}
  • Sample Response
{
    "status": true,
    "message": "Post Deleted"
}

Task screenshot2

Author

Priyal Dubey Priyal Dubey

Version

1.0.0

About

A pictures/memories Stream application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published