-
Get all images data (eg. http://myapi.com/meme/all)
#sample output
[
{
"id" : 1,
"name" : "10 seconds later",
"url" : "https://images.funplay8.com/test/10_seconds_later.jpg",
"page" : 1,
"requestCount" : 0
},
...
{
"id" : 852,
"name" : "youre the man",
"url" : "https://images.funplay8.com/test/youre_the_man.jpg",
"page" : 95,
"requestCount" : 0
}
]
-
Get image data based on id (eg. http://myapi.com/meme/id/1)
#sample output
{
"id" : 1,
"name" : "10 seconds later",
"url" : "https://images.funplay8.com/test/10_seconds_later.jpg",
"page" : 1,
"requestCount" : 1
}
-
Get image data based on page (eg. http://myapi.com/meme/page/2)
#sample output
[
{
"id" : 10,
"name" : "3 days later",
"url" : "https://images.funplay8.com/test/3_days_later.jpg",
"page" : 2,
"requestCount" : 2
},
...
{
"id" : 18,
"name" : "5 minutes later",
"url" : "https://images.funplay8.com/test/5_minutes_later.jpg",
"page" : 2,
"requestCount" : 2
}
]
-
Get the most popular image (eg. http://myapi.com/meme/popular).
#sample output
[
{
"id" : 1,
"name" : "10 seconds later",
"url" : "https://images.funplay8.com/test/10_seconds_later.jpg",
"page" : 1,
"requestCount" : 81
}
]
-
Allow user to insert new image data (eg. http://myapi.com/meme/create).
Your function should auto assign id and page to the image data.
#sample input
"data":
[
{
"name" : "My best selfie",
"url" : "https://any.image.com/url/my_best_selfie.jpg"
},
...
{
"name" : "I like my job",
"url" : "https://any.image.com/url/i_like_my_job.jpg"
}
]