karavidas jakolokoulos
Posts: 0
Joined: Thu Jan 08, 2015 10:29 pm

rest service create

hello there!a long time ago i ve started building an app about the greek elections..i ve asked the support for instructions and they've send me an e-mail providing some info,but i still have some questions!the site i want to take the data from is this: http://ekloges-prev.singularlogic.eu/... .they told me to create a rest service.how can i do it?and how will it take the data from the website to my application?

KorryRogers
Posts: 0
Joined: Fri Aug 15, 2014 2:53 am

rest service create

You can't take data straight off of a website and load it into your app. You need to get that data into some sort of database, or at the minimum JSON or XML files.

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

rest service create

Hi Karavidas,

Please, follow this instruction:
1) open console
2) open your page
3) navigate to network tab of console
4) you will see 3 requests http://gyazo.com/309ff5e6818e3c2e8ad3...
5) Click on the first one. You will see details of the request
http://gyazo.com/59d039a47b32f4189b53...
6) click on the preview. Looks like data that you needed
http://gyazo.com/4ac362ffffae15c6855f...
7) open appery project
8) click create
9) select service
10) select Rest service type and specify new name
11) Now we nee to copy url from the #5 without parameter
http://gyazo.com/efb8dfe1a07e6b0a5d1a...
12) in the request tab add your _dc parameter. for test purposes you can copy paste value from you site, but as we can see it is simple datestamp from Date.now function
http://gyazo.com/7f8c75c4e8020409ff1c...
http://gyazo.com/8019bd8017f5cc510084...
13) navigate to test tab and click test
http://gyazo.com/d90bf54efb67972a2c30...
Now you have data from only first request.
Make all steps for 2nd & 3rd requests.

karavidas jakolokoulos
Posts: 0
Joined: Thu Jan 08, 2015 10:29 pm

rest service create

first of all,you are GREAT!!thank you so so much!!you are number 1!!
i was able to build it with your instructions,and i also was able to map the data to the specific areas i needed them!i m going to buy the monthly standard plan,because i want to create more than 3 pages to completely build my app.
but i also have to ask!the Date.now function is great,but are the result static?i mean,how i would retrieve the "live" results when they ll start broadcasting them?it would be exactly the same as now,but i think that i ll have to use another function so it will take data live or periodically (lets say every 5 mins).do you have an idea of which i could use??i ll surely use Date.now for the results of the previous elections,but for monitoring the live??

karavidas jakolokoulos
Posts: 0
Joined: Thu Jan 08, 2015 10:29 pm

rest service create

i think that without the Date.now function it gets the data.so i ve built another rest service in which i request the page,i get the correct (i think) response,but i have absolutely no idea how to present them on the app page.i ve tried the grid,the text area,the input but none of them worked even if when i ve mapped the "success" to the module like shown on picture here: http://imageshack.com/a/img673/5186/t...

karavidas jakolokoulos
Posts: 0
Joined: Thu Jan 08, 2015 10:29 pm

rest service create

is it because the site i m taking data from is a javascript one?do i need to add some javascript code??

karavidas jakolokoulos
Posts: 0
Joined: Thu Jan 08, 2015 10:29 pm

rest service create

ok,i was able to present the data taken..but i want somehow to find out if it ll work or not,when the live data will start to transmit..there they ll transmit the live elections.will my app work?how can i make it keep changing the results on my app and synchronize them with the live?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

rest service create

Hi Karavidas,

Unfortunatly currently you current question is not clear for us.. Could you please specify some details?

Also - if you want just - sync some things between your app and your server - you just need to invoke certain service on the event you need.

Regards.

Return to “Issues”