{
"status": "FOUND",
...
}
{
"status": "ERROR",
...
}
https://api.tildacdn.info/v1/getprojectslist/?publickey=00000000000000000000&secretkey=00000000000000000000
{
"status": "FOUND",
"result": [
{
"id": "0",
"title": "First Project",
"descr": "Some info"
},
{
"id": "1",
"title": "Second Project",
"descr": ""
},
...
]
}
https://api.tildacdn.info/v1/getprojectinfo/?publickey=00000000000000000000&secretkey=00000000000000000000&projectid=0
{
"status": "FOUND",
"result": {
"id": "0",
"title": "Project title",
"descr": "",
"customdomain": "project.com",
"export_csspath": "",
"export_jspath": "",
"export_imgpath": "",
"indexpageid": "0",
"customcsstext": "y",
"favicon": "",
"page404id": "0",
"images": [
{
"from": "",
"to": ""
}
...
]
}
}
https://api.tildacdn.info/v1/getpageslist/?publickey=00000000000000000000&secretkey=00000000000000000000&projectid=0
{
"status": "FOUND",
"result": [
{
"id": "1001",
"projectid": "0",
"title": "Page title first",
"descr": "",
"img": "",
"featureimg": "",
"alias": "",
"date": "2014-05-16 14:45:53",
"sort": "80",
"published": "1419702868",
"filename": "page1001.html"
},
{
"id": "1002",
"projectid": "0",
"title": "Page title second",
"descr": "",
"img": "",
"featureimg": "",
"alias": "",
"date": "2014-05-17 10:50:00",
"sort": "90",
"published": "1419702277",
"filename": "page1002.html"
},
...
]
}
https://api.tildacdn.info/v1/getpage/?publickey=00000000000000000000&secretkey=00000000000000000000&pageid=1001
{
"status": "FOUND",
"result": {
"id": "1001",
"projectid": "0",
"title": "Page title",
"descr": "",
"img": "",
"featureimg": "",
"alias": "",
"date": "2014-05-16 14:45:53",
"sort": "80",
"published": "1419702868",
"html": "some html page code",
"filename": "page1001.html",
"js": [
...
],
"css": [
...
]
}
}
https://api.tildacdn.info/v1/getpagefull/?publickey=00000000000000000000&secretkey=00000000000000000000&pageid=1001
{
"status": "FOUND",
"result": {
"id": "1001",
"projectid": "0",
"title": "Page title",
"descr": "",
"img": "",
"featureimg": "",
"alias": "",
"date": "2014-05-16 14:45:53",
"sort": "80",
"published": "1419702868",
"html": "some html page code",
"filename": "page1001.html"
}
}
https://api.tildacdn.info/v1/getpageexport/?publickey=00000000000000000000&secretkey=00000000000000000000&pageid=1001
{
"status": "FOUND",
"result": {
"id": "1001",
"projectid": "0",
"title": "Page title",
"descr": "",
"img": "",
"featureimg": "",
"alias": "",
"date": "2014-05-16 14:45:53",
"sort": "80",
"published": "1419702868",
"images": [
{
"from": "",
"to": ""
},
{
"from": "",
"to": ""
},
{
"from": "",
"to": ""
}
],
"js": [
{
"from": "",
"to": "",
"attrs": [
"async"
]
},
{
"from": "",
"to": "",
"attrs": [
"defer"
]
},
{
"from": "",
"to": "",
"attrs": [
"nomodule"
]
}
],
"html": "body page html-code with local links to files",
"filename": "page1001.html"
}
}
https://api.tildacdn.info/v1/getpagefullexport/?publickey=00000000000000000000&secretkey=00000000000000000000&pageid=1001
{
"status": "FOUND",
"result": {
"id": "1001",
"projectid": "0",
"title": "Page title",
"descr": "",
"img": "",
"featureimg": "",
"alias": "",
"date": "2014-05-16 14:45:53",
"sort": "80",
"published": "1419702868",
"images": [
{
"from": "",
"to": ""
},
{
"from": "",
"to": ""
},
{
"from": "",
"to": ""
}
],
"html": "full page html-code with local links to files",
"filename": "page1001.html"
}
}
Se il progetto non è molto carico e non si desidera salvare file statici sul server, utilizzare la richiesta getpage che restituisce il codice HTML del corpo. Le immagini saranno caricate dal server Tilda . L'importante è ricordarsi di aggiungere i file JS e CSS al template. L'elenco di questi file viene restituito nelle variabili js e css della risposta alla richiesta.
$result = file_get_contents('https://api.tildacdn.info/v1/getprojectinfo/?publickey=00000000000000000000&secretkey=00000000000000000000&projectid=0');
$project = json_decode($result, true);
print_r($progetto);