Skip to content

Commit

Permalink
Rename ClientApi to DocApi.
Browse files Browse the repository at this point in the history
  • Loading branch information
jqr committed Jan 30, 2016
1 parent 6ada924 commit 9401362
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ See [examples](examples/) for runnable examples with file output, error handling
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE"); // this key works for test documents
// $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

$doc = new DocRaptor\Doc();
$doc->setTest(true); // test documents are free but watermarked
Expand Down
16 changes: 6 additions & 10 deletions docraptor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ schemes: [https]
securityDefinitions:
basicAuth:
type: basic
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
description: Use your API key as the username. Password does not need to be set.
produces:
- application/json
- application/xml
Expand All @@ -22,11 +22,10 @@ paths:
/docs:
post:
operationId: createDoc
tags: [Client]
tags: [Doc]
description: >
Creates a document synchronously.
security:

- basicAuth: []
parameters:
- name: doc
Expand Down Expand Up @@ -54,7 +53,7 @@ paths:
/async_docs:
post:
operationId: createAsyncDoc
tags: [Client]
tags: [Doc]
description: >
Creates a document asynchronously.
You must use a callback url or the the returned status id and the status api to find out when it completes.
Expand Down Expand Up @@ -87,11 +86,10 @@ paths:
/status/{id}:
get:
operationId: getAsyncDocStatus
tags: [Client]
tags: [Doc]
description: >
Check on the status of an asynchronously created document.
security:

- basicAuth: []
parameters:
- name: id
Expand All @@ -112,15 +110,13 @@ paths:
500:
description: Server Error


/download/{id}:
get:
operationId: getAsyncDoc
tags: [Client]
description:
tags: [Doc]
description: >
Downloads a document.
security:

- basicAuth: []
parameters:
- name: id
Expand Down
2 changes: 1 addition & 1 deletion examples/async.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE"); # this key works for test documents
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

try {

Expand Down
2 changes: 1 addition & 1 deletion examples/sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE"); # this key works for test documents
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

try {

Expand Down
16 changes: 8 additions & 8 deletions lib/ClientApi.php → lib/DocApi.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* ClientApi
* DocApi
* PHP version 5
*
* @category Class
Expand Down Expand Up @@ -39,15 +39,15 @@
use \DocRaptor\ObjectSerializer;

/**
* ClientApi Class Doc Comment
* DocApi Class Doc Comment
*
* @category Class
* @package DocRaptor
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ClientApi
class DocApi
{

/**
Expand Down Expand Up @@ -82,7 +82,7 @@ public function getApiClient()
/**
* Set the API client
* @param \DocRaptor\ApiClient $apiClient set the API client
* @return ClientApi
* @return DocApi
*/
public function setApiClient(ApiClient $apiClient)
{
Expand Down Expand Up @@ -193,7 +193,7 @@ public function createAsyncDocWithHttpInfo($doc)
*
*
* @param \DocRaptor\Doc $doc The document to be created. (required)
* @return String
* @return string
* @throws \DocRaptor\ApiException on non-2xx response
*/
public function createDoc($doc)
Expand All @@ -209,7 +209,7 @@ public function createDoc($doc)
*
*
* @param \DocRaptor\Doc $doc The document to be created. (required)
* @return Array of String, HTTP status code, HTTP response headers (array of strings)
* @return Array of ByteArray, HTTP status code, HTTP response headers (array of strings)
* @throws \DocRaptor\ApiException on non-2xx response
*/
public function createDocWithHttpInfo($doc)
Expand Down Expand Up @@ -289,7 +289,7 @@ public function createDocWithHttpInfo($doc)
*
*
* @param string $id The download_id returned from status request or a callback. (required)
* @return String
* @return string
* @throws \DocRaptor\ApiException on non-2xx response
*/
public function getAsyncDoc($id)
Expand All @@ -305,7 +305,7 @@ public function getAsyncDoc($id)
*
*
* @param string $id The download_id returned from status request or a callback. (required)
* @return Array of String, HTTP status code, HTTP response headers (array of strings)
* @return Array of ByteArray, HTTP status code, HTTP response headers (array of strings)
* @throws \DocRaptor\ApiException on non-2xx response
*/
public function getAsyncDocWithHttpInfo($id)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* ClientApiTest
* DocApiTest
* PHP version 5
*
* @category Class
Expand Down Expand Up @@ -39,15 +39,15 @@
use \DocRaptor\ObjectSerializer;

/**
* ClientApiTest Class Doc Comment
* DocApiTest Class Doc Comment
*
* @category Class
* @package DocRaptor
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
* @link https://github.com/swagger-api/swagger-codegen
*/
class ClientApiTest extends \PHPUnit_Framework_TestCase
class DocApiTest extends \PHPUnit_Framework_TestCase
{

/**
Expand Down
2 changes: 1 addition & 1 deletion test/async.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE");
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

$doc = new DocRaptor\Doc();
$doc->setName("php-async.pdf");
Expand Down
2 changes: 1 addition & 1 deletion test/invalid_async.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE");
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

$doc = new DocRaptor\Doc();
$doc->setName(str_repeat("s", 201)); # limit is 200 characters
Expand Down
2 changes: 1 addition & 1 deletion test/invalid_sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE");
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

$doc = new DocRaptor\Doc();
$doc->setName(str_repeat("s", 201)); # limit is 200 characters
Expand Down
2 changes: 1 addition & 1 deletion test/sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE");
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

$doc = new DocRaptor\Doc();
$doc->setName("php-sync.pdf");
Expand Down
2 changes: 1 addition & 1 deletion test/xlsx.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$configuration = DocRaptor\Configuration::getDefaultConfiguration();
$configuration->setUsername("YOUR_API_KEY_HERE");
# $configuration->setDebug(true);
$docraptor = new DocRaptor\ClientApi();
$docraptor = new DocRaptor\DocApi();

$doc = new DocRaptor\Doc();
$doc->setName("php-xlsx.xlsx");
Expand Down

0 comments on commit 9401362

Please sign in to comment.