I received a list of JSON objects, joined by \n separators.
Splitting at \n gave me a list of JSON objects that look ready for the web block that decodes JSON as dictionaries.
[/quote]
I replicated it but no response at all
I received a list of JSON objects, joined by \n separators.
Splitting at \n gave me a list of JSON objects that look ready for the web block that decodes JSON as dictionaries.
[/quote]
I replicated it but no response at all
And if you specify user neio?
I logged on to lichess.org and set up an account for myself, then did two puzzles.
I generated a personal token that only has permission to see the puzzles that I did, and
pasted the token into a block.
It worked the first time:
So I am guessing you need to add a token or have overstayed your welcome at lichess.org
Thank you very much for the effort ABG. I already have a Token and user name but I think that the problem is with the smartphone. I tested the app in an emulator and it works. What could be the problem with my device? I tested in another device without success.
For me it works with companion. Check documentation for response type, for example users public data is in json format
I found the solution in order to make it work in my smartphone after app installation.
I added the following block:
Now it works.
Thanks for telling us the solution.
I am not happy with AI2's lack of error reporting for this case.
Would you mind exposing the Web1.GotText responseCode value for the case where INTERNET permission is denied?
Also include a Web1.Timeout event to announce if that fired under those circumstances?
Screen1.PermissionDenied event?
Screen1.ErrorOccured?
"Internet" is a non dangerous permission and usually therefore you do not have to ask for that permission
Which Android device and Android version are you using for your tests?
Taifun
I thought that I solved the problem but I did not. When the ndjson response start and end I can read it but the problem is when the response is streaming without end, the block Web1.GotText get stuck and can not even read responseCode.
For example with request for https://lichess.org/api/tv/feed
The response is streaming of ndjson
I've never seen AI2 used in an online streaming situation.
Has any one else on the board seen or done this?
Can someone help to display streaming of text?
What does the api documentation say about handling the stream?
What happens if you make the call in a webview (html) and set the "stream" to a div (which you could then set to a webviewstring at intervals). You could test this in a computer browser...
You would probably need javascript and "fetch", but may hit CORS errors...
Some ideas here