No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 0.1.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/git_user_id/git_repo_id.git"
}
],
"require": {
"git_user_id/git_repo_id": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\DocumentRequestSchema(); // \Swagger\Client\Model\DocumentRequestSchema |
try {
$apiInstance->addDocumentDocumentPost($body);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->addDocumentDocumentPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: APIKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\IndexSchema(); // \Swagger\Client\Model\IndexSchema |
try {
$result = $apiInstance->addIndexIndexPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->addIndexIndexPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: APIKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\QuestionSchema(); // \Swagger\Client\Model\QuestionSchema |
try {
$result = $apiInstance->askDocumentAskPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->askDocumentAskPost: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: APIKeyHeader
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\MCQSchema(); // \Swagger\Client\Model\MCQSchema |
try {
$result = $apiInstance->askDocumentMcqPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->askDocumentMcqPost: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to /
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | addDocumentDocumentPost | POST /document/ | Add Document |
DefaultApi | addIndexIndexPost | POST /index/ | Add Index |
DefaultApi | askDocumentAskPost | POST /ask/ | Ask Document |
DefaultApi | askDocumentMcqPost | POST /mcq/ | Ask Document |
- DocumentRequestSchema
- HTTPValidationError
- IndexResponseSchema
- IndexSchema
- MCQSchema
- QuestionSchema
- ValidationError
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header