Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 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
  •  
  •  
  •  
45 changes: 45 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status oas
Expand All @@ -20,9 +23,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build PHP SDK
run: ./generate-sdks -t php
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status php
Expand All @@ -35,9 +44,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build Python SDK
run: ./generate-sdks -t python
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status python
Expand All @@ -50,9 +65,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build Ruby SDK
run: ./generate-sdks -t ruby
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status ruby
Expand All @@ -65,9 +86,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build NodeJs SDK
run: ./generate-sdks -t node
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status node
Expand All @@ -80,9 +107,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build Java SDK
run: ./generate-sdks -t java-v1
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status java-v1
Expand All @@ -95,9 +128,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build Java SDK
run: ./generate-sdks -t java-v2
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status java-v2
Expand All @@ -110,9 +149,15 @@ jobs:

- name: Build OpenAPI Spec
run: ./build
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Build DotNet SDK
run: ./generate-sdks -t dotnet
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_TOKEN: ${{secrets.DOCKER_TOKEN}}

- name: Ensure no changes in Generated Code
run: ./bin/check-clean-git-status dotnet
5 changes: 5 additions & 0 deletions bin/php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ DIR=$(cd `dirname $0` && pwd)
ROOT_DIR="${DIR}/.."
WORKING_DIR="/app/openapi"

if [[ -n "$GITHUB_ACTIONS" ]]; then
printf "\nLogging in to docker.com ...\n"
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
fi

docker run --rm \
-v "${ROOT_DIR}:${WORKING_DIR}" \
-v "dropbox-sign-sdk-composer-cache:/.composer" \
Expand Down
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)
Loading