Get All Media
getMediaList
For getting all media you need to use getMediaList and provide the page and perPage for pagination.
Parameters
- page: (number) - The page number for pagination. Default:
1. - perPage: (number) - The number of items per page. Default:
20.
Returns
Promise<ResponseType<ConsultationType[]>>: A promise that resolves with an array of media objects.
Example
import { getMediaList } from 'react-native-altibbi';
getMediaList(1, 20).then((res) => {
console.log(res);
});
Responses
Status 200
Success
[
{
"id": "1234123",
"type": "image",
"name": "Test file",
"path": "doc/2024/02/05/60037901f47939872a6e1bdb9a65f604.png",
"extension": "png",
"size": 362875,
"url": "https://altibbi.com/Media/12123/2331.png"
}
]
Status 401
UnauthorizedHttpException represents an Unauthorized HTTP exception with status code 401.
{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials",
"code": "0",
"status": "401",
"type": "yii\\web\\UnauthorizedHttpException"
}