Page 2 of 2
RESTservice listview slow
Posted: Fri Jan 17, 2014 3:48 pm
by Hnto
A different problem I'm having is also trying to show an alert when the data collected from the RESTservice is less than 1. I've tried to use the code "data.length == 0" but that doesn't seem to work. I put this code in the Succes event from the data view.
RESTservice listview slow
Posted: Fri Jan 17, 2014 3:51 pm
by Hnto
Regarding data pagination: this option only works if the api you are receiving the data from supports 'limit' and 'skip', am I right?
RESTservice listview slow
Posted: Fri Jan 17, 2014 4:49 pm
by Kateryna Grynko
- Please check the console...
- No, this works for all services.
RESTservice listview slow
Posted: Sat Jan 18, 2014 12:04 am
by Hnto
Hello Katya, regarding 2 (this works for all services). I have an api that outputs data in xml format and I extract this data via RESTview, but when I add the two parameters limit and skip, the data still outputs more than the number I fill in in limit and skip.
RESTservice listview slow
Posted: Sat Jan 18, 2014 12:10 am
by maxkatz
Does it work (limit & skip) when you do a curl command?
RESTservice listview slow
Posted: Sat Jan 18, 2014 1:48 am
by Hnto
Hello Max, I don't use the Appery database. My API is on a website that's made with PHP to output data from a MYSQL database into xml format. So that's why I don't think limit and skip is possible. I've tried limit and skip in a curl command, it doesn't work either.
RESTservice listview slow
Posted: Sat Jan 18, 2014 3:28 am
by maxkatz
When you do a select against your database, you need to limit the number of objects you retrieve to send back to the client. I'm not sure there is any other way to make it work faster.
RESTservice listview slow
Posted: Sat Jan 18, 2014 3:34 pm
by Hnto
I found a solution that might work, but I don't know how to use appery code to do this. What I want is to count how much data is available with 'data.length' and when the data is more than 5, for example, it breaks the articles into seperate pages. I could use custom javascript to do this, but is there any appery code available for this?