Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 11 additions & 0 deletions bin/sandbox
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e

DIR=$(cd `dirname $0` && pwd)

bash "${DIR}/sandbox-dotnet"
bash "${DIR}/sandbox-java-v1"
bash "${DIR}/sandbox-java-v2"
bash "${DIR}/sandbox-node"
bash "${DIR}/sandbox-php"
22 changes: 22 additions & 0 deletions copy-sdks
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,30 @@ function copy_files()
git reset --hard origin/${REPO_MAIN_BRANCH}
git pull origin ${REPO_MAIN_BRANCH}
git checkout -b "release-${VERSION}"

cp -r "${DIR}/sdks/${SDK}/." "${SDK_DIR}"

rm -f "${SDK_DIR}/openapi-sdk.yaml"
rm -rf "${SDK_DIR}/examples"
mkdir -p "${SDK_DIR}/examples"

cp -r "${DIR}/openapi-sdk.yaml" "${SDK_DIR}/openapi-sdk.yaml"

if [[ "${SDK}" == "dotnet" ]]; then
cp -r "${DIR}/examples/"*.cs "${SDK_DIR}/examples/"
elif [[ "${SDK}" == "java-v2" ]] || [[ "${SDK}" == "java-v1" ]]; then
cp -r "${DIR}/examples/"*.java "${SDK_DIR}/examples/"
elif [[ "${SDK}" == "node" ]]; then
cp -r "${DIR}/examples/"*.js "${SDK_DIR}/examples/"
cp -r "${DIR}/examples/"*.ts "${SDK_DIR}/examples/"
elif [[ "${SDK}" == "php" ]]; then
cp -r "${DIR}/examples/"*.php "${SDK_DIR}/examples/"
elif [[ "${SDK}" == "python" ]]; then
cp -r "${DIR}/examples/"*.py "${SDK_DIR}/examples/"
elif [[ "${SDK}" == "ruby" ]]; then
cp -r "${DIR}/examples/"*.rb "${SDK_DIR}/examples/"
fi

php "${DIR}/bin/update-sdk-version.php" ${SDK} ${VERSION}

popd
Expand Down
34 changes: 34 additions & 0 deletions examples/FaxLineAddUser.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 faxLineApi = new FaxLineApi(config);

var data = new FaxLineAddUserRequest(
number: "[FAX_NUMBER]",
emailAddress: "member@dropboxsign.com"
);

try
{
var result = faxLineApi.FaxLineAddUser(data);
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);
}
}
}
30 changes: 30 additions & 0 deletions examples/FaxLineAddUser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 faxLineApi = new FaxLineApi(apiClient);

var data = new FaxLineAddUserRequest()
.number("[FAX_NUMBER]")
.emailAddress("member@dropboxsign.com");

try {
FaxLineResponse result = faxLineApi.faxLineAddUser(data);
System.out.println(result);
} 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();
}
}
}
19 changes: 19 additions & 0 deletions examples/FaxLineAddUser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as DropboxSign from "@dropbox/sign";

const faxLineApi = new DropboxSign.FaxLineApi();

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

const data = {
number: "[FAX_NUMBER]",
emailAddress: "member@dropboxsign.com",
};

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

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

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

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

$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config);

$data = new Dropbox\Sign\Model\FaxLineAddUserRequest();
$data->setNumber("[FAX_NUMBER]")
->setEmailAddress("member@dropboxsign.com");

try {
$result = $faxLineApi->faxLineAddUser($data);
print_r($result);
} catch (Dropbox\Sign\ApiException $e) {
$error = $e->getResponseObject();
echo "Exception when calling Dropbox Sign API: "
. print_r($error->getError());
}
23 changes: 23 additions & 0 deletions examples/FaxLineAddUser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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_line_api = apis.FaxLineApi(api_client)

data = models.FaxLineAddUserRequest(
number="[FAX_NUMBER]",
email_address="member@dropboxsign.com",
)

try:
response = fax_line_api.fax_line_add_user(data)
pprint(response)
except ApiException as e:
print("Exception when calling Dropbox Sign API: %s\n" % e)
19 changes: 19 additions & 0 deletions examples/FaxLineAddUser.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require "dropbox-sign"

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

fax_line_api = Dropbox::Sign::FaxLineApi.new

data = Dropbox::Sign::FaxLineAddUserRequest.new
data.number = "[FAX_NUMBER]"
data.email_address = "member@dropboxsign.com"

begin
result = fax_line_api.fax_line_add_user(data)
p result
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
4 changes: 4 additions & 0 deletions examples/FaxLineAddUser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
curl -X POST 'https://api.hellosign.com/v3/fax_line/add_user' \
-u 'YOUR_API_KEY:' \
-F 'number=[FAX_NUMBER]' \
-F 'email_address=member@dropboxsign.com'
19 changes: 19 additions & 0 deletions examples/FaxLineAddUser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as DropboxSign from "@dropbox/sign";

const faxLineApi = new DropboxSign.FaxLineApi();

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

const data: DropboxSign.FaxLineAddUserRequest = {
number: "[FAX_NUMBER]",
emailAddress: "member@dropboxsign.com",
};

const result = faxLineApi.faxLineAddUser(data);
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
29 changes: 29 additions & 0 deletions examples/FaxLineAreaCodeGet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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 faxLineApi = new FaxLineApi(config);

try
{
var result = faxLineApi.FaxLineAreaCodeGet("US", "CA");
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);
}
}
}
26 changes: 26 additions & 0 deletions examples/FaxLineAreaCodeGet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 faxLineApi = new FaxLineApi(apiClient);

try {
FaxLineAreaCodeGetResponse result = faxLineApi.faxLineAreaCodeGet("US", "CA");
System.out.println(result);
} 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/FaxLineAreaCodeGet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as DropboxSign from "@dropbox/sign";

const faxLineApi = new DropboxSign.FaxLineApi();

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

const result = faxLineApi.faxLineAreaCodeGet("US", "CA");
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
19 changes: 19 additions & 0 deletions examples/FaxLineAreaCodeGet.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

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

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

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

$faxLineApi = new Dropbox\Sign\Api\FaxLineApi($config);

try {
$result = $faxLineApi->faxLineAreaCodeGet("US", "CA");
print_r($result);
} 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/FaxLineAreaCodeGet.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

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

with ApiClient(configuration) as api_client:
fax_line_api = apis.FaxLineApi(api_client)

try:
response = fax_line_api.fax_line_area_code_get("US", "CA")
pprint(response)
except ApiException as e:
print("Exception when calling Dropbox Sign API: %s\n" % e)
15 changes: 15 additions & 0 deletions examples/FaxLineAreaCodeGet.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require "dropbox-sign"

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

fax_line_api = Dropbox::Sign::FaxLineApi.new

begin
result = fax_line_api.fax_line_area_code_get("US", "CA")
p result
rescue Dropbox::Sign::ApiError => e
puts "Exception when calling Dropbox Sign API: #{e}"
end
4 changes: 4 additions & 0 deletions examples/FaxLineAreaCodeGet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
curl -X GET 'https://api.hellosign.com/v3/fax_line/area_codes' \
-u 'YOUR_API_KEY:' \
-F 'country=US' \
-F 'state=CA'
14 changes: 14 additions & 0 deletions examples/FaxLineAreaCodeGet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as DropboxSign from "@dropbox/sign";

const faxLineApi = new DropboxSign.FaxLineApi();

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

const result = faxLineApi.faxLineAreaCodeGet("US", "CA");
result.then(response => {
console.log(response.body);
}).catch(error => {
console.log("Exception when calling Dropbox Sign API:");
console.log(error.body);
});
Loading