Skip to content

Commit

Permalink
Update documentation for new delete feature
Browse files Browse the repository at this point in the history
  • Loading branch information
apexdodge authored Jan 27, 2019
1 parent 06ff287 commit 6c04f85
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Api2Pdf.com is a REST API for instantly generating PDF documents from HTML, URLs
- [Resources](#resources)
- [Authorization](#authorization)
- [Usage](#usage)
- [Helper Methods](#helper-methods)
- [FAQ](https://www.api2pdf.com/faq)


## <a name="installation"></a>Installation

Add this repository to your Composer file:
Expand Down Expand Up @@ -224,3 +224,17 @@ To use the merge endpoint, supply a list of URLs to existing PDFs. The engine wi
$linksToPdfs = ['https://LINK-TO-PDF', 'https://LINK-TO-PDF'];
$mergeResult = $apiClient->merge($linksToPdfs)

---

## <a name="helper-methods"></a>Helper Methods

**delete($responseId)**

By default, Api2Pdf deletes your PDFs 24 hours after they have been generated. For developers who require higher levels of security and wish to delete their PDFs can make a DELETE request API call by using the `responseId` retrieved from the original request.

$result = $apiClient->headlessChromeFromHtml("<p>Hello World</p>");
$responseId = $result->getResponseId();
//delete pdf
$apiClient->delete($responseId);


0 comments on commit 6c04f85

Please sign in to comment.