Skip to content

Commit

Permalink
Regenerated using latest swagger-codegen.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-o-matic committed Mar 11, 2016
1 parent 3c97699 commit a0d9318
Show file tree
Hide file tree
Showing 17 changed files with 670 additions and 449 deletions.
22 changes: 12 additions & 10 deletions README.md
Expand Up @@ -35,16 +35,18 @@ class Example {
Configuration.Username = "YOUR_API_KEY_HERE"; // this key works for test documents
DocApi docraptor = new DocApi();

Doc doc = new Doc();
doc.Test = true; // test documents are free but watermarked
doc.DocumentContent = "<html><body>Hello World</body></html>"; // supply content directly
// doc.DocumentUrl = "http://docraptor.com/examples/invoice.html"; // or use a url
doc.Name = "docraptor-csharp.pdf"; // help you find a document later
doc.DocumentType = "pdf"; // pdf or xls or xlsx
// doc.Javascript = true; // enable JavaScript processing
// doc.PrinceOptions = new PrinceOptions();
// doc.PrinceOptions.Media = "screen"; // use screen styles instead of print styles
// doc.PrinceOptions.Baseurl = "http://hello.com"; // pretend URL when using document_content
Doc doc = new Doc(
Test: true, // test documents are free but watermarked
DocumentContent: "<html><body>Hello World</body></html>", // supply content directly
// DocumentUrl: "http://docraptor.com/examples/invoice.html", // or use a url
Name: "docraptor-csharp.pdf", // help you find a document later
DocumentType: Doc.DocumentTypeEnum.Pdf // pdf or xls or xlsx
// Javascript: true, // enable JavaScript processing
// PrinceOptions: new PrinceOptions(
// Media: "screen", // use screen styles instead of print styles
// Baseurl: "http://hello.com" // pretend URL when using document_content
// )
);

byte[] create_response = docraptor.CreateDoc(doc);
}
Expand Down
22 changes: 12 additions & 10 deletions examples/async.cs
Expand Up @@ -23,16 +23,18 @@ class AsyncTest {
Configuration.Default.Username = "YOUR_API_KEY_HERE"; // this key works for test documents
DocApi docraptor = new DocApi();

Doc doc = new Doc();
doc.Test = true; // test documents are free but watermarked
doc.DocumentContent = "<html><body>Hello World</body></html>"; // supply content directly
// doc.DocumentUrl = "http://docraptor.com/examples/invoice.html"; // or use a url
doc.Name = "docraptor-csharp.pdf"; // help you find a document later
doc.DocumentType = "pdf"; // pdf or xls or xlsx
// doc.Javascript = true; // enable JavaScript processing
// doc.PrinceOptions = new PrinceOptions();
// doc.PrinceOptions.Media = "screen"; // use screen styles instead of print styles
// doc.PrinceOptions.Baseurl = "http://hello.com"; // pretend URL when using document_content
Doc doc = new Doc(
Test: true, // test documents are free but watermarked
DocumentContent: "<html><body>Hello World</body></html>", // supply content directly
// DocumentUrl: "http://docraptor.com/examples/invoice.html", // or use a url
Name: "docraptor-csharp.pdf", // help you find a document later
DocumentType: Doc.DocumentTypeEnum.Pdf // pdf or xls or xlsx
// Javascript: true, // enable JavaScript processing
// PrinceOptions: new PrinceOptions(
// Media: "screen", // use screen styles instead of print styles
// Baseurl: "http://hello.com" // pretend URL when using document_content
// )
);

AsyncDoc response = docraptor.CreateAsyncDoc(doc);

Expand Down
22 changes: 12 additions & 10 deletions examples/sync.cs
Expand Up @@ -24,16 +24,18 @@ class SyncTest {
Configuration.Default.Username = "YOUR_API_KEY_HERE"; // this key works for test documents
DocApi docraptor = new DocApi();

Doc doc = new Doc();
doc.Test = true; // test documents are free but watermarked
doc.DocumentContent = "<html><body>Hello World</body></html>"; // supply content directly
// doc.DocumentUrl = "http://docraptor.com/examples/invoice.html"; // or use a url
doc.Name = "docraptor-csharp.pdf"; // help you find a document later
doc.DocumentType = "pdf"; // pdf or xls or xlsx
// doc.Javascript = true; // enable JavaScript processing
// doc.PrinceOptions = new PrinceOptions();
// doc.PrinceOptions.Media = "screen"; // use screen styles instead of print styles
// doc.PrinceOptions.Baseurl = "http://hello.com"; // pretend URL when using document_content
Doc doc = new Doc(
Test: true, // test documents are free but watermarked
DocumentContent: "<html><body>Hello World</body></html>", // supply content directly
// DocumentUrl: "http://docraptor.com/examples/invoice.html", // or use a url
Name: "docraptor-csharp.pdf", // help you find a document later
DocumentType: Doc.DocumentTypeEnum.Pdf // pdf or xls or xlsx
// Javascript: true, // enable JavaScript processing
// PrinceOptions: new PrinceOptions(
// Media: "screen", // use screen styles instead of print styles
// Baseurl: "http://hello.com" // pretend URL when using document_content
// )
);

byte[] create_response = docraptor.CreateDoc(doc);
File.WriteAllBytes("/tmp/docraptor-csharp.pdf", create_response);
Expand Down

0 comments on commit a0d9318

Please sign in to comment.