Restpack 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Restpack --version 1.0.1
                    
NuGet\Install-Package Restpack -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Restpack" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Restpack" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Restpack" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Restpack --version 1.0.1
                    
#r "nuget: Restpack, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Restpack@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Restpack&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Restpack&version=1.0.1
                    
Install as a Cake Tool

restpack-csharp

Official C# client for Restpack APIs

Installation

The recommended way to install restpack-csharp is through Nuget:

Install the latest restpack-csharp nuget module:

$ dotnet add package Restpack

Finally, you need to require the library in your C# application:

Using Restpack;

Screenshot API

For detailed documentation, please visit Screenshot API v5 Reference page.


using System;
using Restpack.Screenshot;

namespace Program
{
  class Program
  {
    static void Main(string[] args)
    {
      var Screenshot = new Screenshot("<YOUR ACCESS TOKEN>");

      var options = new Screenshot.RequestOptions();
      options.Format = "png";
      options.Delay = 3000;

      // Capture given URL. Return the document details and CDN url of the Image
      var captureResult = Screenshot.Capture("https://google.com", options);
      Console.WriteLine(captureResult.Image);

      // Capture given URL. Return the image file as bytes[]
      var captureBytesResult = Screenshot.CaptureBytes("https://google.com", options);
      Console.WriteLine(captureBytesResult);

      // Capture given html content. Return the document details and CDN url of the Image
      var captureHTMLResult = Screenshot.CaptureHTML("<h1>Test</h1>", options);
      Console.WriteLine(captureHTMLResult.Image);

      // Capture given html content. Return the image file as bytes[]
      var captureBytesResult = Screenshot.CaptureHTMLBytes("<h1>Test</h1>", options);
      Console.WriteLine(captureBytesResult);
    }
  }
}

HTML To PDF API

For detailed documentation, please visit HTML to PDF API v5 Reference page.

using System;
using Restpack.Pdf2Html;

namespace Program
{
  class Program
  {
    static void Main(string[] args)
    {
      var Pdf2Html = new Pdf2Html("<YOUR ACCESS TOKEN>");

      var options = new Pdf2Html.RequestOptions();
      options.PDFOrientation = "landscape";

      // Convert given URL to PDF. Return the document details and CDN url of PDF
      var captureResult = Pdf2Html.Convert("https://google.com", options);
      Console.WriteLine(captureResult.Image);

      // Convert given URL to PDF. Return the PDF document as Buffer
      var captureBytesResult = Pdf2Html.ConvertBytes("https://google.com", options);
      Console.WriteLine(captureBytesResult);

      // Convert given html content to PDF. Return the document details and CDN url of PDF
      var captureHTMLResult = Pdf2Html.ConvertHTML("<h1>Test</h1>", options);
      Console.WriteLine(captureHTMLResult.Image);

      // Convert given html content to PDF. Return the PDF document as Buffer
      var captureBytesResult = Pdf2Html.ConvertHTMLBytes("<h1>Test</h1>", options);
      Console.WriteLine(captureBytesResult);
    }
  }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 57,270 6/4/2020
1.0.4 515 5/1/2020
1.0.3 4,980 10/5/2019
1.0.2 574 10/2/2019
1.0.1 626 5/8/2019
1.0.0 633 5/8/2019