Skip to content

Commit e27d3c4

Browse files
try
1 parent 262d79f commit e27d3c4

File tree

81 files changed

+168
-640
lines changed

Some content is hidden

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

81 files changed

+168
-640
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@ LORIS REST API and Module endpoints.
44

55
## Server Configuration
66

7-
This schema has TWO types of endpoints with different base URLs:
8-
9-
| Type | Base URL | Endpoints |
10-
|------|----------|-----------|
11-
| REST API (versioned) | `{baseUrl}/api/{version}` | /login, /candidates, /projects, /sites |
12-
| Module (non-versioned) | `{baseUrl}` (root) | /instrument_manager, /instrument_manager/instrument_data |
13-
14-
**InstrumentManager endpoints use path-level server overrides** to specify the non-versioned base URL.
15-
When using `InstrumentManagerApi`, configure with base URL only (no `/api/{version}`).
7+
| Type | Configuration | Endpoints |
8+
|------|---------------|-----------|
9+
| REST API | `setHost(\"{$baseUrl}/api/{$version}\")` | /login, /candidates, /projects, /sites |
10+
| Module | `setHost($baseUrl)` | /instrument_manager/_* |
1611

1712

1813
For more information, please visit [https://github.com/aces/Loris](https://github.com/aces/Loris).
@@ -81,7 +76,7 @@ try {
8176

8277
## API Endpoints
8378

84-
All URIs are relative to *https://demo.loris.ca/api/v0.0.4-dev*
79+
All URIs are relative to *http://http:*
8580

8681
Class | Method | HTTP request | Description
8782
------------ | ------------- | ------------- | -------------

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "aces/loris-php-api-client",
33
"version": "0.0.4-dev",
4-
"description": "LORIS REST API and Module endpoints. ## Server Configuration This schema has TWO types of endpoints with different base URLs: | Type | Base URL | Endpoints | |------|----------|-----------| | REST API (versioned) | `{baseUrl}/api/{version}` | /login, /candidates, /projects, /sites | | Module (non-versioned) | `{baseUrl}` (root) | /instrument_manager, /instrument_manager/instrument_data | **InstrumentManager endpoints use path-level server overrides** to specify the non-versioned base URL. When using `InstrumentManagerApi`, configure with base URL only (no `/api/{version}`).",
4+
"description": "LORIS REST API and Module endpoints. ## Server Configuration | Type | Configuration | Endpoints | |------|---------------|-----------| | REST API | `setHost(\"{$baseUrl}/api/{$version}\")` | /login, /candidates, /projects, /sites | | Module | `setHost($baseUrl)` | /instrument_manager/_* |",
55
"keywords": [
66
"openapitools",
77
"openapi-generator",

docs/Api/AuthenticationApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
JWT authentication
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |

docs/Api/CandidatesApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Candidate management
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |

docs/Api/InstrumentManagerApi.md

Lines changed: 13 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# LORISClient\InstrumentManagerApi
22

3-
**Module endpoints (non-versioned)** These endpoints do NOT use the `/api/{version}` prefix. Configure client with base URL only. ```php // For InstrumentManager, use base URL without /api/{version} $moduleConfig->setHost('https://your-loris.ca'); ```
3+
Instrument installation and bulk data upload. Configure: `$config->setHost($baseUrl)` (no `/api/{version}`)
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |
@@ -16,22 +16,9 @@ All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the ope
1616
```php
1717
getInstrumentDataHeaders($action, $instrument, $instruments): string
1818
```
19-
### URI(s):
20-
- {protocol}://{host} Module endpoint (non-versioned)
21-
- Variables:
22-
- protocol: No description provided
23-
- Allowed values:
24-
- http
25-
- https
26-
- Default value: https
27-
28-
- host: No description provided
29-
- Default value: demo.loris.ca
3019

3120
Get expected CSV headers for instrument data upload
3221

33-
Returns a CSV template with expected headers for the specified instrument(s). Use either `instrument` (single) or `instruments` (comma-separated), not both. **Note**: This is a module endpoint. Configure client with base URL only.
34-
3522
### Example
3623

3724
```php
@@ -49,18 +36,12 @@ $apiInstance = new LORISClient\Api\InstrumentManagerApi(
4936
new GuzzleHttp\Client(),
5037
$config
5138
);
52-
$action = 'action_example'; // string | - CREATE_SESSIONS: Headers for creating new candidates/sessions - VALIDATE_SESSIONS: Headers for existing candidates/sessions only
53-
$instrument = 'instrument_example'; // string | Single instrument name
54-
$instruments = 'instruments_example'; // string | Multiple instrument names (comma-separated)
55-
56-
$hostIndex = 0;
57-
$variables = [
58-
'protocol' => 'YOUR_VALUE',
59-
'host' => 'YOUR_VALUE',
60-
];
39+
$action = 'action_example'; // string
40+
$instrument = 'instrument_example'; // string
41+
$instruments = 'instruments_example'; // string
6142

6243
try {
63-
$result = $apiInstance->getInstrumentDataHeaders($action, $instrument, $instruments, $hostIndex, $variables);
44+
$result = $apiInstance->getInstrumentDataHeaders($action, $instrument, $instruments);
6445
print_r($result);
6546
} catch (Exception $e) {
6647
echo 'Exception when calling InstrumentManagerApi->getInstrumentDataHeaders: ', $e->getMessage(), PHP_EOL;
@@ -71,11 +52,9 @@ try {
7152

7253
| Name | Type | Description | Notes |
7354
| ------------- | ------------- | ------------- | ------------- |
74-
| **action** | **string**| - CREATE_SESSIONS: Headers for creating new candidates/sessions - VALIDATE_SESSIONS: Headers for existing candidates/sessions only | |
75-
| **instrument** | **string**| Single instrument name | [optional] |
76-
| **instruments** | **string**| Multiple instrument names (comma-separated) | [optional] |
77-
| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] |
78-
| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] |
55+
| **action** | **string**| | |
56+
| **instrument** | **string**| | [optional] |
57+
| **instruments** | **string**| | [optional] |
7958

8059
### Return type
8160

@@ -99,22 +78,9 @@ try {
9978
```php
10079
installInstrument($installFile): \LORISClient\LORISClient\Model\SuccessResponse
10180
```
102-
### URI(s):
103-
- {protocol}://{host} Module endpoint (non-versioned)
104-
- Variables:
105-
- protocol: No description provided
106-
- Allowed values:
107-
- http
108-
- https
109-
- Default value: https
110-
111-
- host: No description provided
112-
- Default value: demo.loris.ca
11381

11482
Install instrument from LINST file or REDCap data dictionary
11583

116-
Installs a new instrument in LORIS from either: - A LINST file (.linst) - A CSV file with REDCap data dictionary format **Note**: This is a module endpoint. Configure client with base URL only, not `/api/{version}`.
117-
11884
### Example
11985

12086
```php
@@ -134,14 +100,8 @@ $apiInstance = new LORISClient\Api\InstrumentManagerApi(
134100
);
135101
$installFile = '/path/to/file.txt'; // \SplFileObject | LINST file or REDCap CSV to install
136102

137-
$hostIndex = 0;
138-
$variables = [
139-
'protocol' => 'YOUR_VALUE',
140-
'host' => 'YOUR_VALUE',
141-
];
142-
143103
try {
144-
$result = $apiInstance->installInstrument($installFile, $hostIndex, $variables);
104+
$result = $apiInstance->installInstrument($installFile);
145105
print_r($result);
146106
} catch (Exception $e) {
147107
echo 'Exception when calling InstrumentManagerApi->installInstrument: ', $e->getMessage(), PHP_EOL;
@@ -153,8 +113,6 @@ try {
153113
| Name | Type | Description | Notes |
154114
| ------------- | ------------- | ------------- | ------------- |
155115
| **installFile** | **\SplFileObject****\SplFileObject**| LINST file or REDCap CSV to install | |
156-
| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] |
157-
| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] |
158116

159117
### Return type
160118

@@ -178,22 +136,9 @@ try {
178136
```php
179137
uploadInstrumentData($action, $dataFile, $instrument, $multiInstrument): \LORISClient\LORISClient\Model\InstrumentDataResponse
180138
```
181-
### URI(s):
182-
- {protocol}://{host} Module endpoint (non-versioned)
183-
- Variables:
184-
- protocol: No description provided
185-
- Allowed values:
186-
- http
187-
- https
188-
- Default value: https
189-
190-
- host: No description provided
191-
- Default value: demo.loris.ca
192139

193140
Bulk upload instrument data from CSV
194141

195-
Uploads CSV data for one or more instruments. **Actions**: - `CREATE_SESSIONS`: Creates candidates/sessions if they don't exist - `VALIDATE_SESSIONS`: Fails if any candidate/session is missing **CSV Requirements**: - Must include `PSCID` and `Visit_label` columns - For single instrument: include instrument field columns - For multi-instrument: set `multi-instrument=true` and include `Instrument` column **Note**: This is a module endpoint. Configure client with base URL only.
196-
197142
### Example
198143

199144
```php
@@ -213,17 +158,11 @@ $apiInstance = new LORISClient\Api\InstrumentManagerApi(
213158
);
214159
$action = 'action_example'; // string
215160
$dataFile = '/path/to/file.txt'; // \SplFileObject | CSV file with instrument data
216-
$instrument = 'instrument_example'; // string | Single instrument name (omit for multi-instrument)
161+
$instrument = 'instrument_example'; // string | Single instrument name
217162
$multiInstrument = 'multiInstrument_example'; // string | Set to \\\"true\\\" for multi-instrument CSV
218163

219-
$hostIndex = 0;
220-
$variables = [
221-
'protocol' => 'YOUR_VALUE',
222-
'host' => 'YOUR_VALUE',
223-
];
224-
225164
try {
226-
$result = $apiInstance->uploadInstrumentData($action, $dataFile, $instrument, $multiInstrument, $hostIndex, $variables);
165+
$result = $apiInstance->uploadInstrumentData($action, $dataFile, $instrument, $multiInstrument);
227166
print_r($result);
228167
} catch (Exception $e) {
229168
echo 'Exception when calling InstrumentManagerApi->uploadInstrumentData: ', $e->getMessage(), PHP_EOL;
@@ -236,10 +175,8 @@ try {
236175
| ------------- | ------------- | ------------- | ------------- |
237176
| **action** | **string**| | |
238177
| **dataFile** | **\SplFileObject****\SplFileObject**| CSV file with instrument data | |
239-
| **instrument** | **string**| Single instrument name (omit for multi-instrument) | [optional] |
178+
| **instrument** | **string**| Single instrument name | [optional] |
240179
| **multiInstrument** | **string**| Set to \\\"true\\\" for multi-instrument CSV | [optional] |
241-
| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] |
242-
| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] |
243180

244181
### Return type
245182

docs/Api/InstrumentsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Per-candidate instrument data
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |

docs/Api/ProjectsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Project information
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |

docs/Api/SitesApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Site information
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |

docs/Api/VisitsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Visit/timepoint management
44

5-
All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.
5+
All URIs are relative to http://http:, except if the operation defines another base path.
66

77
| Method | HTTP request | Description |
88
| ------------- | ------------- | ------------- |

docs/Model/IdMapping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**extStudyID** | **string** | External study ID (PSCID) | [optional]
8-
**candID** | **string** | LORIS candidate ID | [optional]
7+
**extStudyID** | **string** | | [optional]
8+
**candID** | **string** | | [optional]
99

1010
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

0 commit comments

Comments
 (0)