This call can be used to retrieve the list of font categories available from Thankster. You will get a JSON encoded array with id, type, font_name, and a font preview URL where you can see a rendering of the font.
Requirements:
URL Example:
https://www.thankster.com/api/v1/api_projects/listFonts?api_key=12345
PHP Code Example:
$url = 'https://www.thankster.com/api/v1/api_projects/listFonts?api_key=12345';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
var_dump(json_decode($response));
Response
When successful, Thankster's API will respond with a JSON encoded font list. Here's an example response:
[{"id":"523","type":"handwriting","font_name":"Americana","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=523"},{"id":"453","type":"handwriting","font_name":"Annette","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=453"},{"id":"758","type":"handwriting","font_name":"Applepie","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=758"},{"id":"256","type":"handwriting","font_name":"Arriviste","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=256"},{"id":"597","type":"handwriting","font_name":"Au Pair","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=597"},{"id":"607","type":"handwriting","font_name":"Augusta","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=607"},{"id":"459","type":"handwriting","font_name":"Big Billy","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=459"},{"id":"677","type":"handwriting","font_name":"Biggie Bold","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=677"},{"id":"448","type":"handwriting","font_name":"Billy the Builder","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=448"},{"id":"688","type":"handwriting","font_name":"Blinkers","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=688"},{"id":"563","type":"handwriting","font_name":"Bohemian","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=563"},{"id":"683","type":"handwriting","font_name":"Bold Hand","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=683"},{"id":"894","type":"handwriting","font_name":"Boyish","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=894"},{"id":"587","type":"handwriting","font_name":"Bricks","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=587"},{"id":"381","type":"handwriting","font_name":"Broadway","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=381"},{"id":"723","type":"handwriting","font_name":"Bubbles","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=723"},{"id":"867","type":"handwriting","font_name":"Businessman","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=867"},{"id":"728","type":"handwriting","font_name":"Buttercup","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=728"},{"id":"959","type":"handwriting","font_name":"Cherries","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=959"},{"id":"733","type":"handwriting","font_name":"Chicane","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=733"},{"id":"637","type":"handwriting","font_name":"Crony","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=637"},{"id":"647","type":"handwriting","font_name":"Davenport","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=647"},{"id":"438","type":"handwriting","font_name":"diva","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=438"},{"id":"3294","type":"handwriting","font_name":"diva crossouts","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=3294"},{"id":"703","type":"handwriting","font_name":"Dumpling","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=703"},{"id":"582","type":"handwriting","font_name":"El Mexicano","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=582"},{"id":"642","type":"handwriting","font_name":"Fat Cat","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=642"},{"id":"743","type":"handwriting","font_name":"Flimflam","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=743"},{"id":"1046","type":"handwriting","font_name":"Florida Righty","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=1046"},{"id":"662","type":"handwriting","font_name":"Frazzle Dazzle","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=662"},{"id":"718","type":"handwriting","font_name":"Fresh","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=718"},{"id":"476","type":"handwriting","font_name":"Freshman","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=476"},{"id":"163","type":"handwriting","font_name":"Gee Five","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=163"},{"id":"668","type":"handwriting","font_name":"Greenhorn","font_preview":"https:\/\/www.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=668"}]
If the call fails and the cause has been detected, the response may include a message as well. Here's an example:
{"status":"400","message":"Error: something went wrong while retrieving the fonts"}