18 KiB
API Docs
List
Details for post list api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| GET | /sant/post | Default |
URL Params
None
Data Params
{
"page" : "2"
"type_id" : "2" // id of Sant
}
{success} Success Response
####Code 200
####Content
{
"data": {
"current_page": 1,
"data": [
{
"id": 27,
"user_id": 1,
"category_id": 1,
"privacy": 1,
"status": 2,
"description": "a",
"created_by": {
"id": 1,
"name": "Admin",
"avatar": "http://global-jain.test/images/misc/placeholder.png",
"created_at": "2022-01-20T11:12:23.000000Z",
"updated_at": "2022-02-17T13:11:44.000000Z",
"is_friend_request_sent": false
},
"updated_by": null,
"location": "Ah",
"type": 2,
"type_id": 2,
"created_at": "2022-02-18T08:36:00.000000Z",
"updated_at": "2022-02-18T08:36:00.000000Z",
"likes_count": 0,
"created_ago": "57 minutes ago",
"tag_users": [
{
"id": 1,
"name": "Admin",
"avatar": "http://global-jain.test/images/misc/placeholder.png",
"is_friend_request_sent": false,
"pivot": {
"post_id": 27,
"user_id": 1,
"created_at": "2022-02-18T08:36:00.000000Z",
"updated_at": "2022-02-18T08:36:00.000000Z"
}
}
],
"post_images": [],
"category": {
"id": 1,
"parent_id": 0,
"name": "Dharmik",
"created_at": "2022-01-31T12:28:34.000000Z",
"updated_at": "2022-01-31T12:28:34.000000Z"
}
}
],
"first_page_url": "http://global-jain.test/api/v1/sant/post?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://global-jain.test/api/v1/sant/post?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://global-jain.test/api/v1/sant/post?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://global-jain.test/api/v1/sant/post",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 1
},
"status": 200
}
List
Details for sant post list api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| GET | /sant/user/post | Default |
URL Params
None
Data Params
{
"page" : "2",
"type_id" : "2" // id of Sant
}
{success} Success Response
####Code 200
####Content
{
"data": {
"current_page": 1,
"data": [
{
"id": 2,
"user_id": 1,
"category_id": 2,
"privacy": 2,
"status": 2,
"description": "sadasdasda update",
"created_by": {
"id": 1,
"name": "Admin",
"avatar": "",
"created_at": "2022-01-20T11:12:23.000000Z",
"updated_at": "2022-01-20T11:12:23.000000Z"
},
"updated_by": {
"id": 1,
"name": "Admin",
"avatar": "",
"created_at": "2022-01-20T11:12:23.000000Z",
"updated_at": "2022-01-20T11:12:23.000000Z"
},
"location": "GA",
"created_at": "2022-02-01T08:59:57.000000Z",
"updated_at": "2022-02-01T09:00:05.000000Z",
"likes_count": 0,
"tag_users": [],
"post_images": [
{
"id": 5,
"post_id": 2,
"image_name": "http://global-jain.test/storage/images/posts/3991643708006.png",
"created_at": "2022-02-01T09:33:26.000000Z",
"updated_at": "2022-02-01T09:33:26.000000Z"
}
]
}
],
"first_page_url": "http://global-jain.test/api/v1/post?page=1",
"from": 1,
"last_page": 2,
"last_page_url": "http://global-jain.test/api/v1/post?page=2",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://global-jain.test/api/v1/post?page=1",
"label": "1",
"active": true
},
{
"url": "http://global-jain.test/api/v1/post?page=2",
"label": "2",
"active": false
},
{
"url": "http://global-jain.test/api/v1/post?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "http://global-jain.test/api/v1/post?page=2",
"path": "http://global-jain.test/api/v1/post",
"per_page": 10,
"prev_page_url": null,
"to": 10,
"total": 17
},
"status": 200
}
List
Details for add post api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| POST | sant/post | Default |
URL Params
None
Data Params
description:sadasdasda
privacy:1
category_id:5
images[0]:binary
images[1]:binary
location: Ahem
user_id[]:1
user_id[]:2
status:1
type_id:2 (id of type)
type:2 (1: User, 2: Sant, 3: Sangh )
{success} Success Response
####Code 200
####Content
{
"status": 200,
"success": true,
"data": {
"user_id": 1,
"created_by": {
"id": 1,
"name": "Admin",
"mobile": "12",
"created_at": "2022-01-20T11:12:23.000000Z",
"updated_at": "2022-01-20T11:12:23.000000Z"
},
"privacy": "1",
"location": "Ah",
"category_id": "1",
"description": "sadasdasda",
"updated_at": "2022-02-01T08:59:57.000000Z",
"created_at": "2022-02-01T08:59:57.000000Z",
"likes_count": 0,
"id": 2,
"updated_by": null
},
"message": "Post added successfully!"
}
List
Details for update post api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| POST | sant/post/{id} | Default |
URL Params
None
Data Params
description:sadasdasda update
privacy:2
category_id:2
removed_image_id[0]:3
removed_image_id[1]:4
removed_image_id[2]:2
removed_image_id[3]:1
images[0]:binary
images[1]:binary
location:GA
user_id[]:1
user_id[]:2
status:2
{success} Success Response
####Code 200
####Content
{
"status": 200,
"success": true,
"data": {
"id": 2,
"user_id": 1,
"category_id": 2,
"privacy": 2,
"description": "sadasdasda update",
"created_by": {
"id": 1,
"name": "Admin",
"avatar": "",
"created_at": "2022-01-20T11:12:23.000000Z",
"updated_at": "2022-01-20T11:12:23.000000Z"
},
"updated_by": {
"id": 1,
"name": "Admin",
"avatar": "",
"created_at": "2022-01-20T11:12:23.000000Z",
"updated_at": "2022-01-20T11:12:23.000000Z"
},
"location": "GA",
"created_at": "2022-02-01T08:59:57.000000Z",
"updated_at": "2022-02-01T09:00:05.000000Z",
"likes_count": 0,
"post_images": [
{
"id": 5,
"post_id": 2,
"image_name": "3991643708006.png",
"created_at": "2022-02-01T09:33:26.000000Z",
"updated_at": "2022-02-01T09:33:26.000000Z"
}
]
},
"message": "Post updated successfully!"
}
List
Details for delete post api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| DELETE | sant/post/{id} | Default |
URL Params
None
Data Params
None
{success} Success Response
####Code 200
####Content
{
"status": 200,
"success": true,
"message": "Post deleted successfully!"
}
List
Details for sant post list api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| GET | sant/post/{id} | Default |
URL Params
None
Data Params
None
{success} Success Response
####Code 200
####Content
{
"status": 200,
"success": true,
"data": {
"id": 2,
"user_id": 1,
"category_id": 2,
"privacy": 2,
"status": 2,
"description": "sadasdasda update",
"created_by": 1,
"updated_by": 1,
"location": "GA",
"created_at": "2022-02-01T08:59:57.000000Z",
"updated_at": "2022-02-01T09:00:05.000000Z",
"comments": {
"current_page": 1,
"data": [
{
"id": 7,
"post_id": 2,
"user_id": 1,
"reply_id": null,
"comment": "my comment for post 3",
"created_at": "2022-02-07T09:43:44.000000Z",
"updated_at": "2022-02-07T09:43:44.000000Z",
"replies": [
{
"id": 8,
"post_id": 2,
"user_id": 1,
"reply_id": 7,
"comment": "my comment for post reply 2 update for id 2",
"created_at": "2022-02-07T09:44:00.000000Z",
"updated_at": "2022-02-07T10:02:53.000000Z"
}
]
},
{
"id": 5,
"post_id": 2,
"user_id": 1,
"reply_id": null,
"comment": "my comment for post reply 2 update",
"created_at": "2022-02-03T12:04:12.000000Z",
"updated_at": "2022-02-04T06:11:00.000000Z",
"replies": []
},
{
"id": 4,
"post_id": 2,
"user_id": 1,
"reply_id": null,
"comment": "my comment for post reply 2 update",
"created_at": "2022-02-03T12:04:00.000000Z",
"updated_at": "2022-02-04T06:11:00.000000Z",
"replies": []
},
{
"id": 3,
"post_id": 2,
"user_id": 1,
"reply_id": null,
"comment": "my comment for post reply 2 update",
"created_at": "2022-02-03T12:03:27.000000Z",
"updated_at": "2022-02-04T06:11:00.000000Z",
"replies": []
},
{
"id": 2,
"post_id": 2,
"user_id": 1,
"reply_id": null,
"comment": "my comment for post reply 2 update for id 2",
"created_at": "2022-02-03T12:03:22.000000Z",
"updated_at": "2022-02-04T06:14:04.000000Z",
"replies": []
}
],
"first_page_url": "http://global-jain.test/api/v1/post/2?page=1",
"from": 1,
"last_page": 2,
"last_page_url": "http://global-jain.test/api/v1/post/2?page=2",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://global-jain.test/api/v1/post/2?page=1",
"label": "1",
"active": true
},
{
"url": "http://global-jain.test/api/v1/post/2?page=2",
"label": "2",
"active": false
},
{
"url": "http://global-jain.test/api/v1/post/2?page=2",
"label": "Next »",
"active": false
}
],
"next_page_url": "http://global-jain.test/api/v1/post/2?page=2",
"path": "http://global-jain.test/api/v1/post/2",
"per_page": 5,
"prev_page_url": null,
"to": 5,
"total": 6
}
},
"message": "Get post info successfully!"
}
List
Details for sant feed list api
####Endpoint
{warning} Please note that the URI for this endpoint should include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| GET | user/sant/feeds | Default |
URL Params
None
Data Params
None
{success} Success Response
####Code 200
####Content
{
"status": 200,
"success": true,
"data": {
"current_page": 1,
"data": [
{
"id": 9,
"log_name": "default",
"description": "chaturmas_updated",
"subject_type": "App\\Models\\Sant",
"subject_id": 7,
"causer_type": "App\\Models\\User",
"causer_id": 1,
"properties": {
"attributes": {
"message": "Chaturmas is updated",
"sant_id": 7,
"chaturmas_information": {
"id": 33,
"year": null,
"place": "Derasar 2",
"sant_id": 7,
"end_date": null,
"sangh_id": null,
"created_at": "2022-03-25T10:41:58.000000Z",
"created_by": 1,
"start_date": null,
"updated_at": "2022-03-25T10:42:11.000000Z",
"updated_by": 1,
"created_ago": "17 minutes ago",
"is_approved": 0,
"updated_ago": "16 minutes ago",
"thana_sant_id": null,
"chaturmas_date_id": 1
}
}
},
"created_at": "2022-03-25T10:59:02.000000Z",
"updated_at": "2022-03-25T10:59:02.000000Z",
"causer": {
"id": 1,
"name": "Admin",
"avatar": "http://global-jain.test/storage/images/users/medium/6451644991774.png",
"is_friends": 0
},
"subject": {
"id": 7,
"name": "shreedhar",
"avatar": "http://global-jain.test/images/misc/placeholder.png",
"age": 0,
"diksha_year": 0,
"is_user_following": false
}
}
],
"first_page_url": "http://global-jain.test/api/v1/user/sant/feeds?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://global-jain.test/api/v1/user/sant/feeds?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "http://global-jain.test/api/v1/user/sant/feeds?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "http://global-jain.test/api/v1/user/sant/feeds",
"per_page": 10,
"prev_page_url": null,
"to": 5,
"total": 5
},
"message": "Get sant follow list successfully!"
}
{danger} Unauthenticated Response
####Code 403
####Content
{
"message": "Something went wrong!"
}