mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
meta
-> pagination
This commit is contained in:
parent
55c5ea521a
commit
0b7874c50a
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class AnimeCollection extends ResourceCollection
|
class AnimeCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -34,6 +35,20 @@ class AnimeCollection extends ResourceCollection
|
|||||||
*/
|
*/
|
||||||
public $collects = 'App\Http\Resources\V4\AnimeResource';
|
public $collects = 'App\Http\Resources\V4\AnimeResource';
|
||||||
|
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the resource collection into an array.
|
* Transform the resource collection into an array.
|
||||||
*
|
*
|
||||||
@ -42,6 +57,16 @@ class AnimeCollection extends ResourceCollection
|
|||||||
*/
|
*/
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return $this->collection;
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
|
'data' => $this->collection
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class CharacterCollection extends ResourceCollection
|
class CharacterCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -34,6 +35,20 @@ class CharacterCollection extends ResourceCollection
|
|||||||
*/
|
*/
|
||||||
public $collects = 'App\Http\Resources\V4\CharacterResource';
|
public $collects = 'App\Http\Resources\V4\CharacterResource';
|
||||||
|
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the resource collection into an array.
|
* Transform the resource collection into an array.
|
||||||
*
|
*
|
||||||
@ -43,7 +58,15 @@ class CharacterCollection extends ResourceCollection
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
'data' => $this->collection
|
'data' => $this->collection
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class ClubCollection extends ResourceCollection
|
class ClubCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -49,10 +50,39 @@ class ClubCollection extends ResourceCollection
|
|||||||
* }
|
* }
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transform the resource collection into an array.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
'data' => $this->collection
|
'data' => $this->collection
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class MagazineCollection extends ResourceCollection
|
class MagazineCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -36,10 +37,38 @@ class MagazineCollection extends ResourceCollection
|
|||||||
* ),
|
* ),
|
||||||
* ),
|
* ),
|
||||||
*/
|
*/
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transform the resource collection into an array.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
'data' => $this->collection
|
'data' => $this->collection
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class MangaCollection extends ResourceCollection
|
class MangaCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -36,6 +37,20 @@ class MangaCollection extends ResourceCollection
|
|||||||
*/
|
*/
|
||||||
public $collects = 'App\Http\Resources\V4\MangaResource';
|
public $collects = 'App\Http\Resources\V4\MangaResource';
|
||||||
|
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the resource collection into an array.
|
* Transform the resource collection into an array.
|
||||||
*
|
*
|
||||||
@ -45,7 +60,15 @@ class MangaCollection extends ResourceCollection
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
'data' => $this->collection
|
'data' => $this->collection
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
|
}
|
||||||
}
|
}
|
@ -15,9 +15,11 @@ class NewsResource extends JsonResource
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'last_visible_page' => $this['last_visible_page'] ?? null,
|
'pagination' => [
|
||||||
'has_next_page' => $this['has_next_page'] ?? false,
|
'last_visible_page' => $this['last_visible_page'] ?? 1,
|
||||||
'results' => $this['results']
|
'has_next_page' => $this['has_next_page'] ?? false,
|
||||||
|
],
|
||||||
|
'data' => $this['results'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class PersonCollection extends ResourceCollection
|
class PersonCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -30,6 +31,20 @@ class PersonCollection extends ResourceCollection
|
|||||||
*/
|
*/
|
||||||
public $collects = 'App\Http\Resources\V4\PersonResource';
|
public $collects = 'App\Http\Resources\V4\PersonResource';
|
||||||
|
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform the resource collection into an array.
|
* Transform the resource collection into an array.
|
||||||
*
|
*
|
||||||
@ -39,7 +54,15 @@ class PersonCollection extends ResourceCollection
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
'data' => $this->collection
|
'data' => $this->collection
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@
|
|||||||
namespace App\Http\Resources\V4;
|
namespace App\Http\Resources\V4;
|
||||||
|
|
||||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
|
|
||||||
class ProducerCollection extends ResourceCollection
|
class ProducerCollection extends ResourceCollection
|
||||||
{
|
{
|
||||||
@ -36,10 +37,38 @@ class ProducerCollection extends ResourceCollection
|
|||||||
* ),
|
* ),
|
||||||
* ),
|
* ),
|
||||||
*/
|
*/
|
||||||
|
private $pagination;
|
||||||
|
|
||||||
|
public function __construct(LengthAwarePaginator $resource)
|
||||||
|
{
|
||||||
|
$this->pagination = [
|
||||||
|
'last_visible_page' => $resource->lastPage(),
|
||||||
|
'has_next_page' => $resource->hasMorePages()
|
||||||
|
];
|
||||||
|
|
||||||
|
$this->collection = $resource->getCollection();
|
||||||
|
|
||||||
|
parent::__construct($resource);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transform the resource collection into an array.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
'pagination' => $this->pagination,
|
||||||
'data' => $this->collection
|
'data' => $this->collection
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function withResponse($request, $response)
|
||||||
|
{
|
||||||
|
$jsonResponse = json_decode($response->getContent(), true);
|
||||||
|
unset($jsonResponse['links'],$jsonResponse['meta']);
|
||||||
|
$response->setContent(json_encode($jsonResponse));
|
||||||
|
}
|
||||||
}
|
}
|
@ -15,7 +15,7 @@ class ResultsResource extends JsonResource
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page' => $this['last_visible_page'] ?? 1,
|
'last_visible_page' => $this['last_visible_page'] ?? 1,
|
||||||
'has_next_page' => $this['has_next_page'] ?? false,
|
'has_next_page' => $this['has_next_page'] ?? false,
|
||||||
],
|
],
|
||||||
|
@ -47,7 +47,7 @@ class ReviewsResource extends JsonResource
|
|||||||
public function toArray($request)
|
public function toArray($request)
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page' => $this['last_visible_page'],
|
'last_visible_page' => $this['last_visible_page'],
|
||||||
'has_next_page' => $this['has_next_page'],
|
'has_next_page' => $this['has_next_page'],
|
||||||
],
|
],
|
||||||
|
@ -177,7 +177,7 @@ class AnimeControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/anime/1/episodes')
|
$this->get('/v4/anime/1/episodes')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -199,7 +199,7 @@ class AnimeControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/anime/21/episodes?page=2')
|
$this->get('/v4/anime/21/episodes?page=2')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJson([
|
->seeJson([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -251,7 +251,7 @@ class AnimeControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/anime/1/news')
|
$this->get('/v4/anime/1/news')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -385,7 +385,7 @@ class AnimeControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/anime/1/reviews')
|
$this->get('/v4/anime/1/reviews')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -424,7 +424,7 @@ class AnimeControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/anime/1/reviews?page=100')
|
$this->get('/v4/anime/1/reviews?page=100')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -468,7 +468,7 @@ class AnimeControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/anime/1/userupdates')
|
$this->get('/v4/anime/1/userupdates')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
@ -56,7 +56,7 @@ class ClubControllerTest extends TestCase
|
|||||||
$this->get('/v4/club/1/members')
|
$this->get('/v4/club/1/members')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
@ -113,7 +113,7 @@ class MangaControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/manga/1/news')
|
$this->get('/v4/manga/1/news')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -212,7 +212,7 @@ class MangaControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/manga/1/reviews')
|
$this->get('/v4/manga/1/reviews')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -250,7 +250,7 @@ class MangaControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/manga/1/reviews?page=100')
|
$this->get('/v4/manga/1/reviews?page=100')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -294,7 +294,7 @@ class MangaControllerV4Test extends TestCase
|
|||||||
$this->get('/v4/manga/1/userupdates')
|
$this->get('/v4/manga/1/userupdates')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
@ -8,7 +8,7 @@ class RecommendationsControllerTest extends TestCase
|
|||||||
$this->get('/v4/recommendations/anime')
|
$this->get('/v4/recommendations/anime')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
@ -8,7 +8,7 @@ class ReviewsControllerTest extends TestCase
|
|||||||
$this->get('/v4/reviews/anime')
|
$this->get('/v4/reviews/anime')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -70,7 +70,7 @@ class ReviewsControllerTest extends TestCase
|
|||||||
$this->get('/v4/reviews/manga')
|
$this->get('/v4/reviews/manga')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
@ -188,7 +188,7 @@ class UserControllerTest extends TestCase
|
|||||||
$this->get('/v4/users/nekomata1037/friends')
|
$this->get('/v4/users/nekomata1037/friends')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -346,7 +346,7 @@ class UserControllerTest extends TestCase
|
|||||||
$this->get('/v4/users/xinil/recommendations')
|
$this->get('/v4/users/xinil/recommendations')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -382,7 +382,7 @@ class UserControllerTest extends TestCase
|
|||||||
$this->get('/v4/users/xinil/recommendations?page=200')
|
$this->get('/v4/users/xinil/recommendations?page=200')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -396,7 +396,7 @@ class UserControllerTest extends TestCase
|
|||||||
$this->get('/v4/users/xinil/reviews')
|
$this->get('/v4/users/xinil/reviews')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -446,7 +446,7 @@ class UserControllerTest extends TestCase
|
|||||||
$this->get('/v4/users/nekomata1037/clubs')
|
$this->get('/v4/users/nekomata1037/clubs')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
@ -8,7 +8,7 @@ class WatchControllerTest extends TestCase
|
|||||||
$this->get('/v4/watch/episodes')
|
$this->get('/v4/watch/episodes')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -48,7 +48,7 @@ class WatchControllerTest extends TestCase
|
|||||||
$this->get('/v4/watch/popular')
|
$this->get('/v4/watch/popular')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -91,7 +91,7 @@ class WatchControllerTest extends TestCase
|
|||||||
$this->get('/v4/watch/promos')
|
$this->get('/v4/watch/promos')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
@ -136,7 +136,7 @@ class WatchControllerTest extends TestCase
|
|||||||
$this->get('/v4/watch/popular')
|
$this->get('/v4/watch/popular')
|
||||||
->seeStatusCode(200)
|
->seeStatusCode(200)
|
||||||
->seeJsonStructure([
|
->seeJsonStructure([
|
||||||
'meta' => [
|
'pagination' => [
|
||||||
'last_visible_page',
|
'last_visible_page',
|
||||||
'hast_next_page',
|
'hast_next_page',
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user