{
"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"
}
}
Si votre projet n'est pas très chargé et que vous ne souhaitez pas enregistrer de fichiers statiques sur votre serveur, utilisez la requête getpage qui renvoie le code HTML du corps. Les images seront chargées depuis le serveur Tilda . L'essentiel est de ne pas oublier d'ajouter des fichiers JS et CSS à votre modèle. La liste de ces fichiers est renvoyée dans les variables js et css de la réponse à la requête.
$result = file_get_contents('https://api.tildacdn.info/v1/getprojectinfo/?publickey=00000000000000000000&secretkey=00000000000000000000&projectid=0');
$project = json_decode($result, true) ;
print_r($project) ;