diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 774564a..3423565 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -11,12 +11,9 @@ - - - - - - + + + diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index 64e0d59..14852e5 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -12,8 +12,10 @@ class DefaultController extends AbstractController public function index(): Response { + // TODO merge all these post list and deduplicate them $url = "https://mastodon.cipherbliss.com/api/v1/timelines/public?remote=false&allow_local_only=true&only_media=true"; -// $url = "https://mastodon.cipherbliss.com/api/v1/timelines/tag/art&only_media=true"; + $url = "https://mastodon.cipherbliss.com/api/v1/timelines/tag/art"; + $url = "https://mastodon.cipherbliss.com/api/v1/timelines/tag/mastoart"; $client = new \GuzzleHttp\Client(); $response = $client->request('GET', $url ); diff --git a/templates/default/index.html.twig b/templates/default/index.html.twig index febb436..17861ca 100644 --- a/templates/default/index.html.twig +++ b/templates/default/index.html.twig @@ -6,52 +6,76 @@
-

Hello {{ controller_name }}! ✅

- - le truc par défaut +

Découverte d'artistes sur mastodon

{{ data | length }} Images

- {{ (data) | length }} + {# {{ (data) | length }}#}
-

liste des images

- {% for img in (data) %} -{# {{ img }}#} - {{ img.media_attachments | length }} - {% for media in img.media_attachments %} - +

liste des images

+ {% for img in (data) %} + {# {{ img }}#} + {# {{ img.media_attachments | length }}#} + {% for media in img.media_attachments %} +
+
- image - - {{ img.account.acct }} - - + + image + + {{ img.account.acct }} + +
+ + {% endfor %} {% endfor %} - {% endfor %}
-

debug

- {{ dump(data) }} +{#

debug

#} +{# {{ dump(data) }}#}