Skip to content

Commit 39a3e47

Browse files
committed
Initial commit: exact code generated by CodeGen
This is generated exactly from https://app.swaggerhub.com/apis/prioux/CBRAIN/6.2.0.1 using these special CodeGen options for the PHP client: composerProjectName: aces/cbrain-php-client gitRepoBaseURL: https://github.com gitRepoId: aces/cbrain-php-client Adjustements will be made in the next few commits.
0 parents  commit 39a3e47

File tree

97 files changed

+29527
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+29527
-0
lines changed

.php_cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
return PhpCsFixer\Config::create()
4+
->setUsingCache(true)
5+
->setRules([
6+
'@PSR2' => true,
7+
'ordered_imports' => true,
8+
'phpdoc_order' => true,
9+
'array_syntax' => [ 'syntax' => 'short' ],
10+
'strict_comparison' => true,
11+
'strict_param' => true,
12+
'no_trailing_whitespace' => false,
13+
'no_trailing_whitespace_in_comment' => false,
14+
'braces' => false,
15+
'single_blank_line_at_eof' => false,
16+
'blank_line_after_namespace' => false,
17+
])
18+
->setFinder(
19+
PhpCsFixer\Finder::create()
20+
->exclude('test')
21+
->exclude('tests')
22+
->in(__DIR__)
23+
);

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
sudo: false
3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- hhvm
9+
before_install: "composer install"
10+
script: "vendor/bin/phpunit"

