Page 1 of 1

Unable to download data from tiggzi

Posted: Fri Dec 28, 2012 9:26 pm
by Brian Alford5352810

I have replaced the < & with [ & ] so that the code won't be treated as html in this window.
When run the alert does not show, also the tiggzi database shows no transaction occurred.
Can anyone see whats wrong with this?

[html]
[head]
[meta http-equiv="Content-Type" content="text/html; charset=windows-1252"]
[title]Json Test[/title]

[script type="text/javascript" src="jquery.js"]
$.getJSON("https://api.tiggzi.com/rest/1/db/coll...",
{
'X-Tiggzi-Database-Id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
'type': 'get',
'dataType': 'json',
'contentType': 'application/json'
},
function(tdata)
{
alert(tdata);
});
[/script]

Code: Select all

 [/head] 

[body]
[/Body]

[/html]


Unable to download data from tiggzi

Posted: Fri Dec 28, 2012 10:40 pm
by maxkatz

Check in the browser console what happens or Chrome Dev. Tools Network tab to see the request/response. Or, add error handler.


Unable to download data from tiggzi

Posted: Sat Dec 29, 2012 9:23 pm
by Brian Alford5352810

Surely Tiggzi database would want you to use itself and at least provide an example like the one below for Flickr.

The documents appear great but there are only minimal lines of code shown out of context. They show you what code to use, but where do you put it. I need to use them in a mobile app and a html page. In the previous post I needed to know if the way I'v structured it is correct.

[script type="text/javascript" src="jquery.js"]
$.getJSON("https://api.tiggzi.com/rest/1/db/coll...",
{
'X-Tiggzi-Database-Id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',
'type': 'get',
'dataType': 'json',
'contentType': 'application/json'
},
function(tdata)
{
alert('Hello world');
});
[/script]

Image


Unable to download data from tiggzi

Posted: Sat Dec 29, 2012 10:45 pm
by maxkatz

Our examples show how to use the Tiggzi Backend Services when building an app in Tiggzi app builder:

http://docs.tiggzi.com/tutorials/#Int...

Have you tried these?

Our docs provide what's called a curl command -- it shows you the correct request to send to Tiggzi database (without specific implementation such as JavaScript, PHP, Java, etc)