URL
http://api.fonts.com/rest/{format}/Fonts/
http://api.fonts.com/rest/{format}/Fonts/
xml or json
DELETE
<?php
require_once('Services_WFS.php');
$services = new Services_WFS;
$apiKey = '[Your API Key]';
$publicKey = '[Your Public Key]';
$privateKey = '[Your Private Key]';
$services->setCredentials($publicKey, $privateKey, $apiKey);
$my_project_name = '[project name]';
$projectKey = $services->getProjectKeyByName($my_project_name);
$services->setProjectKey($projectKey);
$services->setAutoPublish(1); // do not auto publish
var_dump($services->removeFont(693796));
?>
private string DeleteFont(string fontId, string projectId,int publish, int pageStart = 0, int pageLimit = 10)
{
const string method = "DELETE";
string requestUri = "/rest/" + Format+ "/Fonts/" +
"?wfspid=" + projectId +
"&wfsfid=" + fontId +
"&wfsnopublish=" + publish +
"&wfspstart=" + pageStart +
"&wfsplimit=" + pageLimit;
//See common functions for GetResponse
return GetResponse(method, requestUri);
}
Private Function DeleteFont(ByVal fontId As String, ByVal projectId As String, ByVal publish As Integer, Optional ByVal pageStart As Integer = 0, Optional pageLimit As Integer = 10) As String
Const method As String = "DELETE"
Dim requestUri As String = "/rest/" & Format & "/Fonts/" & _
"?wfspid=" & projectId & _
"&wfsfid=" & fontId & _
"&wfsnopublish=" & publish & _
"&wfspstart=" & pageStart & _
"&wfsplimit=" & pageLimit
'See common functions for GetResponse
Return GetResponse(method, requestUri)
End Function
<Fonts>
<ProjectID>7bff9927-7964-4f6f-a132-adcae35ad51f</ProjectID>
<Message>Success</Message>
<Font>
<FontID>717698</FontID>
<FontName>Haarlem Black</FontName>
<FontPreviewTextLong>Quick Brown Fox Jumped Over The Lazy Dog</FontPreviewTextLong>
<FontFondryName>Monotype Imaging</FontFondryName>
<FontCSSName>Haarlem W01 Black</FontCSSName>
<FontLanguage></FontLanguage>
<FontSize></FontSize>
<CDNKey>d44f19a684109620e484147daf90e818082784eafd613082f04a2901e2fc90e07abf26e09077eeb422c4d34d256883d0</CDNKey>
<TTF>13425481-9ba7-47e0-ac3f-535bd4202000</TTF>
<EOT>eda0fd50-d523-418c-adfa-eafb47aaa57a</EOT>
<SVG>a4543614-4294-43bc-8480-ae21661ce4cf</SVG>
<WOFF>4fbcbe0b-8c97-4ce2-8bff-419f957a8981</WOFF>
<EnableSubsetting>false</EnableSubsetting>
</Font>
<TotalRecords>1</TotalRecords>
<PageStart>0</PageStart>
<PageLimit>10</PageLimit>
</Fonts>
{
"Fonts":{
"Font":{
"CDNKey":"d44f19a684109620e484147daf90e818082784eafd613082f04a2901e2fc90e07abf26e09077eeb422c4d34d256883d0",
"EnableSubsetting":"false",
"EOT":"eda0fd50-d523-418c-adfa-eafb47aaa57a",
"FontCSSName":"Haarlem W01 Black",
"FontFondryName":"Monotype Imaging",
"FontID":"717698",
"FontLanguage":null,
"FontName":"Haarlem Black",
"FontPreviewTextLong":"Quick Brown Fox Jumped Over The Lazy Dog",
"FontSize":null,
"SVG":"a4543614-4294-43bc-8480-ae21661ce4cf",
"TTF":"13425481-9ba7-47e0-ac3f-535bd4202000",
"WOFF":"4fbcbe0b-8c97-4ce2-8bff-419f957a8981"
},
"Message":"Success",
"PageLimit":"10",
"PageStart":"0",
"ProjectID":"7bff9927-7964-4f6f-a132-adcae35ad51f",
"TotalRecords":"1"
}
}