Swiftpack.co - Package - aspose-html-cloud/aspose-html-cloud-swift

Aspose HTML Cloud SDK

This repository contains Aspose.HTML Cloud SDK source code. This SDK allows you to work with Aspose.HTML Cloud REST APIs in your applications quickly and easily.

See API Reference for full API specification.

How to use the SDK?

The complete source code is available in this repository folder, you can either directly use it in your project.

Requirements

  • mac OS X 10.12.6
  • XCode 9.2
  • Swift 4.0 and later
  • Alamofire 4.7.3 and later

Prerequisites

To use Aspose HTML for Cloud SDK you need to register an account with Aspose Cloud and lookup/create App Key and SID at Cloud Dashboard. There is free quota available. For more details, see Aspose Cloud Pricing.

Installation & Usage

Getting Started

Before create configuration, then use HtmlAPI or StorageAPI (see tests)

Example:

    ClientAPI.setConfig(
        basePath: "https://api.aspose.cloud/v1.1", 
        authPath: "https://api.aspose.cloud/oauth2/token", 
        apiKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 
        appSID: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", 
        debugging: true
    )

Documentation for API Endpoints

All URIs are relative to https://api.aspose.cloud/v1.1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- HtmlAPI | getConvertDocumentToImage | GET /html/{name}/convert/image/{outFormat} | Convert the HTML document from the storage by its name to the specified image format. HtmlAPI | getConvertDocumentToImageByUrl | GET /html/convert/image/{outFormat} | Convert the HTML page from the web by its URL to the specified image format. HtmlAPI | getConvertDocumentToPdf | GET /html/{name}/convert/pdf | Convert the HTML document from the storage by its name to PDF. HtmlAPI | getConvertDocumentToPdfByUrl | GET /html/convert/pdf | Convert the HTML page from the web by its URL to PDF. HtmlAPI | getConvertDocumentToXps | GET /html/{name}/convert/xps | Convert the HTML document from the storage by its name to XPS. HtmlAPI | getConvertDocumentToXpsByUrl | GET /html/convert/xps | Convert the HTML page from the web by its URL to XPS. HtmlAPI | putConvertDocumentInRequestToImage | PUT /html/convert/image/{outFormat} | Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage. HtmlAPI | putConvertDocumentInRequestToPdf | PUT /html/convert/pdf | Converts the HTML document (in request content) to PDF and uploads resulting file to storage. HtmlAPI | putConvertDocumentInRequestToXps | PUT /html/convert/xps | Converts the HTML document (in request content) to XPS and uploads resulting file to storage. HtmlAPI | putConvertDocumentToImage | PUT /html/{name}/convert/image/{outFormat} | Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage. HtmlAPI | putConvertDocumentToPdf | PUT /html/{name}/convert/pdf | Converts the HTML document (located on storage) to PDF and uploads resulting file to storage. HtmlAPI | putConvertDocumentToXps | PUT /html/{name}/convert/xps | Converts the HTML document (located on storage) to XPS and uploads resulting file to storage. HtmlAPI | getConvertDocumentToMHTMLByUrl | GET /html/convert/mhtml | Converts the HTML page from Web by its URL to MHTML returns resulting file in response content. HtmlAPI | getConvertDocumentToMarkdown | GET /html/{name}/convert/md | Converts the HTML document (located on storage) to Markdown and returns resulting file in response content. HtmlAPI | putConvertDocumentInRequestToMarkdown | PUT /html/convert/md | Converts the HTML document (in request content) to Markdown and uploads resulting file to storage by specified path. HtmlAPI | putConvertDocumentToMarkdown | PUT /html/{name}/convert/md | Converts the HTML document (located on storage) to Markdown and uploads resulting file to storage by specified path. HtmlAPI | getDocumentByUrl | GET /html/download | Return all HTML page with linked resources packaged as a ZIP archive by the source page URL. HtmlAPI | getDocumentFragmentByXPath | GET /html/{name}/fragments/{outFormat} | Return list of HTML fragments matching the specified XPath query. HtmlAPI | getDocumentFragmentByXPathByUrl | GET /html/fragments/{outFormat} | Return list of HTML fragments matching the specified XPath query by the source page URL. HtmlAPI | getDocumentFragmentsByCSSSelector | GET /html/{name}/fragments/css/{outFormat} | Return list of HTML fragments matching the specified CSS selector. HtmlAPI | getDocumentFragmentsByCSSSelectorByUrl | GET /html/fragments/css/{outFormat} | Return list of HTML fragments matching the specified CSS selector by the source page URL. HtmlAPI | getDocumentImages | GET /html/{name}/images/all | Return all HTML document images packaged as a ZIP archive. HtmlAPI | getDocumentImagesByUrl | GET /html/images/all | Return all HTML page images packaged as a ZIP archive by the source page URL. HtmlAPI | getRecognizeAndImportToHtml | GET /html/{name}/ocr/import | Recognize text from the image file in the storage and import it to HTML format. HtmlAPI | getRecognizeAndTranslateToHtml | GET /html/{name}/ocr/translate/{srcLang}/{resLang} | Recognize text from the image file in the storage, import it to HTML format and translate to specified language. HtmlAPI | getTranslateDocument | GET /html/{name}/translate/{srcLang}/{resLang} | Translate the HTML document specified by the name from default or specified storage. HtmlAPI | getTranslateDocumentByUrl | GET /html/translate/{srcLang}/{resLang} | Translate the HTML document from Web specified by its URL. HtmlAPI | getDetectHtmlKeywords | GET /html/{name}/summ/keywords | Get the HTML document keywords using the keyword detection service. HtmlAPI | getDetectHtmlKeywordsByUrl | GET /html/summ/keywords | Get the keywords from HTML document from Web specified by its URL using the keyword detection service HtmlAPI | getMergeHtmlTemplate | GET /html/{templateName}/merge | Populate HTML document template with data located as a file in the storage. HtmlAPI | putMergeHtmlTemplate | PUT /html/{templateName}/merge | Populate HTML document template with data from the request body. Result document will be saved to storage.

Documentation For Authorization

oauth

  • Type: OAuth2
  • Flow: application
  • Authorization URL: "https://api.aspose.cloud/oauth2/token"
  • Scopes: N/A

Examples

Test uses StorageApi for upload(download) file to(from) remote storage.

Documentation for Storage API Endpoints

All URIs are relative to https://api.aspose.cloud/v1.1

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- StorageAPI | deleteFile | DELETE /storage/file | Remove a specific file StorageAPI | getDownload | GET /storage/file | Download a specific file StorageAPI | postMoveFile | POST /storage/file | Move a specific file StorageAPI | putCreate | PUT /storage/file | Upload a specific file StorageAPI | deleteFolder | DELETE /storage/folder | Remove a specific folder StorageAPI | getListFiles | GET /storage/folder | Get the file listing of a specific folder StorageAPI | postMoveFolder | POST /storage/folder | Move a specific folder StorageAPI | putCreateFolder | PUT /storage/folder | Create the folder StorageAPI | getDiscUsage | GET /storage/disc | Check the disk usage of the current account StorageAPI | getIsExist | GET /storage/exist | Check if a specific file or folder exists StorageAPI | getIsStorageExist | GET /storage/{name}/exist | Check if storage exists StorageAPI | getListFileVersions | GET /storage/version | Get the file's versions list

Documentation for Models

Tests contain various examples of using the Aspose.HTML and Aspose.Storage SDK.

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total: 0