README.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# SwaggerClient-php
2+
API for interacting with the CBRAIN Platform
3+
4+
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
5+
6+
- API version: 6.2.0.1
7+
- Build package: io.swagger.codegen.languages.PhpClientCodegen
8+
For more information, please visit [https://github.com/aces/cbrain](https://github.com/aces/cbrain)
9+
10+
## Requirements
11+
12+
PHP 5.5 and later
13+
14+
## Installation & Usage
15+
### Composer
16+
17+
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
18+
19+
```
20+
{
21+
"repositories": [
22+
{
23+
"type": "git",
24+
"url": "https://github.com//aces/cbrain-php-client.git"
25+
}
26+
],
27+
"require": {
28+
"/aces/cbrain-php-client": "*@dev"
29+
}
30+
}
31+
```
32+
33+
Then run `composer install`
34+
35+
### Manual Installation
36+
37+
Download the files and include `autoload.php`:
38+
39+
```php
40+
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
41+
```
42+
43+
## Tests
44+
45+
To run the unit tests:
46+
47+
```
48+
composer install
49+
./vendor/bin/phpunit
50+
```
51+
52+
## Getting Started
53+
54+
Please follow the [installation procedure](#installation--usage) and then run the following:
55+
56+
```php
57+
<?php
58+
require_once(__DIR__ . '/vendor/autoload.php');
59+
60+
// Configure API key authorization: BrainPortalSession
61+
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
62+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
63+
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
64+
65+
$apiInstance = new Swagger\Client\Api\BourreauxApi(
66+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
67+
// This is optional, `GuzzleHttp\Client` will be used as default.
68+
new GuzzleHttp\Client(),
69+
$config
70+
);
71+
$page = 56; // int | Page number when paginating. See also the per_page parameter
72+
$per_page = 56; // int | Size of each page when paginating. See also the page parameter
73+
74+
try {
75+
$result = $apiInstance->bourreauxGet($page, $per_page);
76+
print_r($result);
77+
} catch (Exception $e) {
78+
echo 'Exception when calling BourreauxApi->bourreauxGet: ', $e->getMessage(), PHP_EOL;
79+
}
80+
81+
?>
82+
```
83+
84+
## Documentation for API Endpoints
85+
86+
All URIs are relative to *http://localhost:3000*
87+
88+
Class | Method | HTTP request | Description
89+
------------ | ------------- | ------------- | -------------
90+
*BourreauxApi* | [**bourreauxGet**](docs/Api/BourreauxApi.md#bourreauxget) | **GET** /bourreaux | Get a list of the Bourreaux available to be used by the current user.
91+
*BourreauxApi* | [**bourreauxIdGet**](docs/Api/BourreauxApi.md#bourreauxidget) | **GET** /bourreaux/{id} | Get information about a Bourreau.
92+
*DataProvidersApi* | [**dataProvidersGet**](docs/Api/DataProvidersApi.md#dataprovidersget) | **GET** /data_providers | Get a list of the Data Providers available to the current user.
93+
*DataProvidersApi* | [**dataProvidersIdBrowseGet**](docs/Api/DataProvidersApi.md#dataprovidersidbrowseget) | **GET** /data_providers/{id}/browse | List the files on a Data Provider.
94+
*DataProvidersApi* | [**dataProvidersIdDeletePost**](docs/Api/DataProvidersApi.md#dataprovidersiddeletepost) | **POST** /data_providers/{id}/delete | Deletes unregistered files from a CBRAIN Data provider.
95+
*DataProvidersApi* | [**dataProvidersIdGet**](docs/Api/DataProvidersApi.md#dataprovidersidget) | **GET** /data_providers/{id} | Get information on a particular Data Provider.
96+
*DataProvidersApi* | [**dataProvidersIdIsAliveGet**](docs/Api/DataProvidersApi.md#dataprovidersidisaliveget) | **GET** /data_providers/{id}/is_alive | Pings a Data Provider to check if it is running.
97+
*DataProvidersApi* | [**dataProvidersIdRegisterPost**](docs/Api/DataProvidersApi.md#dataprovidersidregisterpost) | **POST** /data_providers/{id}/register | Registers a file as a Userfile in CBRAIN.
98+
*DataProvidersApi* | [**dataProvidersIdUnregisterPost**](docs/Api/DataProvidersApi.md#dataprovidersidunregisterpost) | **POST** /data_providers/{id}/unregister | Unregisters files as Userfile in CBRAIN.
99+
*GroupsApi* | [**groupsGet**](docs/Api/GroupsApi.md#groupsget) | **GET** /groups | Get a list of the Groups (projects) available to the current user.
100+
*GroupsApi* | [**groupsIdDelete**](docs/Api/GroupsApi.md#groupsiddelete) | **DELETE** /groups/{id} | Deletes a Group (project).
101+
*GroupsApi* | [**groupsIdGet**](docs/Api/GroupsApi.md#groupsidget) | **GET** /groups/{id} | Get information on a Group (project).
102+
*GroupsApi* | [**groupsIdPut**](docs/Api/GroupsApi.md#groupsidput) | **PUT** /groups/{id} | Update the properties of a Group (project).
103+
*GroupsApi* | [**groupsPost**](docs/Api/GroupsApi.md#groupspost) | **POST** /groups | Creates a new Group.
104+
*SessionsApi* | [**sessionDelete**](docs/Api/SessionsApi.md#sessiondelete) | **DELETE** /session | Destroy the current session
105+
*SessionsApi* | [**sessionGet**](docs/Api/SessionsApi.md#sessionget) | **GET** /session | Get session information
106+
*SessionsApi* | [**sessionPost**](docs/Api/SessionsApi.md#sessionpost) | **POST** /session | Create a new session
107+
*TagsApi* | [**tagsGet**](docs/Api/TagsApi.md#tagsget) | **GET** /tags | Get a list of the tags currently in CBRAIN.
108+
*TagsApi* | [**tagsIdDelete**](docs/Api/TagsApi.md#tagsiddelete) | **DELETE** /tags/{id} | Delete a tag.
109+
*TagsApi* | [**tagsIdGet**](docs/Api/TagsApi.md#tagsidget) | **GET** /tags/{id} | Get one tag.
110+
*TagsApi* | [**tagsIdPut**](docs/Api/TagsApi.md#tagsidput) | **PUT** /tags/{id} | Update a tag.
111+
*TagsApi* | [**tagsPost**](docs/Api/TagsApi.md#tagspost) | **POST** /tags | Create a new tag.
112+
*TasksApi* | [**tasksGet**](docs/Api/TasksApi.md#tasksget) | **GET** /tasks | Get the list of Tasks.
113+
*TasksApi* | [**tasksIdGet**](docs/Api/TasksApi.md#tasksidget) | **GET** /tasks/{id} | Get information on a Task.
114+
*TasksApi* | [**tasksPost**](docs/Api/TasksApi.md#taskspost) | **POST** /tasks | Create a new Task.
115+
*ToolConfigsApi* | [**toolConfigsGet**](docs/Api/ToolConfigsApi.md#toolconfigsget) | **GET** /tool_configs | Get a list of tool versions installed.
116+
*ToolConfigsApi* | [**toolConfigsIdGet**](docs/Api/ToolConfigsApi.md#toolconfigsidget) | **GET** /tool_configs/{id} | Get information about a particular tool configuration
117+
*ToolsApi* | [**toolsGet**](docs/Api/ToolsApi.md#toolsget) | **GET** /tools | Get the list of Tools.
118+
*UserfilesApi* | [**userfilesChangeProviderPost**](docs/Api/UserfilesApi.md#userfileschangeproviderpost) | **POST** /userfiles/change_provider | Moves the Userfiles from their current Data Provider to a new one.
119+
*UserfilesApi* | [**userfilesCompressPost**](docs/Api/UserfilesApi.md#userfilescompresspost) | **POST** /userfiles/compress | Compresses many Userfiles each into their own GZIP archive.
120+
*UserfilesApi* | [**userfilesDeleteFilesDelete**](docs/Api/UserfilesApi.md#userfilesdeletefilesdelete) | **DELETE** /userfiles/delete_files | Delete several files that have been registered as Userfiles
121+
*UserfilesApi* | [**userfilesDownloadPost**](docs/Api/UserfilesApi.md#userfilesdownloadpost) | **POST** /userfiles/download | Download several files
122+
*UserfilesApi* | [**userfilesGet**](docs/Api/UserfilesApi.md#userfilesget) | **GET** /userfiles | List of the Userfiles accessible to the current user.
123+
*UserfilesApi* | [**userfilesIdContentGet**](docs/Api/UserfilesApi.md#userfilesidcontentget) | **GET** /userfiles/{id}/content | Get the content of a Userfile
124+
*UserfilesApi* | [**userfilesIdGet**](docs/Api/UserfilesApi.md#userfilesidget) | **GET** /userfiles/{id} | Get information on a Userfile.
125+
*UserfilesApi* | [**userfilesIdPut**](docs/Api/UserfilesApi.md#userfilesidput) | **PUT** /userfiles/{id} | Update information on a Userfile.
126+
*UserfilesApi* | [**userfilesPost**](docs/Api/UserfilesApi.md#userfilespost) | **POST** /userfiles | Creates a new Userfile and upload its content.
127+
*UserfilesApi* | [**userfilesSyncMultiplePost**](docs/Api/UserfilesApi.md#userfilessyncmultiplepost) | **POST** /userfiles/sync_multiple | Syncs Userfiles to the local Data Providers cache.
128+
*UserfilesApi* | [**userfilesUncompressPost**](docs/Api/UserfilesApi.md#userfilesuncompresspost) | **POST** /userfiles/uncompress | Uncompresses many Userfiles.
129+
*UsersApi* | [**usersGet**](docs/Api/UsersApi.md#usersget) | **GET** /users | Returns all of the users in CBRAIN. Only available to admins.
130+
*UsersApi* | [**usersIdDelete**](docs/Api/UsersApi.md#usersiddelete) | **DELETE** /users/{id} | Deletes a CBRAIN user
131+
*UsersApi* | [**usersIdGet**](docs/Api/UsersApi.md#usersidget) | **GET** /users/{id} | Returns information about a user
132+
*UsersApi* | [**usersIdPatch**](docs/Api/UsersApi.md#usersidpatch) | **PATCH** /users/{id} | Update information about a user
133+
*UsersApi* | [**usersPost**](docs/Api/UsersApi.md#userspost) | **POST** /users | Create a new user in CBRAIN. Only available to admins.
134+
135+
136+
## Documentation For Models
137+
138+
- [Bourreau](docs/Model/Bourreau.md)
139+
- [CbrainTask](docs/Model/CbrainTask.md)
140+
- [CbrainTaskModReq](docs/Model/CbrainTaskModReq.md)
141+
- [DataProvider](docs/Model/DataProvider.md)
142+
- [FileInfo](docs/Model/FileInfo.md)
143+
- [Group](docs/Model/Group.md)
144+
- [GroupModReq](docs/Model/GroupModReq.md)
145+
- [MultiRegistrationModReq](docs/Model/MultiRegistrationModReq.md)
146+
- [MultiUserfilesModReq](docs/Model/MultiUserfilesModReq.md)
147+
- [RegistrationInfo](docs/Model/RegistrationInfo.md)
148+
- [SessionInfo](docs/Model/SessionInfo.md)
149+
- [Tag](docs/Model/Tag.md)
150+
- [TagModReq](docs/Model/TagModReq.md)
151+
- [Tool](docs/Model/Tool.md)
152+
- [ToolConfig](docs/Model/ToolConfig.md)
153+
- [User](docs/Model/User.md)
154+
- [UserModReq](docs/Model/UserModReq.md)
155+
- [Userfile](docs/Model/Userfile.md)
156+
- [UserfileModReq](docs/Model/UserfileModReq.md)
157+
158+
159+
## Documentation For Authorization
160+
161+
162+
## BrainPortalSession
163+
164+
- **Type**: API key
165+
- **API key parameter name**: cbrain_api_token
166+
- **Location**: URL query string
167+
168+
169+
## Author
170+
171+
172+
173+

composer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "/aces/cbrain-php-client",
3+
"description": "",
4+
"keywords": [
5+
"swagger",
6+
"php",
7+
"sdk",
8+
"api"
9+
],
10+
"homepage": "http://swagger.io",
11+
"license": "proprietary",
12+
"authors": [
13+
{
14+
"name": "Swagger and contributors",
15+
"homepage": "https://github.com/swagger-api/swagger-codegen"
16+
}
17+
],
18+
"require": {
19+
"php": ">=5.5",
20+
"ext-curl": "*",
21+
"ext-json": "*",
22+
"ext-mbstring": "*",
23+
"guzzlehttp/guzzle": "^6.2"
24+
},
25+
"require-dev": {
26+
"phpunit/phpunit": "^4.8",
27+
"squizlabs/php_codesniffer": "~2.6",
28+
"friendsofphp/php-cs-fixer": "~2.12"
29+
},
30+
"autoload": {
31+
"psr-4": { "Swagger\\Client\\" : "lib/" }
32+
},
33+
"autoload-dev": {
34+
"psr-4": { "Swagger\\Client\\" : "test/" }
35+
}
36+
}

docs/Api/BourreauxApi.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Swagger\Client\BourreauxApi
2+
3+
All URIs are relative to *http://localhost:3000*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**bourreauxGet**](BourreauxApi.md#bourreauxGet) | **GET** /bourreaux | Get a list of the Bourreaux available to be used by the current user.
8+
[**bourreauxIdGet**](BourreauxApi.md#bourreauxIdGet) | **GET** /bourreaux/{id} | Get information about a Bourreau.
9+
10+
11+
# **bourreauxGet**
12+
> \Swagger\Client\Model\Bourreau[] bourreauxGet($page, $per_page)
13+
14+
Get a list of the Bourreaux available to be used by the current user.
15+
16+
This method returns a list of Bourreau objects.
17+
18+
### Example
19+
```php
20+
<?php
21+
require_once(__DIR__ . '/vendor/autoload.php');
22+
23+
// Configure API key authorization: BrainPortalSession
24+
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
25+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
26+
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
27+
28+
$apiInstance = new Swagger\Client\Api\BourreauxApi(
29+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
30+
// This is optional, `GuzzleHttp\Client` will be used as default.
31+
new GuzzleHttp\Client(),
32+
$config
33+
);
34+
$page = 56; // int | Page number when paginating. See also the per_page parameter
35+
$per_page = 56; // int | Size of each page when paginating. See also the page parameter
36+
37+
try {
38+
$result = $apiInstance->bourreauxGet($page, $per_page);
39+
print_r($result);
40+
} catch (Exception $e) {
41+
echo 'Exception when calling BourreauxApi->bourreauxGet: ', $e->getMessage(), PHP_EOL;
42+
}
43+
?>
44+
```
45+
46+
### Parameters
47+
48+
Name | Type | Description | Notes
49+
------------- | ------------- | ------------- | -------------
50+
**page** | **int**| Page number when paginating. See also the per_page parameter | [optional]
51+
**per_page** | **int**| Size of each page when paginating. See also the page parameter | [optional]
52+
53+
### Return type
54+
55+
[**\Swagger\Client\Model\Bourreau[]**](../Model/Bourreau.md)
56+
57+
### Authorization
58+
59+
[BrainPortalSession](../../README.md#BrainPortalSession)
60+
61+
### HTTP request headers
62+
63+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
64+
- **Accept**: application/json, application/xml
65+
66+
[[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)
67+
68+
# **bourreauxIdGet**
69+
> \Swagger\Client\Model\Bourreau bourreauxIdGet($id)
70+
71+
Get information about a Bourreau.
72+
73+
This method returns a single Bourreau object based on the ID parameter.
74+
75+
### Example
76+
```php
77+
<?php
78+
require_once(__DIR__ . '/vendor/autoload.php');
79+
80+
// Configure API key authorization: BrainPortalSession
81+
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('cbrain_api_token', 'YOUR_API_KEY');
82+
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
83+
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('cbrain_api_token', 'Bearer');
84+
85+
$apiInstance = new Swagger\Client\Api\BourreauxApi(
86+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
87+
// This is optional, `GuzzleHttp\Client` will be used as default.
88+
new GuzzleHttp\Client(),
89+
$config
90+
);
91+
$id = 56; // int | ID of the Bourreau to get information on.
92+
93+
try {
94+
$result = $apiInstance->bourreauxIdGet($id);
95+
print_r($result);
96+
} catch (Exception $e) {
97+
echo 'Exception when calling BourreauxApi->bourreauxIdGet: ', $e->getMessage(), PHP_EOL;
98+
}
99+
?>
100+
```
101+
102+
### Parameters
103+
104+
Name | Type | Description | Notes
105+
------------- | ------------- | ------------- | -------------
106+
**id** | **int**| ID of the Bourreau to get information on. |
107+
108+
### Return type
109+
110+
[**\Swagger\Client\Model\Bourreau**](../Model/Bourreau.md)
111+
112+
### Authorization
113+
114+
[BrainPortalSession](../../README.md#BrainPortalSession)
115+
116+
### HTTP request headers
117+
118+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
119+
- **Accept**: application/json, application/xml
120+
121+
[[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)
122+

0 commit comments

Comments
 (0)