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
|
|
|
*
|
|
|
|
* An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
|
|
|
|
*
|
|
|
|
* PHP version 7
|
|
|
|
*
|
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>
|
2017-01-11 10:30:53 -05:00
|
|
|
* @copyright 2015 - 2017 Timothy J. Warren
|
2016-12-20 12:55:43 -05:00
|
|
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
|
|
|
* @version 4.0
|
|
|
|
* @link https://github.com/timw4mail/HummingBirdAnimeClient
|
2017-01-11 10:34:24 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Aviat\AnimeClient\API;
|
2016-12-20 12:55:43 -05:00
|
|
|
|
2017-02-08 15:48:20 -05:00
|
|
|
use Amp\Artax\Request;
|
2017-01-06 21:39:01 -05:00
|
|
|
|
2016-12-20 12:55:43 -05:00
|
|
|
/**
|
|
|
|
* Common interface for anime and manga list item CRUD
|
|
|
|
*/
|
|
|
|
interface ListItemInterface {
|
2017-01-06 21:39:01 -05:00
|
|
|
|
2016-12-20 12:55:43 -05:00
|
|
|
/**
|
|
|
|
* Create a list item
|
|
|
|
*
|
2017-01-06 21:39:01 -05:00
|
|
|
* @param array $data -
|
2016-12-20 12:55:43 -05:00
|
|
|
* @return bool
|
|
|
|
*/
|
2017-02-08 15:48:20 -05:00
|
|
|
public function create(array $data): Request;
|
2017-01-06 21:39:01 -05:00
|
|
|
|
2016-12-20 12:55:43 -05:00
|
|
|
/**
|
|
|
|
* Retrieve a list item
|
|
|
|
*
|
|
|
|
* @param string $id - The id of the list item
|
2017-01-06 21:39:01 -05:00
|
|
|
* @return array
|
2016-12-20 12:55:43 -05:00
|
|
|
*/
|
|
|
|
public function get(string $id): array;
|
2017-01-06 21:39:01 -05:00
|
|
|
|
2016-12-20 12:55:43 -05:00
|
|
|
/**
|
|
|
|
* Update a list item
|
2017-01-06 21:39:01 -05:00
|
|
|
*
|
2016-12-21 12:46:20 -05:00
|
|
|
* @param string $id - The id of the list item to update
|
|
|
|
* @param array $data - The data with which to update the list item
|
2017-01-06 21:39:01 -05:00
|
|
|
* @return Response
|
2016-12-20 12:55:43 -05:00
|
|
|
*/
|
2017-02-08 15:48:20 -05:00
|
|
|
public function update(string $id, array $data): Request;
|
2017-01-06 21:39:01 -05:00
|
|
|
|
2016-12-20 12:55:43 -05:00
|
|
|
/**
|
|
|
|
* Delete a list item
|
|
|
|
*
|
|
|
|
* @param string $id - The id of the list item to delete
|
|
|
|
* @return bool
|
|
|
|
*/
|
2017-02-08 15:48:20 -05:00
|
|
|
public function delete(string $id): Request;
|
2016-12-20 12:55:43 -05:00
|
|
|
}
|