370 lines
7.8 KiB
Markdown
370 lines
7.8 KiB
Markdown
|
|
# API Docs
|
||
|
|
|
||
|
|
<a name="list"></a>
|
||
|
|
## Request List
|
||
|
|
|
||
|
|
Details for friend request list api
|
||
|
|
##
|
||
|
|
##
|
||
|
|
|
||
|
|
####Endpoint
|
||
|
|
|
||
|
|
> {warning} Please note that the URI for this endpoint should include api/{$version} before
|
||
|
|
|
||
|
|
| Method | URI | Headers |
|
||
|
|
| : | :- | : |
|
||
|
|
| GET | `user/request-list` | Bearer {Token} |
|
||
|
|
|
||
|
|
### URL Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
### Data Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
> {success} Success Response
|
||
|
|
|
||
|
|
####Code `200`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"data": [
|
||
|
|
{
|
||
|
|
"id": 11,
|
||
|
|
"sender_id": 4,
|
||
|
|
"receiver_id": 2,
|
||
|
|
"status": 0,
|
||
|
|
"created_at": "2022-01-20T10:31:33.000000Z",
|
||
|
|
"updated_at": "2022-01-20T10:40:16.000000Z",
|
||
|
|
"deleted_at": null,
|
||
|
|
"users": {
|
||
|
|
"id": 4,
|
||
|
|
"uuid": "58330871-16c3-4843-97d7-d3ee371446da",
|
||
|
|
"name": "Test",
|
||
|
|
"email": "test@gj.com",
|
||
|
|
"email_hash": "9e77c62b589b3ae5ea0d9ea58b907bfa",
|
||
|
|
"username": "42",
|
||
|
|
"country_code": null,
|
||
|
|
"mobile": null,
|
||
|
|
"dharma_id": 3,
|
||
|
|
"birth_date": "1997-05-10",
|
||
|
|
"gender": null,
|
||
|
|
"email_verified_at": null,
|
||
|
|
"mobile_verified_at": null,
|
||
|
|
"avatar": null,
|
||
|
|
"verification_confirmed": 1,
|
||
|
|
"status": 1,
|
||
|
|
"timezone": null,
|
||
|
|
"last_login_at": null,
|
||
|
|
"last_login_ip": null,
|
||
|
|
"created_at": "2022-01-20T10:44:41.000000Z",
|
||
|
|
"updated_at": "2022-01-20T10:44:41.000000Z",
|
||
|
|
"deleted_at": null
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"status": 200
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
> {danger} Unauthenticated Response
|
||
|
|
|
||
|
|
####Code `403`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"message": "Something went wrong!"
|
||
|
|
"status": 403
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
<a name="sent-list"></a>
|
||
|
|
## Sent Request List
|
||
|
|
|
||
|
|
Details for sent friend request list api
|
||
|
|
##
|
||
|
|
##
|
||
|
|
|
||
|
|
####Endpoint
|
||
|
|
|
||
|
|
> {warning} Please note that the URI for this endpoint should include api/{$version} before
|
||
|
|
|
||
|
|
| Method | URI | Headers |
|
||
|
|
| : | :- | : |
|
||
|
|
| GET | `user/sent-request-list` | Bearer {Token} |
|
||
|
|
|
||
|
|
### URL Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
### Data Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
> {success} Success Response
|
||
|
|
|
||
|
|
####Code `200`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"data": [
|
||
|
|
{
|
||
|
|
"id": 11,
|
||
|
|
"sender_id": 2,
|
||
|
|
"receiver_id": 4,
|
||
|
|
"status": 0,
|
||
|
|
"created_at": "2022-01-20T10:31:33.000000Z",
|
||
|
|
"updated_at": "2022-01-20T10:40:16.000000Z",
|
||
|
|
"deleted_at": null,
|
||
|
|
"users": {
|
||
|
|
"id": 4,
|
||
|
|
"uuid": "58330871-16c3-4843-97d7-d3ee371446da",
|
||
|
|
"name": "Test",
|
||
|
|
"email": "test@gj.com",
|
||
|
|
"email_hash": "9e77c62b589b3ae5ea0d9ea58b907bfa",
|
||
|
|
"username": "42",
|
||
|
|
"country_code": null,
|
||
|
|
"mobile": null,
|
||
|
|
"dharma_id": 3,
|
||
|
|
"birth_date": "1997-05-10",
|
||
|
|
"gender": null,
|
||
|
|
"email_verified_at": null,
|
||
|
|
"mobile_verified_at": null,
|
||
|
|
"avatar": null,
|
||
|
|
"verification_confirmed": 1,
|
||
|
|
"status": 1,
|
||
|
|
"timezone": null,
|
||
|
|
"last_login_at": null,
|
||
|
|
"last_login_ip": null,
|
||
|
|
"created_at": "2022-01-20T10:44:41.000000Z",
|
||
|
|
"updated_at": "2022-01-20T10:44:41.000000Z",
|
||
|
|
"deleted_at": null
|
||
|
|
}
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"status": 200
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
> {danger} Unauthenticated Response
|
||
|
|
|
||
|
|
####Code `403`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"message": "Something went wrong!"
|
||
|
|
"status": 403
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
<a name="accept-request"></a>
|
||
|
|
## Friend Request Accept/Decline
|
||
|
|
|
||
|
|
Details for request accept/decline api
|
||
|
|
##
|
||
|
|
##
|
||
|
|
|
||
|
|
####Endpoint
|
||
|
|
|
||
|
|
> {warning} Please note that the URI for this endpoint should include api/{$version} before
|
||
|
|
|
||
|
|
| Method | URI | Headers |
|
||
|
|
| : | :- | : |
|
||
|
|
| POST | `user/accept-request` | Bearer {Token} |
|
||
|
|
|
||
|
|
### URL Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
### Data Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"receiver_id" : "2",
|
||
|
|
"status" : 1
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
> {success} Success Response
|
||
|
|
|
||
|
|
####Code `200`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"message": "Friend request accepted successfully.",
|
||
|
|
"status": 200
|
||
|
|
}
|
||
|
|
```
|
||
|
|
> {danger} Unauthenticated Response
|
||
|
|
|
||
|
|
####Code `403`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"message": "Something went wrong!"
|
||
|
|
"status": 403
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
<a name="send-request"></a>
|
||
|
|
## Friend Request Send
|
||
|
|
|
||
|
|
Details for send request api
|
||
|
|
##
|
||
|
|
##
|
||
|
|
|
||
|
|
####Endpoint
|
||
|
|
|
||
|
|
> {warning} Please note that the URI for this endpoint should include api/{$version} before
|
||
|
|
|
||
|
|
| Method | URI | Headers |
|
||
|
|
| : | :- | : |
|
||
|
|
| POST | `user/send-request` | Bearer {Token} |
|
||
|
|
|
||
|
|
### URL Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
### Data Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"receiver_id" : "3"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
> {success} Success Response
|
||
|
|
|
||
|
|
####Code `200`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"message": "Friend request sent successfully.",
|
||
|
|
"status": 200
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
> {danger} Unauthenticated Response
|
||
|
|
|
||
|
|
####Code `403`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"message": "Something went wrong!"
|
||
|
|
"status": 403
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
<a name="friend-list"></a>
|
||
|
|
## My Friend List
|
||
|
|
|
||
|
|
Details for my friend list
|
||
|
|
##
|
||
|
|
##
|
||
|
|
|
||
|
|
####Endpoint
|
||
|
|
|
||
|
|
> {warning} Please note that the URI for this endpoint should include api/{$version} before
|
||
|
|
|
||
|
|
| Method | URI | Headers |
|
||
|
|
| : | :- | : |
|
||
|
|
| GET | `user/friend-list` | Bearer {Token} |
|
||
|
|
|
||
|
|
### URL Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
### Data Params
|
||
|
|
|
||
|
|
```php
|
||
|
|
None
|
||
|
|
```
|
||
|
|
|
||
|
|
> {success} Success Response
|
||
|
|
|
||
|
|
####Code `200`
|
||
|
|
####Content
|
||
|
|
```php
|
||
|
|
{
|
||
|
|
"data": [
|
||
|
|
{
|
||
|
|
"id": 3,
|
||
|
|
"name": "Name",
|
||
|
|
"avatar": "http://global-jain.test/storage/images/users/1643351730.png",
|
||
|
|
"is_friend_request_sent": true,
|
||
|
|
"pivot": {
|
||
|
|
"sender_id": 1,
|
||
|
|
"receiver_id": 3,
|
||
|
|
"created_at": "2022-02-18T06:23:14.000000Z",
|
||
|
|
"updated_at": "2022-02-18T06:23:34.000000Z",
|
||
|
|
"status": 1
|
||
|
|
},
|
||
|
|
"user_detail": [
|
||
|
|
{
|
||
|
|
"id": 1,
|
||
|
|
"user_id": 3,
|
||
|
|
"jati_id": 1,
|
||
|
|
"profession": "0",
|
||
|
|
"profession_speciality": "aaaaa",
|
||
|
|
"location": null,
|
||
|
|
"longitude": null,
|
||
|
|
"latitude": null,
|
||
|
|
"native_place": null,
|
||
|
|
"native_longitude": null,
|
||
|
|
"native_latitude": null,
|
||
|
|
"mother_tongue": null,
|
||
|
|
"marital_status": null,
|
||
|
|
"marriage_anniversary": null,
|
||
|
|
"qualification": null,
|
||
|
|
"company_name": null,
|
||
|
|
"mother_tongue_privacy": 1,
|
||
|
|
"jati_privacy": 1,
|
||
|
|
"marital_status_privacy": 1,
|
||
|
|
"marriage_anniversary_privacy": 1,
|
||
|
|
"location_privacy": 1,
|
||
|
|
"native_place_privacy": 1,
|
||
|
|
"qualification_privacy": 1,
|
||
|
|
"profession_privacy": 1,
|
||
|
|
"company_name_privacy": 1,
|
||
|
|
"profession_speciality_privacy": 1,
|
||
|
|
"created_at": "2022-01-28T06:35:31.000000Z",
|
||
|
|
"updated_at": "2022-01-28T06:35:31.000000Z",
|
||
|
|
"deleted_at": null
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"id": 2,
|
||
|
|
"name": "Admina",
|
||
|
|
"avatar": "http://global-jain.test/images/misc/placeholder.png",
|
||
|
|
"is_friend_request_sent": true,
|
||
|
|
"pivot": {
|
||
|
|
"sender_id": 1,
|
||
|
|
"receiver_id": 2,
|
||
|
|
"created_at": "2022-02-18T06:23:14.000000Z",
|
||
|
|
"updated_at": "2022-02-18T06:23:34.000000Z",
|
||
|
|
"status": 1
|
||
|
|
},
|
||
|
|
"user_detail": []
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"status": 200
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|