meioco3/docspring

2.3.3 2023-09-26 07:00 UTC

This package is auto-updated.

Last update: 2024-12-26 09:40:02 UTC


README

DocSpring is a service that helps you fill out and sign PDF templates.

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.3.2
  • Build package: com.docspring.codegen.DocSpringPhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/docspring/docspring.git"
    }
  ],
  "require": {
    "docspring/docspring": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/DocSpring/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: api_token_basic
$config = DocSpring\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');

$apiInstance = new DocSpring\Api\PDFApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$template_id = tpl_000000000000000002; // string | 
$add_fields_data = new \DocSpring\Model\AddFieldsData(); // \DocSpring\Model\AddFieldsData | 

try {
    $result = $apiInstance->addFieldsToTemplate($template_id, $add_fields_data);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PDFApi->addFieldsToTemplate: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.docspring.com/api/v1

Documentation For Models

Documentation For Authorization

api_token_basic

  • Type: HTTP basic authentication

Author