-
Notifications
You must be signed in to change notification settings - Fork 18
Adds /fax/ endpoints #430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Adds /fax/ endpoints #430
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1beee8c
Fax API SDK + OpenAPI
409b946
SDKS generated
603d67b
Examples fixing
e0b050a
Examples fixing 1
f352309
Transalations
213a981
OpenAPI specs
b9fe7ab
Merge branch 'main' into SIGN-5685
97cfa7e
Building SDKs
e3f1cb2
Adding test fixtures for Fax
4428a57
Renaming FaxSend request parameters+SDK build
f717e58
Merge branch 'main' into SIGN-5685
e913021
Changing from/to to sender/recipient
d9e8c8c
Rebuilding SDKs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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()); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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:' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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()); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import * as DropboxSign from "@dropbox/sign"; | ||
Shadowmad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.