Skip to content

Latest commit

 

History

History

csharp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Anvil usage examples in C#

Welcome to Anvil API usage examples in C#! There are example scripts for the following API actions:

Usage

All scripts will require that you have an Anvil API key. See the getting started documentation for help grabbing your API key.

Each script is set up to be runnable with minimal input. Once you have an API key, you can clone this repo and run the example scripts from this directory.

Once you have this repo cloned, cd into this csharp directory and install the dependencies:

cd csharp

# Download dependencies
dotnet restore

# Run the example that you want.
# Replace `<example-name>` with one of:
# make-graphql-request, fill-pdf,
# generate-html-to-pdf, generate-markdown-to-pdf,
# create-etch-packet, create-update-workflow
ANVIL_API_KEY="YOUR_KEY_HERE" dotnet run <example-name>

Scripts will output filled and generated PDFs into the output directory.

Fill a PDF template:

$ ANVIL_API_KEY=<yourAPIKey> dotnet run fill-pdf

Generate a PDF from HTML and CSS:

$ ANVIL_API_KEY=<yourAPIKey> dotnet run generate-html-to-pdf

Generate a PDF from Markdown:

$ ANVIL_API_KEY=<yourAPIKey> dotnet run generate-markdown-to-pdf

Creating an e-sign packet:

$ ANVIL_API_KEY=<yourAPIKey> dotnet run create-etch-packet <[email protected]>

Start and update workflow submissions:

$ ANVIL_API_KEY=<yourAPIKey> dotnet run create-update-workflow <your-org-slug>

Make an arbitrary GraphQL request:

$ ANVIL_API_KEY=<yourAPIKey> dotnet run make-graphql-request