Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions examples/FaxDelete.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.IO;
using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

public class Example
{
public static void Main()
{
var config = new Configuration();
config.Username = "YOUR_API_KEY";

var faxApi = new FaxApi(config);

try
{
faxApi.FaxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967");
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
}
}
25 changes: 25 additions & 0 deletions examples/FaxDelete.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.model.*;

import java.util.List;

public class Example {
public static void main(String[] args) {
var apiClient = Configuration.getDefaultApiClient()
.setApiKey("YOUR_API_KEY");

var faxApi = new FaxApi(apiClient);

try {
faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967");
} catch (ApiException e) {
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
13 changes: 13 additions & 0 deletions examples/FaxDelete.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as DropboxSign from "@dropbox/sign";

const faxApi = new DropboxSign.FaxApi();

// Configure HTTP basic authorization: api_key
faxApi.username = "YOUR_API_KEY";

const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967");

result.catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
18 changes: 18 additions & 0 deletions examples/FaxDelete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");

$faxApi = new Dropbox\Sign\Api\FaxApi($config);

try {
$faxApi->faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967");
} catch (Dropbox\Sign\ApiException $e) {
$error = $e->getResponseObject();
echo "Exception when calling Dropbox Sign API: "
. print_r($error->getError());
}
16 changes: 16 additions & 0 deletions examples/FaxDelete.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, apis, models

configuration = Configuration(
# Configure HTTP basic authorization: api_key
username="YOUR_API_KEY",
)

with ApiClient(configuration) as api_client:
fax_api = apis.FaxApi(api_client)

try:
fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967")
except ApiException as e:
print("Exception when calling Dropbox Sign API: %s\n" % e)
14 changes: 14 additions & 0 deletions examples/FaxDelete.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require "dropbox-sign"

Dropbox::Sign.configure do |config|
# Configure HTTP basic authorization: api_key
config.username = "YOUR_API_KEY"
end

fax_api = Dropbox::Sign::FaxApi.new

begin
fax_api.fax_delete("fa5c8a0b0f492d768749333ad6fcc214c111e967")
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
2 changes: 2 additions & 0 deletions examples/FaxDelete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl -X DELETE 'https://api.hellosign.com/v3/fax/{fax_id}' \
-u 'YOUR_API_KEY:'
13 changes: 13 additions & 0 deletions examples/FaxDelete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as DropboxSign from "@dropbox/sign";

const faxApi = new DropboxSign.FaxApi();

// Configure HTTP basic authorization: api_key
faxApi.username = "YOUR_API_KEY";

const result = faxApi.faxDelete("fa5c8a0b0f492d768749333ad6fcc214c111e967");

result.catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
34 changes: 34 additions & 0 deletions examples/FaxFiles.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.IO;
using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

public class Example
{
public static void Main()
{
var config = new Configuration();
config.Username = "YOUR_API_KEY";

var faxApi = new FaxApi(config);

var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

try
{
var result = faxApi.FaxFiles(faxId);
var fileStream = File.Create("file_response.pdf");
result.Seek(0, SeekOrigin.Begin);
result.CopyTo(fileStream);
fileStream.Close();
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
}
}
28 changes: 28 additions & 0 deletions examples/FaxFiles.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.model.*;

import java.io.File;

public class Example {
public static void main(String[] args) {
var apiClient = Configuration.getDefaultApiClient()
.setApiKey("YOUR_API_KEY");

var faxApi = new FaxApi(apiClient);

var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

try {
File result = faxApi.faxFiles(faxId);
result.renameTo(new File("file_response.pdf"));;
} catch (ApiException e) {
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
17 changes: 17 additions & 0 deletions examples/FaxFiles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as DropboxSign from "@dropbox/sign";
import * as fs from 'fs';

const faxApi = new DropboxSign.FaxApi();

// Configure HTTP basic authorization: api_key
faxApi.username = "YOUR_API_KEY";

const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

const result = faxApi.faxFiles(faxId);
result.then(response => {
fs.createWriteStream('file_response.pdf').write(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
21 changes: 21 additions & 0 deletions examples/FaxFiles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

require_once __DIR__ . "/vendor/autoload.php";

$config = Dropbox\Sign\Configuration::getDefaultConfiguration();

// Configure HTTP basic authorization: api_key
$config->setUsername("YOUR_API_KEY");

$faxApi = new Dropbox\Sign\Api\FaxApi($config);

$faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

try {
$result = $faxApi->faxFiles($faxId);
copy($result->getRealPath(), __DIR__ . '/file_response.pdf');
} catch (Dropbox\Sign\ApiException $e) {
$error = $e->getResponseObject();
echo "Exception when calling Dropbox Sign API: "
. print_r($error->getError());
}
19 changes: 19 additions & 0 deletions examples/FaxFiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from pprint import pprint

from dropbox_sign import ApiClient, ApiException, Configuration, apis, models

configuration = Configuration(
# Configure HTTP basic authorization: api_key
username="YOUR_API_KEY",
)

with ApiClient(configuration) as api_client:
fax_api = apis.FaxApi(api_client)

fax_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967"

try:
response = fax_api.fax_files(fax_id)
open("file_response.pdf", "wb").write(response.read())
except ApiException as e:
print("Exception when calling Dropbox Sign API: %s\n" % e)
17 changes: 17 additions & 0 deletions examples/FaxFiles.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require "dropbox-sign"

Dropbox::Sign.configure do |config|
# Configure HTTP basic authorization: api_key
config.username = "YOUR_API_KEY"
end

fax_api = Dropbox::Sign::FaxApi.new

faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

begin
file_bin = fax_api.fax_files(data)
FileUtils.cp(file_bin.path, "path/to/file.pdf")
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
3 changes: 3 additions & 0 deletions examples/FaxFiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
curl -X GET 'https://api.hellosign.com/v3/fax/files/{fax_id}' \
-u 'YOUR_API_KEY:' \
--output downloaded_document.pdf
17 changes: 17 additions & 0 deletions examples/FaxFiles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as DropboxSign from "@dropbox/sign";
import * as fs from 'fs';

const faxApi = new DropboxSign.FaxApi();

// Configure HTTP basic authorization: api_key
faxApi.username = "YOUR_API_KEY";

const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

const result = faxApi.faxFiles(faxId);
result.then(response => {
fs.createWriteStream('file_response.pdf').write(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
31 changes: 31 additions & 0 deletions examples/FaxGet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;

using Dropbox.Sign.Api;
using Dropbox.Sign.Client;
using Dropbox.Sign.Model;

public class Example
{
public static void Main()
{
var config = new Configuration();
// Configure HTTP basic authorization: api_key
config.Username = "YOUR_API_KEY";

var faxApi = new FaxApi(config);

var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

try
{
var result = faxApi.FaxGet(faxId);
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling Dropbox Sign API: " + e.Message);
Console.WriteLine("Status Code: " + e.ErrorCode);
Console.WriteLine(e.StackTrace);
}
}
}
27 changes: 27 additions & 0 deletions examples/FaxGet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import com.dropbox.sign.ApiException;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.api.*;
import com.dropbox.sign.auth.*;
import com.dropbox.sign.model.*;

public class Example {
public static void main(String[] args) {
var apiClient = Configuration.getDefaultApiClient()
.setApiKey("YOUR_API_KEY");

var faxApi = new FaxApi(apiClient);

var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

try {
FaxGetResponse result = faxApi.faxGet(faxId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AccountApi#accountCreate");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
16 changes: 16 additions & 0 deletions examples/FaxGet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import * as DropboxSign from "@dropbox/sign";

const faxApi = new DropboxSign.FaxApi();

// Configure HTTP basic authorization: api_key
faxApi.username = "YOUR_API_KEY";

const faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967"

const result = faxApi.faxGet(faxId);
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
Loading