Forums
Home / Plugin: SportsPress - Sports Club & League Manager / Rest Api teams logo pull
(@ozgurgedikli)
2 years, 12 months ago
Hello there
The Rest api / wp-json / sportspress / v2 / Teams team logo only comes as a code. How do you achieve this visually?
Flutter Football UI Kit: LiveScore & Chats Matches & News Sport ( ANDROID, IOS ) I want to add club logos to the app
(@savvasha)
Hi @ozgurgedikli ,
What is the returned code of the API? Can you share an example?
Thanks, Savvas
Hello Bro,
Api rest url adress https://www.ascpanel.tk/wp-json/sportspress/v2/teams
team logo on Api “featured_media”: 86
if desired “logo”: https://www.ascpanel.tk/wp-content/uploads/2021/04/kangaroos-124×128-1.png
in the form.
If you add the ?_embed at the end of you request, the logo url will be returned. So use something like https://www.ascpanel.tk/wp-json/sportspress/v2/teams?_embed and then check for "wp:featuredmedia" array.
?_embed
https://www.ascpanel.tk/wp-json/sportspress/v2/teams?_embed
"wp:featuredmedia"
For more info check here: https://dalenguyen.medium.com/how-to-get-featured-image-from-wordpress-rest-api-5e023b9896c6
Hi Savas
Yes, the logo address came with apiler.
Thanks Özgür
(@rochesterj)
Awesome! I’m glad it’s resolved!
Let us know if you need anything else.
Kind Regards, -Roch