Skip to content

Commit 9f56d53

Browse files
committed
chore: rename InvocableScripts to InvokableScripts
for more info see influxdata/openapi#317
1 parent 0a11c1e commit 9f56d53

10 files changed

+28
-28
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## 2.3.0 [2022-04-19]
44

55
### Features
6-
1. [#41](https://github.com/influxdata/influxdb-client-dart/pull/41): Add `InvocableScriptsApi` to create, update, list, delete and invoke scripts by seamless way
6+
1. [#41](https://github.com/influxdata/influxdb-client-dart/pull/41): Add `InvokableScriptsApi` to create, update, list, delete and invoke scripts by seamless way
77

88
### CI
99
1. [#38](https://github.com/influxdata/influxdb-client-dart/pull/38): Report code coverage to Codecov

example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
## Others
1616
- [delete_data_example.dart](delete_data_example.dart) - How to delete data from InfluxDB by client
1717
- [main.dart](main.dart) - How to write, query and delete data from InfluxDB
18-
- [invocable_scripts.dart](invocable_scripts.dart) - How to use Invocable scripts Cloud API to create custom endpoints that query data
18+
- [invokable_scripts.dart](invokable_scripts.dart) - How to use Invokable scripts Cloud API to create custom endpoints that query data

example/invocable_scripts.dart example/invokable_scripts.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:influxdb_client/api.dart';
22

33
/*
4-
* warning: Invocable Scripts are supported only in InfluxDB Cloud, currently there is no support in InfluxDB OSS.
4+
* warning: Invokable Scripts are supported only in InfluxDB Cloud, currently there is no support in InfluxDB OSS.
55
*/
66

77
void main() async {
@@ -23,10 +23,10 @@ void main() async {
2323
.addField('temperature', 24.3);
2424
await client.getWriteService().write([point1, point2]);
2525

26-
var scriptsService = client.getInvocableScriptsService();
26+
var scriptsService = client.getInvokableScriptsService();
2727

2828
//
29-
// Create Invocable Script
29+
// Create Invokable Script
3030
//
3131
print('\n------- Create -------\n');
3232
var scriptQuery =
@@ -41,7 +41,7 @@ void main() async {
4141
print(createdScript);
4242

4343
//
44-
// Update Invocable Script
44+
// Update Invokable Script
4545
//
4646
print('\n------- Update -------\n');
4747
var updateRequest =

lib/api.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ part 'model/is_onboarding.dart';
147147
part 'model/onboarding_request.dart';
148148
part 'model/onboarding_response.dart';
149149

150-
//invocable_scripts
151-
part 'api/invocable_scripts_api.dart';
150+
//invokable_scripts
151+
part 'api/invokable_scripts_api.dart';
152152
part 'model/script.dart';
153153
part 'model/scripts.dart';
154154
part 'model/script_create_request.dart';
@@ -164,7 +164,7 @@ part 'client/point.dart';
164164
part 'client/delete_service.dart';
165165
part 'client/write_service.dart';
166166
part 'client/query_service.dart';
167-
part 'client/invocable_scripts_service.dart';
167+
part 'client/invokable_scripts_service.dart';
168168
part 'client/flux_transformer.dart';
169169
part 'client/flux_table.dart';
170170
part 'client/retry.dart';

lib/api/invocable_scripts_api.dart lib/api/invokable_scripts_api.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
part of influxdb_client_api;
1010

11-
class InvocableScriptsApi {
12-
InvocableScriptsApi(ApiClient apiClient) : apiClient = apiClient;
11+
class InvokableScriptsApi {
12+
InvokableScriptsApi(ApiClient apiClient) : apiClient = apiClient;
1313

1414
final ApiClient apiClient;
1515

@@ -141,7 +141,7 @@ class InvocableScriptsApi {
141141

142142
/// Retrieve a script
143143
///
144-
/// Uses script ID to retrieve details of an invocable script.
144+
/// Uses script ID to retrieve details of an invokable script.
145145
///
146146
/// Note: This method returns the HTTP [Response].
147147
///
@@ -178,7 +178,7 @@ class InvocableScriptsApi {
178178

179179
/// Retrieve a script
180180
///
181-
/// Uses script ID to retrieve details of an invocable script.
181+
/// Uses script ID to retrieve details of an invokable script.
182182
///
183183
/// Parameters:
184184
///
@@ -203,7 +203,7 @@ class InvocableScriptsApi {
203203

204204
/// Update a script
205205
///
206-
/// Updates properties (`name`, `description`, and `script`) of an invocable script.
206+
/// Updates properties (`name`, `description`, and `script`) of an invokable script.
207207
///
208208
/// Note: This method returns the HTTP [Response].
209209
///
@@ -244,7 +244,7 @@ class InvocableScriptsApi {
244244

245245
/// Update a script
246246
///
247-
/// Updates properties (`name`, `description`, and `script`) of an invocable script.
247+
/// Updates properties (`name`, `description`, and `script`) of an invokable script.
248248
///
249249
/// Parameters:
250250
///

lib/client/flux_transformer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum FluxResponseMode {
3030
/// full information about types, default values and groups
3131
full,
3232

33-
/// useful for Invocable scripts
33+
/// useful for Invokable scripts
3434
only_names
3535
}
3636

lib/client/influxdb_client.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ class InfluxDBClient {
314314
return PingApi(getApiClient(basePath: ''));
315315
}
316316

317-
/// Create an InvocableScripts API instance.
318-
InvocableScriptsService getInvocableScriptsService() {
319-
return InvocableScriptsService(this);
317+
/// Create an InvokableScripts API instance.
318+
InvokableScriptsService getInvokableScriptsService() {
319+
return InvokableScriptsService(this);
320320
}
321321
}
322322

lib/client/invocable_scripts_service.dart lib/client/invokable_scripts_service.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ part of influxdb_client_api;
55
///
66
/// API invokable scripts let you assign scripts to API endpoints and then
77
/// execute them as standard REST operations in InfluxDB Cloud.
8-
class InvocableScriptsService extends DefaultService {
9-
late InvocableScriptsApi service;
8+
class InvokableScriptsService extends DefaultService {
9+
late InvokableScriptsApi service;
1010

1111
///
12-
/// Creates [InvocableScriptsService] with optional custom [writeOptions]
12+
/// Creates [InvokableScriptsService] with optional custom [writeOptions]
1313
///
14-
InvocableScriptsService(InfluxDBClient client) : super(client) {
15-
service = InvocableScriptsApi(client.getApiClient());
14+
InvokableScriptsService(InfluxDBClient client) : super(client) {
15+
service = InvokableScriptsApi(client.getApiClient());
1616
}
1717

1818
/// Create a script.

scripts/generate-sources.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ cp -r ${SRC}/api/dbrps_api.dart $OUT/api
5353
cp -r ${SRC}/api/setup_api.dart $OUT/api
5454
cp -r ${SRC}/api/write_api.dart $OUT/api
5555
cp -r ${SRC}/api/ping_api.dart $OUT/api
56-
cp -r ${SRC}/api/invocable_scripts_api.dart $OUT/api
56+
cp -r ${SRC}/api/invokable_scripts_api.dart $OUT/api
5757

5858
### needs manual modification
5959
#cp -r ${SRC}/api/query_api.dart $OUT/api

test/influxdb_client_test.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ void main() async {
151151
expect(client, isNot(null));
152152
});
153153

154-
test('create InvocableScriptsService', () async {
155-
var invocableScriptsService = client.getInvocableScriptsService();
156-
expect(invocableScriptsService, isNot(null));
154+
test('create InvokableScriptsService', () async {
155+
var invokableScriptsService = client.getInvokableScriptsService();
156+
expect(invokableScriptsService, isNot(null));
157157
});
158158
}

0 commit comments

Comments
 (0)