EnglishReferenceRepositories
NewsRepository v1.0.0
Methods for one API section.
Description: Methods for one API section.
Namespace: DevCraftClub\MyShows\Repository
Since: 1.0.0
See also:
Methods
get(NewsSearchFilter $filter): array
Description: Calls news.Get.
| Parameter | Type | Description |
|---|---|---|
$filter | NewsSearchFilter | — |
Returns: array
count(NewsSearchFilter $filter): int
Description: Calls news.Count.
| Parameter | Type | Description |
|---|---|---|
$filter | NewsSearchFilter | — |
Returns: int
getById(int $newsId): ?News
Description: Calls news.GetById.
| Parameter | Type | Description |
|---|---|---|
$newsId | int | — |
Returns: News
categories(): array
Description: Calls news.Categories.
Returns: array
comments(int $newsId): array
Description: Calls news.Comments.
| Parameter | Type | Description |
|---|---|---|
$newsId | int | — |
Returns: array
postComment(int $newsId, string $text, ?string $image = null, ?int $parentCommentId = null): NewsComment
Description: Calls news.PostComment.
| Parameter | Type | Description |
|---|---|---|
$newsId | int | — |
$text | string | — |
$image | ?string | — Default: null. |
$parentCommentId | ?int | — Default: null. |
Returns: NewsComment
updateComment(int $commentId, string $text, ?string $image = null, bool $deleteImage = false): NewsComment
Description: Calls news.UpdateComment.
| Parameter | Type | Description |
|---|---|---|
$commentId | int | — |
$text | string | — |
$image | ?string | — Default: null. |
$deleteImage | bool | — Default: false. |
Returns: NewsComment
deleteComment(int $commentId): void
Description: Calls news.DeleteComment.
| Parameter | Type | Description |
|---|---|---|
$commentId | int | — |
Returns: void