How to view Json responses from an Api (newsapi for example) on a cardview

That kind of worked. I added the life.inventor.CardView.aix file to my Assets and now, in my Web1 block choices, I find MANY new function selections. But… no Call CardView1.Type2 selection.

Kodular Creator is an online platform. So I would expect that it would dynamically load the latest extension versions. This one here looks newer than the default version. But I suspect there may yet be an even newer one, to complete this JSON Guide. I see no mention of it in the CardView Docs.

Then found this Extensions Directory. Is this something I need to buy?

Thanks again @pepocero! I appreciate you taking the time to help me here.

I think you’re not installing the extension. I don’t know if you know how to install and use extensions.

Once the extension is installed you don’t have to search for it in Web1 blocks

You don’t have to upload the extension in assets.

You have to install the extension.

How to install an extension:






Then you have to drag the installed extension

Then you have to upload these files to assets:
Material Icon Regular
Roboto Medium


Where it says “FontIcon”, put the file “MaterialIconsRegular” (1).
Where it says “FontText” put the file RobotoRegular (2)

Now you should be able to see the blocks correctly:

1 Like

That worked!! You’ve gone above and beyond here, (especially with the step by steps how to install an extension.) MANY thanks!! From myself AND anyone else who might want to try this Guide.

I did find one error in the original code The one line Set Label1.text to get global decodeJson should read Set Label1.text to get response Content.

One last thing… Now that I’m getting the CardView populating correctly, I noticed the original screenshot, (at the very top of this thread), is scrollable. My current code does not scroll. When I get this working I will upload the finished .aia file for anyone else who is interested.

PS: @pepocero … if you send me a private message, I’ll put a little something in your payPal tip jar.

1 Like

For card views I always use the vertical scrolling arrangement.
image
But if it works for you without scrolling, use what works best for you.

There’s no need for that. I have learned a lot thanks to the community and the people who help and make guides and tutorials. It’s my way of returning to the community for everything I’ve learned…

2 Likes

Okay! Here it is! The finished project. One minor addition. After going to the newsapi.org site, you’ll need to enter your own ApiKey here.
enter apikey
Download the full project here:
JSON_example.aia (110.8 KB)

Again… many, many thanks to @pepocero.

2 Likes

3 posts were split to a new topic: Duplicate JSON thread

Hello greate koders I have tried to use the same method to get the Json text but I don’t know why I am getting this error instead of getting the same results as I get them on my Web browser.

On Web browser with Chrome Extension when I call this url with my API KEY I am getting this :point_down: :point_down: :point_down: :point_down:

But when I call the same URL on my app I don’t get JSON text instead it is like I am getting HTML codes like these

Please help me to solve this problem.

You are showing the return blocks. Your error must be in the request block.
Show us your POST Blocks.

I have used the same blocks as you can see here.


:pray:

You tested: in the url only the endpoint (www. Yourapi.com) and in the post pass the parameters?

Please I don’t understand would you kindly elaborate more or test this url from your end
http://newsapi.org/v2/top-headlines?q=tz&apiKey=afb399bb39ba4aae9350e26ae7e89a2f

Place the endpoint in web.url Place the parameters on the web.post
Url
www. endpoint . com?
POST
Key=tgghghhtgy
Join
&OtherParameter=fffgdhgjgghcb

How please can you show blocks?

I real don’t know how to do this if I can’t see the blocks. :cry:

Try :

https://community.kodular.io/search?q=Web%20post%20

You do not need to cry. Do some research.

Sure I trying to get your point means I have to create my own Json texts manually but please can you help me to know the end point and parameters which I have to post on Web Post?

Since this example can be different from mine.

image

1 Like

:point_up:
Thats all.

Now it’s up to you to use your brain. :thumbsup:

Sure I am now getting you but can you try to differentiate from this link which is the endpoint and the parameter
:point_down:
http://newsapi.org/v2/top-headlines?q=ke&apiKey=afb399bb39ba4aae950e26ae7e89a2f

Please :pray:

Newsapi has change, developer plan is granded for 30 days then you have to pay

Newsapi.org Terms of Use

If you see the the response type from newsapi is 403 indicating requests from the browser are not allowed on the Developer plan, except from localhost.

2 Likes

So what should I do? to solve this issue?