FadhaAlatfal.com
Today is a great one!
Introduction
this document aims to inroduce kidsspace back-end APIs in which the application app can invoke to utilize several backend services
| Api | Url | Method |
|---|---|---|
| List all library Categories |
/api/library/categories/
|
GET |
| Get One Category |
/api/library/category/:id
|
GET |
| Search library content according to filter value |
/api/library/search/
|
GET |
| Get all library content |
/api/library/
|
GET |
| Get one library content according to id |
/api/library/:id
|
GET |
| Visit Libary |
/api/library/set_visitor/
|
GET |
API to enable show categories of library
/api/library/categories/
Output Example
{
{
"data": [
{
"id": 1,
"name": "أرقام",
"date": "2020-06-10T23:33:26.657423Z",
"icon": "/media/images/lib_bg1.jpg",
"viisters": 0,
"parent": null
},
{
"id": 2,
"name": "حروف",
"date": "2020-06-10T23:34:05.485779Z",
"icon": "/media/images/planet4.png",
"viisters": 0,
"parent": null
}
]
}
API to enable get one category by id
/api/library/category/2
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
Output Example
{
"data": [
{
"id": 2,
"name": "حروف",
"date": "2020-06-10T23:34:05.485779Z",
"icon": "/media/images/planet4.png",
"viisters": 0,
"parent": null
}
]
}
API to enable Search on library
/api/library/search/date/
/api/library/search/title/
/api/library/search/category/
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
| Params | Example |
|---|---|
| end_date (in case of date) |
2019-05-09
|
| start_date(in case of date) |
2019-05-09
|
| search (in case of title) |
kidspace
|
| category (in case of category) |
1
|
Output Example
{
data:[
category: 6
date: "2019-05-19T20:18:45.768778Z"
describe: "asdfsadf"
file: "/media/uploads/New_%D8%B9%D8%B1%D8%B6_%D8%AA%D9%82%D8%AF%D9%8A%D9%85%D9%8A_%D9%85%D9%86_Microsoft_PowerPoint.pptx"
icon: "/media/images/backend_GFjRa6N.png"
id: 9
title: "فضاء الأطفال"
type_file: 1
viisters: 10
{
[
{
API to enable show library content
/api/library/
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
Output Example
{
{
"data": [
{
"id": 1,
"title": "أول حرف",
"describe": "كتاب مهم جدا",
"icon": "/media/images/lib_bg1_DnxhXAX.jpg",
"file": "/media/uploads/lib_bg2.jpg",
"date": "2020-06-10T23:35:02.709885Z",
"type_file": 1,
"viisters": 40,
"category": 2
}
]
}
API to enable get library content
/api/library/1
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
Output Example
{
"data": [
{
"id": 1,
"title": "أول حرف",
"describe": "كتاب مهم جدا",
"icon": "/media/images/lib_bg1_DnxhXAX.jpg",
"file": "/media/uploads/lib_bg2.jpg",
"date": "2020-06-10T23:35:02.709885Z",
"type_file": 1,
"viisters": 40,
"category": 2
}
]
}
API to increment Visitor count of library
/api/library/set_visitor/
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
| Params | Example |
|---|---|
| id |
1
|
Output Example
{
"state": 1,
"message": "success increament visitor "
}