api code global jain

This commit is contained in:
Abhishek Mali
2025-11-05 10:37:10 +05:30
commit 52fe7e2bec
2834 changed files with 1784903 additions and 0 deletions

View File

@@ -0,0 +1,346 @@
<a name="send-message"></a>
## Send message information
Details for the sending message information
##
##
####Endpoint
> {warning} Please note that the URI for this endpoint only should not include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| POST | `/user/send-message` | Authorization : Bearer {token} |
### URL Params
```php
None
```
### Data Params
```php
{
"receiver_id" : 1,
"message" : "Hello",
"type": 0,
"status": 0
}
```
> {success} Success Response
####Code `200`
####Content
```php
{
"notification": {
"userToken": "1|jdbQbjnknDdvfNkcasqdscdvAxvsv",
"title": "Anurag", // or "New Message" (if the user is not registered)
"body": "Hello",
"avatar": "http://fssevefesgvsv.jpg",
"extraData": {
"id": 1,
"avatar": "http://fssevefesgvsv.jpg",
"user_id": 104,
"name": "Anurag",
"unread_count": 2,
"message": "Hello",
"created_at": "2020-08-12 04:38:40",
"os": "Android",
"type": "New Message"
}
},
"message": "Message sent successfully!"
}
```
> {danger} Unauthenticated Response
####Code `403` or `404`
####Content
```php
{
"message": "Something went wrong!"
}
```
<a name="message-thread-list"></a>
## Message thread list information
Details for the message thread list information
##
##
####Endpoint
> {warning} Please note that the URI for this endpoint only should not include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| GET | `/user/message-thread-list` | Authorization : Bearer {token} |
### URL Params
```php
None
```
### Data Params
```php
{
"name": "Man"
}
```
> {success} Success Response
####Code `200`
####Content
```php
{
"data": [
{
"id": 1,
"user_id": 1,
"avatar": null,
"avatar_url": null,
"name": "Superadmin",
"created_at": "2020/08/12 04:38:40",
"message": "Hello",
"unread_count": 0
}
]
}
```
> {danger} Unauthenticated Response
####Code `403` or `404`
####Content
```php
{
"message": "Something went wrong!"
}
```
<a name="message-list"></a>
## Message list information
Details for the message list information
##
##
####Endpoint
> {warning} Please note that the URI for this endpoint only should not include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| GET | `/user/message-list/{receiver_id}` | Authorization : Bearer {token} |
### URL Params
```php
1 //Receiver's Id
```
### Data Params
```php
None
```
> {success} Success Response
####Code `200`
####Content
```php
{
"data": {
"current_page": 1,
"data": [
{
"user_id": 104,
"message": "Hello",
"created_at": "2020-08-12T04:38:40.000000Z"
},
{
"user_id": 104,
"message": "Hey",
"created_at": "2020-08-10T11:27:52.000000Z"
}
],
"first_page_url": "http://127.0.0.1:8000/api/v1/user/message-list/1?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://127.0.0.1:8000/api/v1/user/message-list/1?page=1",
"next_page_url": null,
"path": "http://127.0.0.1:8000/api/v1/user/message-list/1",
"per_page": 20,
"prev_page_url": null,
"to": 2,
"total": 2
}
}
```
> {danger} Unauthenticated Response
####Code `403` or `404`
####Content
```php
{
"message": "Something went wrong!"
}
```
<a name="search-message"></a>
## Search message information
Details for the search message information
##
##
####Endpoint
> {warning} Please note that the URI for this endpoint only should not include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| POST | `/user/search-message/{receiver_id}` | Authorization : Bearer {token} |
### URL Params
```php
1 //Receiver's Id
```
### Data Params
```php
{
"message":"he"
}
```
> {success} Success Response
####Code `200`
####Content
```php
{
"message": [
{
"user_id": 104,
"message": "Hey",
"created_at": "2020-08-10T11:27:52.000000Z"
},
{
"user_id": 104,
"message": "Hello",
"created_at": "2020-08-12T04:38:40.000000Z"
}
]
}
```
> {danger} Unauthenticated Response
####Code `403` or `404`
####Content
```php
{
"message": "Something went wrong!"
}
```
<a name="clear-message"></a>
## Clear message information
Details for the clear message information
##
##
####Endpoint
> {warning} Please note that the URI for this endpoint only should not include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| DELETE | `/user/clear-message/{receiver_id}` | Authorization : Bearer {token} |
### URL Params
```php
1 //Receiver's Id
```
### Data Params
```php
None
```
> {success} Success Response
####Code `200`
####Content
```php
{
"message": "Messages cleared successfully!"
}
```
> {danger} Unauthenticated Response
####Code `403` or `404`
####Content
```php
{
"message": "Something went wrong!"
}
```
<a name="delete-thread"></a>
## Delete message thread information
Details for the delete message thread information
##
##
####Endpoint
> {warning} Please note that the URI for this endpoint only should not include api/{$version} before
| Method | URI | Headers |
| : | :- | : |
| DELETE | `/user/delete-thread/{receiver_id}` | Authorization : Bearer {token} |
### URL Params
```php
1 //Receiver's Id
```
### Data Params
```php
None
```
> {success} Success Response
####Code `200`
####Content
```php
{
"message": "Message thread deleted successfully!"
}
```
> {danger} Unauthenticated Response
####Code `403` or `404`
####Content
```php
{
"message": "Something went wrong!"
}
```