From 0c910bff1af137bb74fc5d9777ba14327130fb17 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Wed, 21 Dec 2016 12:46:20 -0500 Subject: [PATCH] Pull stuff from the Kitsu API --- app/config/cache.toml.example | 20 +++ app/views/anime/cover.php | 19 +-- app/views/main-menu.php | 4 +- composer.json | 3 +- index.php | 2 +- src/API/GuzzleTrait.php | 86 +++++++++++++ src/API/Kitsu/KitsuAnimeListItem.php | 43 +++++++ src/API/Kitsu/KitsuModel.php | 115 ++++++++++++++++++ src/API/Kitsu/KitsuTrait.php | 56 +++++++++ src/API/Kitsu/Model.php | 68 ----------- .../Transformer/AnimeListTransformer.php | 60 +++++---- src/API/ListInterface.php | 29 +++++ src/API/ListItemInterface.php | 4 +- src/Controller/Anime.php | 7 +- src/Model/Anime.php | 26 ++-- 15 files changed, 417 insertions(+), 125 deletions(-) create mode 100644 app/config/cache.toml.example create mode 100644 src/API/GuzzleTrait.php create mode 100644 src/API/Kitsu/KitsuAnimeListItem.php create mode 100644 src/API/Kitsu/KitsuModel.php create mode 100644 src/API/Kitsu/KitsuTrait.php delete mode 100644 src/API/Kitsu/Model.php create mode 100644 src/API/ListInterface.php diff --git a/app/config/cache.toml.example b/app/config/cache.toml.example new file mode 100644 index 00000000..283f45fa --- /dev/null +++ b/app/config/cache.toml.example @@ -0,0 +1,20 @@ +################################################################################ +# Cache Setup # +################################################################################ + +driver = "redis" + +[connection] +# Host or socket to connect to +host = "127.0.0.1" + +# Connection port +#port = 6379 + +# Connection password +#password = "" + +# Database number +database = 2 + +[options] \ No newline at end of file diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index fca4694d..5ca19c9d 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -1,20 +1,21 @@
-is_authenticated()): ?> +is_authenticated()): ?> Add Item - +

There's nothing here!

$items): ?> + */ ?>

html($name) ?>

- is_authenticated()) continue; ?> + is_authenticated()*/) continue; ?>
- is_authenticated()): ?> + is_authenticated()): ?> - + img($item['anime']['image']); ?>
- is_authenticated()): ?> + is_authenticated()): ?> - +
@@ -64,6 +65,6 @@
-is_authenticated()): ?> +is_authenticated()): ?> - + \ No newline at end of file diff --git a/app/views/main-menu.php b/app/views/main-menu.php index be89435e..ae0045ea 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -17,7 +17,7 @@ [Manga List] - is_authenticated()): ?> + is_authenticated()): ?>   @@ -29,7 +29,7 @@ Logout [get('whose_list') ?>'s Login] - +