Skip to content

Commit

Permalink
Fax API SDK + OpenAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowmad committed Sep 25, 2024
1 parent e3afb19 commit 271fa0f
Show file tree
Hide file tree
Showing 169 changed files with 26,078 additions and 308 deletions.
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.DeleteFax("[FAX_NUMBER]");
}
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.deleteFax("[FAX_NUMBER]");
} 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();
}
}
}
14 changes: 14 additions & 0 deletions examples/FaxDelete.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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.deleteFax("[FAX_NUMBER]");

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");

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

try {
$faxDelete->deleteFax("[FAX_NUMBER]");
} 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.delete_fax("[FAX_NUMBER]")
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.delete_fax("[FAX_NUMBER]")
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.deleteFax("[FAX_NUMBER]");

result.catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
30 changes: 30 additions & 0 deletions examples/FaxFiles.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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
{
faxApi.GetFaxFiles(faxId);
}
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/FaxFiles.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.*;

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);

var faxId = "fa5c8a0b0f492d768749333ad6fcc214c111e967";

try {
faxApi.getFaxFiles(faxId);
} 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();
}
}
}
16 changes: 16 additions & 0 deletions examples/FaxFiles.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.getFaxFiles(faxId);
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
20 changes: 20 additions & 0 deletions examples/FaxFiles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?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 {
$faxApi->getFaxFiles($faxId);
} catch (Dropbox\Sign\ApiException $e) {
$error = $e->getResponseObject();
echo "Exception when calling Dropbox Sign API: "
. print_r($error->getError());
}
18 changes: 18 additions & 0 deletions examples/FaxFiles.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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:
fax_api.get_fax_files(fax_id)
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
result = fax_api.get_fax_files(data)
p result
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
2 changes: 2 additions & 0 deletions examples/FaxFiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
curl -X POST 'https://api.hellosign.com/v3/fax/files/{fax_id}' \
-u 'YOUR_API_KEY:'
16 changes: 16 additions & 0 deletions examples/FaxFiles.ts
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.getFaxFiles(faxId);
result.then(response => {
console.log(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.GetFaxById(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.getFaxById(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.getFaxById(faxId);
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
21 changes: 21 additions & 0 deletions examples/FaxGet.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->getFaxById($faxId);
print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
$error = $e->getResponseObject();
echo "Exception when calling Dropbox Sign API: "
. print_r($error->getError());
}
Loading

0 comments on commit 271fa0f

Please sign in to comment.