Skip to content

Commit 134ab2e

Browse files
committed
Rename ClientApi to DocApi.
1 parent aff4749 commit 134ab2e

File tree

10 files changed

+24
-28
lines changed

10 files changed

+24
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using System.IO;
3333
class Example {
3434
static void Main(string[] args) {
3535
Configuration.Username = "YOUR_API_KEY_HERE"; // this key works for test documents
36-
ClientApi docraptor = new ClientApi();
36+
DocApi docraptor = new DocApi();
3737

3838
Doc doc = new Doc();
3939
doc.Test = true; // test documents are free but watermarked

docraptor.yaml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ schemes: [https]
1010
securityDefinitions:
1111
basicAuth:
1212
type: basic
13-
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
13+
description: Use your API key as the username. Password does not need to be set.
1414
produces:
1515
- application/json
1616
- application/xml
@@ -22,11 +22,10 @@ paths:
2222
/docs:
2323
post:
2424
operationId: createDoc
25-
tags: [Client]
25+
tags: [Doc]
2626
description: >
2727
Creates a document synchronously.
2828
security:
29-
3029
- basicAuth: []
3130
parameters:
3231
- name: doc
@@ -54,7 +53,7 @@ paths:
5453
/async_docs:
5554
post:
5655
operationId: createAsyncDoc
57-
tags: [Client]
56+
tags: [Doc]
5857
description: >
5958
Creates a document asynchronously.
6059
You must use a callback url or the the returned status id and the status api to find out when it completes.
@@ -87,11 +86,10 @@ paths:
8786
/status/{id}:
8887
get:
8988
operationId: getAsyncDocStatus
90-
tags: [Client]
89+
tags: [Doc]
9190
description: >
9291
Check on the status of an asynchronously created document.
9392
security:
94-
9593
- basicAuth: []
9694
parameters:
9795
- name: id
@@ -112,15 +110,13 @@ paths:
112110
500:
113111
description: Server Error
114112

115-
116113
/download/{id}:
117114
get:
118115
operationId: getAsyncDoc
119-
tags: [Client]
120-
description:
116+
tags: [Doc]
117+
description: >
121118
Downloads a document.
122119
security:
123-
124120
- basicAuth: []
125121
parameters:
126122
- name: id

examples/async.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AsyncTest {
2121
static void Main(string[] args) {
2222
try {
2323
Configuration.Default.Username = "YOUR_API_KEY_HERE"; // this key works for test documents
24-
ClientApi docraptor = new ClientApi();
24+
DocApi docraptor = new DocApi();
2525

2626
Doc doc = new Doc();
2727
doc.Test = true; // test documents are free but watermarked

examples/sync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SyncTest {
2222
static void Main(string[] args) {
2323
try {
2424
Configuration.Default.Username = "YOUR_API_KEY_HERE"; // this key works for test documents
25-
ClientApi docraptor = new ClientApi();
25+
DocApi docraptor = new DocApi();
2626

2727
Doc doc = new Doc();
2828
doc.Test = true; // test documents are free but watermarked

src/main/csharp/DocRaptor/Api/ClientApi.cs renamed to src/main/csharp/DocRaptor/Api/DocApi.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace DocRaptor.Api
1212
/// <summary>
1313
/// Represents a collection of functions to interact with the API endpoints
1414
/// </summary>
15-
public interface IClientApi
15+
public interface IDocApi
1616
{
1717

1818
/// <summary>
@@ -180,24 +180,24 @@ public interface IClientApi
180180
/// <summary>
181181
/// Represents a collection of functions to interact with the API endpoints
182182
/// </summary>
183-
public class ClientApi : IClientApi
183+
public class DocApi : IDocApi
184184
{
185185
/// <summary>
186-
/// Initializes a new instance of the <see cref="ClientApi"/> class.
186+
/// Initializes a new instance of the <see cref="DocApi"/> class.
187187
/// </summary>
188188
/// <returns></returns>
189-
public ClientApi(String basePath)
189+
public DocApi(String basePath)
190190
{
191191
this.Configuration = new Configuration(new ApiClient(basePath));
192192
}
193193

194194
/// <summary>
195-
/// Initializes a new instance of the <see cref="ClientApi"/> class
195+
/// Initializes a new instance of the <see cref="DocApi"/> class
196196
/// using Configuration object
197197
/// </summary>
198198
/// <param name="configuration">An instance of Configuration</param>
199199
/// <returns></returns>
200-
public ClientApi(Configuration configuration = null)
200+
public DocApi(Configuration configuration = null)
201201
{
202202
if (configuration == null) // use the default one in Configuration
203203
this.Configuration = Configuration.Default;
@@ -274,7 +274,7 @@ public ApiResponse< AsyncDoc > CreateAsyncDocWithHttpInfo (Doc doc)
274274

275275
// verify the required parameter 'doc' is set
276276
if (doc == null)
277-
throw new ApiException(400, "Missing required parameter 'doc' when calling ClientApi->CreateAsyncDoc");
277+
throw new ApiException(400, "Missing required parameter 'doc' when calling DocApi->CreateAsyncDoc");
278278

279279

280280
var path_ = "/async_docs";
@@ -448,7 +448,7 @@ public ApiResponse< byte[] > CreateDocWithHttpInfo (Doc doc)
448448

449449
// verify the required parameter 'doc' is set
450450
if (doc == null)
451-
throw new ApiException(400, "Missing required parameter 'doc' when calling ClientApi->CreateDoc");
451+
throw new ApiException(400, "Missing required parameter 'doc' when calling DocApi->CreateDoc");
452452

453453

454454
var path_ = "/docs";
@@ -622,7 +622,7 @@ public ApiResponse< byte[] > GetAsyncDocWithHttpInfo (string id)
622622

623623
// verify the required parameter 'id' is set
624624
if (id == null)
625-
throw new ApiException(400, "Missing required parameter 'id' when calling ClientApi->GetAsyncDoc");
625+
throw new ApiException(400, "Missing required parameter 'id' when calling DocApi->GetAsyncDoc");
626626

627627

628628
var path_ = "/download/{id}";
@@ -790,7 +790,7 @@ public ApiResponse< AsyncDocStatus > GetAsyncDocStatusWithHttpInfo (string id)
790790

791791
// verify the required parameter 'id' is set
792792
if (id == null)
793-
throw new ApiException(400, "Missing required parameter 'id' when calling ClientApi->GetAsyncDocStatus");
793+
throw new ApiException(400, "Missing required parameter 'id' when calling DocApi->GetAsyncDocStatus");
794794

795795

796796
var path_ = "/status/{id}";

test/async.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AsyncTest {
88
static void Main(string[] args) {
99
Configuration.Default.Username = "YOUR_API_KEY_HERE";
1010
// Configuration.Default.Debug = true; // Not supported in Csharp
11-
ClientApi docraptor = new ClientApi();
11+
DocApi docraptor = new DocApi();
1212

1313
Doc doc = new Doc();
1414
doc.Name = "csharp-async.pdf";

test/invalid_async.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class InvalidAsyncTest {
88
static void Main(string[] args) {
99
Configuration.Default.Username = "YOUR_API_KEY_HERE";
1010
// Configuration.Default.Debug = true; // Not supported in Csharp
11-
ClientApi docraptor = new ClientApi();
11+
DocApi docraptor = new DocApi();
1212

1313
Doc doc = new Doc();
1414
doc.Name = new String('s', 201); // limit is 200 characters

test/invalid_sync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class InvalidSyncTest {
99
static void Main(string[] args) {
1010
Configuration.Default.Username = "YOUR_API_KEY_HERE";
1111
// Configuration.Default.Debug = true; // Not supported in Csharp
12-
ClientApi docraptor = new ClientApi();
12+
DocApi docraptor = new DocApi();
1313

1414
Doc doc = new Doc();
1515
doc.Name = new String('s', 201); // limit is 200 characters

test/sync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class SyncTest {
99
static void Main(string[] args) {
1010
Configuration.Default.Username = "YOUR_API_KEY_HERE";
1111
// Configuration.Default.Debug = true; // Not supported in Csharp
12-
ClientApi docraptor = new ClientApi();
12+
DocApi docraptor = new DocApi();
1313

1414
Doc doc = new Doc();
1515
doc.Name = "csharp-sync.pdf";

test/xlsx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class XlsxTest {
99
static void Main(string[] args) {
1010
Configuration.Default.Username = "YOUR_API_KEY_HERE";
1111
// Configuration.Default.Debug = true; // Not supported in Csharp
12-
ClientApi docraptor = new ClientApi();
12+
DocApi docraptor = new DocApi();
1313

1414
Doc doc = new Doc();
1515
doc.Name = "csharp-xlsx.xlsx";

0 commit comments

Comments
 (0)