Initial commit

parents
swagger-generated-php-client.zip
swagger.json
swagger.yaml
.idea
nbproject
.buildpath
.project
.settings
Thumbs.db
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
This diff is collapsed.
<?php
return Symfony\CS\Config::create()
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
->setUsingCache(true)
->fixers(
[
'ordered_use',
'phpdoc_order',
'short_array_syntax',
'strict',
'strict_param'
]
)
->finder(
Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__)
);
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
before_install: "composer install"
script: "vendor/bin/phpunit"
This diff is collapsed.
# SwaggerClient-php
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0.2
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
PHP 5.4.0 and later
## Installation & Usage
### Composer
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
```
{
"repositories": [
{
"type": "git",
"url": "https://github.com//.git"
}
],
"require": {
"/": "*@dev"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
require_once('/path/to/SwaggerClient-php/autoload.php');
```
## Tests
To run the unit tests:
```
composer install
./vendor/bin/phpunit
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$doc_id = "doc_id_example"; // string |
try {
$result = $api_instance->getDocData($doc_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getDocData: ', $e->getMessage(), PHP_EOL;
}
?>
```
## Documentation for API Endpoints
All URIs are relative to *https://protocoltest.minedu.gov.gr:443/openpapyros/api*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**getDocData**](docs/Api/DefaultApi.md#getdocdata) | **GET** /document/data/{docId} | Επιστροφή των δεδομένων με τα οποία έχει αρχειοθετηθεί ένα έγγραφο
*DefaultApi* | [**getPdf**](docs/Api/DefaultApi.md#getpdf) | **GET** /document/pdf/{docId} | Επιστρέφει το έγγραφο που έχει ζητηθεί με το Id του σε μορφή Base64 encoded String
*DefaultApi* | [**pauth**](docs/Api/DefaultApi.md#pauth) | **PUT** /pauthenticate/pauth | Αυθεντικοποίηση του χρήστη και επιστροφή ενός Api Key με το οποίο ο χρήστης μπορεί να προχωρήσει στις υπηρεσιες του Api θέτοτας το κλειδί σαν Header του Api ώς \&quot;Api_Key\&quot;
*DefaultApi* | [**seacrhDocuments**](docs/Api/DefaultApi.md#seacrhdocuments) | **POST** /search/documents | Επιστροφή ενός Array με στοιχεία τους αριθμούς του πρωτοκόλλου που ανταποκρίνονται στα σοιχεία της αναήτησης
*IdApi* | [**postProtocol**](docs/Api/IdApi.md#postprotocol) | **POST** /protocol/submit | Στο συγκεκριμένο URI μπορεί να πραγματοποιηθεί κλήση με μοναδικό αντκείμενο όπως περιγράφεται από το μοντέλο. Γνα να δεχτεί ο Server και να καταλάβει το έγγραφο (\&quot;document\&quot;: \&quot;string\&quot;) πρέπει αυτό να βρίσκεται σε Base64 μορφή
## Documentation For Models
- [ApiKey](docs/Model/ApiKey.md)
- [Credentials](docs/Model/Credentials.md)
- [Document](docs/Model/Document.md)
- [DocumentDataDto](docs/Model/DocumentDataDto.md)
- [DocumentDto](docs/Model/DocumentDto.md)
- [DocumentInfo](docs/Model/DocumentInfo.md)
- [ErrorReport](docs/Model/ErrorReport.md)
- [ProtocolNumber](docs/Model/ProtocolNumber.md)
- [Protocolin](docs/Model/Protocolin.md)
- [SearchModel](docs/Model/SearchModel.md)
## Documentation For Authorization
All endpoints do not require authorization.
## Author
<?php
/**
* test
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0.2
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* An example of a project-specific implementation.
*
* After registering this autoload function with SPL, the following line
* would cause the function to attempt to load the \Swagger\Client\Baz\Qux class
* from /path/to/project/lib/Baz/Qux.php:
*
* new \Swagger\Client\Baz\Qux;
*
* @param string $class The fully-qualified class name.
*
* @return void
*/
spl_autoload_register(function ($class) {
// project-specific namespace prefix
$prefix = 'Swagger\\Client\\';
// base directory for the namespace prefix
$base_dir = __DIR__ . '/lib/';
// does the class use the namespace prefix?
$len = strlen($prefix);
if (strncmp($prefix, $class, $len) !== 0) {
// no, move to the next registered autoloader
return;
}
// get the relative class name
$relative_class = substr($class, $len);
// replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require $file;
}
});
{
"name": "/",
"description": "",
"keywords": [
"swagger",
"php",
"sdk",
"api"
],
"homepage": "http://swagger.io",
"license": "Apache-2.0",
"authors": [
{
"name": "Swagger and contributors",
"homepage": "https://github.com/swagger-api/swagger-codegen"
}
],
"require": {
"php": ">=5.4",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "~4.8",
"satooshi/php-coveralls": "~1.0",
"squizlabs/php_codesniffer": "~2.6",
"friendsofphp/php-cs-fixer": "~1.12"
},
"autoload": {
"psr-4": { "Swagger\\Client\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "Swagger\\Client\\" : "test/" }
}
}
This diff is collapsed.
# Swagger\Client\DefaultApi
All URIs are relative to *https://protocoltest.minedu.gov.gr:443/openpapyros/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getDocData**](DefaultApi.md#getDocData) | **GET** /document/data/{docId} | Επιστροφή των δεδομένων με τα οποία έχει αρχειοθετηθεί ένα έγγραφο
[**getPdf**](DefaultApi.md#getPdf) | **GET** /document/pdf/{docId} | Επιστρέφει το έγγραφο που έχει ζητηθεί με το Id του σε μορφή Base64 encoded String
[**pauth**](DefaultApi.md#pauth) | **PUT** /pauthenticate/pauth | Αυθεντικοποίηση του χρήστη και επιστροφή ενός Api Key με το οποίο ο χρήστης μπορεί να προχωρήσει στις υπηρεσιες του Api θέτοτας το κλειδί σαν Header του Api ώς \&quot;Api_Key\&quot;
[**seacrhDocuments**](DefaultApi.md#seacrhDocuments) | **POST** /search/documents | Επιστροφή ενός Array με στοιχεία τους αριθμούς του πρωτοκόλλου που ανταποκρίνονται στα σοιχεία της αναήτησης
# **getDocData**
> \Swagger\Client\Model\DocumentDataDto getDocData($doc_id)
Επιστροφή των δεδομένων με τα οποία έχει αρχειοθετηθεί ένα έγγραφο
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$doc_id = "doc_id_example"; // string |
try {
$result = $api_instance->getDocData($doc_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getDocData: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**doc_id** | **string**| |
### Return type
[**\Swagger\Client\Model\DocumentDataDto**](../Model/DocumentDataDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **getPdf**
> \Swagger\Client\Model\DocumentDto getPdf($doc_id)
Επιστρέφει το έγγραφο που έχει ζητηθεί με το Id του σε μορφή Base64 encoded String
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$doc_id = "doc_id_example"; // string |
try {
$result = $api_instance->getPdf($doc_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getPdf: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**doc_id** | **string**| |
### Return type
[**\Swagger\Client\Model\DocumentDto**](../Model/DocumentDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **pauth**
> \Swagger\Client\Model\ApiKey pauth($body)
Αυθεντικοποίηση του χρήστη και επιστροφή ενός Api Key με το οποίο ο χρήστης μπορεί να προχωρήσει στις υπηρεσιες του Api θέτοτας το κλειδί σαν Header του Api ώς \"Api_Key\"
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$body = new \Swagger\Client\Model\Credentials(); // \Swagger\Client\Model\Credentials | Credentials
try {
$result = $api_instance->pauth($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->pauth: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Credentials**](../Model/\Swagger\Client\Model\Credentials.md)| Credentials |
### Return type
[**\Swagger\Client\Model\ApiKey**](../Model/ApiKey.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# **seacrhDocuments**
> \Swagger\Client\Model\ProtocolNumber[] seacrhDocuments($body)
Επιστροφή ενός Array με στοιχεία τους αριθμούς του πρωτοκόλλου που ανταποκρίνονται στα σοιχεία της αναήτησης
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$body = new \Swagger\Client\Model\SearchModel(); // \Swagger\Client\Model\SearchModel |
try {
$result = $api_instance->seacrhDocuments($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->seacrhDocuments: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\SearchModel**](../Model/\Swagger\Client\Model\SearchModel.md)| | [optional]
### Return type
[**\Swagger\Client\Model\ProtocolNumber[]**](../Model/ProtocolNumber.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# Swagger\Client\IdApi
All URIs are relative to *https://protocoltest.minedu.gov.gr:443/openpapyros/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**postProtocol**](IdApi.md#postProtocol) | **POST** /protocol/submit | Στο συγκεκριμένο URI μπορεί να πραγματοποιηθεί κλήση με μοναδικό αντκείμενο όπως περιγράφεται από το μοντέλο. Γνα να δεχτεί ο Server και να καταλάβει το έγγραφο (\&quot;document\&quot;: \&quot;string\&quot;) πρέπει αυτό να βρίσκεται σε Base64 μορφή
# **postProtocol**
> \Swagger\Client\Model\ProtocolNumber postProtocol($body)
Στο συγκεκριμένο URI μπορεί να πραγματοποιηθεί κλήση με μοναδικό αντκείμενο όπως περιγράφεται από το μοντέλο. Γνα να δεχτεί ο Server και να καταλάβει το έγγραφο (\"document\": \"string\") πρέπει αυτό να βρίσκεται σε Base64 μορφή
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\IdApi();
$body = new \Swagger\Client\Model\Protocolin(); // \Swagger\Client\Model\Protocolin | Document Metadata
try {
$result = $api_instance->postProtocol($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling IdApi->postProtocol: ', $e->getMessage(), PHP_EOL;
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**\Swagger\Client\Model\Protocolin**](../Model/\Swagger\Client\Model\Protocolin.md)| Document Metadata |
### Return type
[**\Swagger\Client\Model\ProtocolNumber**](../Model/ProtocolNumber.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
# ApiKey
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**api_key** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# Credentials
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **string** | | [optional]
**password** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# Document
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**base64** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# DocumentDataDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**protocol_number** | **int** | | [optional]
**protocol_date** | **string** | | [optional]
**doc_type** | **int** | | [optional]
**sender** | **int** | | [optional]
**sender_protocol** | **string** | | [optional]
**sender_date_protocol** | **string** | | [optional]
**doc_category** | **int** | | [optional]
**theme** | **string** | | [optional]
**ada** | **string** | | [optional]
**attached_docs_descr** | **string** | | [optional]
**director** | **string** | | [optional]
**attached_id** | **string[]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# DocumentDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**document** | [**\Swagger\Client\Model\Document**](Document.md) | | [optional]
**file_name** | **string** | | [optional]
**description** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# DocumentInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**doc_id** | **string** | | [optional]
**description** | **string** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# ErrorReport
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error_code** | **int** | | [optional]
**http_status_code** | **int** | | [optional]
**error_message** | **string** | | [optional]
**dev_message** | **string** | | [optional]
**see_also** | **string** | | [optional]
**code_error** | **object[]** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# ProtocolNumber
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**doc_id** | **string** | | [optional]
**protocol_year** | **int** | | [optional]
**protocol_date** | **string** | | [optional]
**protocol_number** | **string** | | [optional]
**attachments** | [**\Swagger\Client\Model\DocumentInfo[]**](DocumentInfo.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# Protocolin
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sender_id** | **int** | Υποχρεωτικό πεδίο |
**sender_protocol** | **string** | | [optional]
**sender_protocol_date** | **string** | | [optional]
**doc_category** | **int** | | [optional]
**theme** | **string** | Υποχρεωτικό πεδίο |
**ada** | **string** | | [optional]
**description** | **string** | | [optional]
**main_doc** | [**\Swagger\Client\Model\DocumentDto**](DocumentDto.md) | | [optional]
**attached_doc** | [**\Swagger\Client\Model\DocumentDto[]**](DocumentDto.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
# SearchModel
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**doc_type** | **int** | Required |
**sender_id** | **int** | | [optional]
**start_date** | [**\DateTime**](\DateTime.md) | | [optional]
**end_date** | [**\DateTime**](\DateTime.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"