HummingBirdAnimeClient/src/API/ListItemInterface.php

68 lines
1.5 KiB
PHP
Raw Normal View History

2016-12-20 12:55:43 -05:00
<?php declare(strict_types=1);
/**
2017-02-15 16:13:32 -05:00
* Hummingbird Anime List Client
2016-12-20 12:55:43 -05:00
*
2018-08-22 13:48:27 -04:00
* An API client for Kitsu to manage anime and manga watch lists
2016-12-20 12:55:43 -05:00
*
2018-10-01 11:35:51 -04:00
* PHP version 7.1
2016-12-20 12:55:43 -05:00
*
2017-02-15 16:13:32 -05:00
* @package HummingbirdAnimeClient
2016-12-20 12:55:43 -05:00
* @author Timothy J. Warren <tim@timshomepage.net>
2018-01-15 14:43:15 -05:00
* @copyright 2015 - 2018 Timothy J. Warren
2016-12-20 12:55:43 -05:00
* @license http://www.opensource.org/licenses/mit-license.html MIT License
2018-10-01 11:35:51 -04:00
* @version 4.1
* @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient
*/
namespace Aviat\AnimeClient\API;
2016-12-20 12:55:43 -05:00
use Amp\Artax\Request;
use Aviat\AnimeClient\Types\FormItemData;
2016-12-20 12:55:43 -05:00
/**
* Common interface for anime and manga list item CRUD
*/
interface ListItemInterface {
2016-12-20 12:55:43 -05:00
/**
* Create a list item
*
* @param array $data -
2018-01-16 14:58:07 -05:00
* @return Request
2016-12-20 12:55:43 -05:00
*/
public function create(array $data): Request;
2016-12-20 12:55:43 -05:00
/**
* Retrieve a list item
*
* @param string $id - The id of the list item
* @return array
2016-12-20 12:55:43 -05:00
*/
public function get(string $id): array;
/**
* Increase progress on a list item
*
* @param string $id
* @param FormItemData $data
* @return Request
*/
public function increment(string $id, FormItemData $data): Request;
2016-12-20 12:55:43 -05:00
/**
* Update a list item
*
2016-12-21 12:46:20 -05:00
* @param string $id - The id of the list item to update
* @param FormItemData $data - The data with which to update the list item
2018-01-16 14:58:07 -05:00
* @return Request
2016-12-20 12:55:43 -05:00
*/
public function update(string $id, FormItemData $data): Request;
2016-12-20 12:55:43 -05:00
/**
* Delete a list item
*
* @param string $id - The id of the list item to delete
2018-01-16 14:58:07 -05:00
* @return Request
2016-12-20 12:55:43 -05:00
*/
public function delete(string $id): Request;
2016-12-20 12:55:43 -05:00
}