Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename InvocableScripts to InvokableScripts #42

Merged
merged 2 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## 2.4.0 [unreleased]

### Breaking Changes
1. [#42](https://github.com/influxdata/influxdb-client-dart/pull/42): Rename `InvocableScripts` to `InvokableScripts`

## 2.3.0 [2022-04-19]

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

### CI
1. [#38](https://github.com/influxdata/influxdb-client-dart/pull/38): Report code coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
## Others
- [delete_data_example.dart](delete_data_example.dart) - How to delete data from InfluxDB by client
- [main.dart](main.dart) - How to write, query and delete data from InfluxDB
- [invocable_scripts.dart](invocable_scripts.dart) - How to use Invocable scripts Cloud API to create custom endpoints that query data
- [invokable_scripts.dart](invokable_scripts.dart) - How to use Invokable scripts Cloud API to create custom endpoints that query data
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:influxdb_client/api.dart';

/*
* warning: Invocable Scripts are supported only in InfluxDB Cloud, currently there is no support in InfluxDB OSS.
* warning: Invokable Scripts are supported only in InfluxDB Cloud, currently there is no support in InfluxDB OSS.
*/

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

var scriptsService = client.getInvocableScriptsService();
var scriptsService = client.getInvokableScriptsService();

//
// Create Invocable Script
// Create Invokable Script
//
print('\n------- Create -------\n');
var scriptQuery =
Expand All @@ -41,7 +41,7 @@ void main() async {
print(createdScript);

//
// Update Invocable Script
// Update Invokable Script
//
print('\n------- Update -------\n');
var updateRequest =
Expand Down
6 changes: 3 additions & 3 deletions lib/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ part 'model/is_onboarding.dart';
part 'model/onboarding_request.dart';
part 'model/onboarding_response.dart';

//invocable_scripts
part 'api/invocable_scripts_api.dart';
//invokable_scripts
part 'api/invokable_scripts_api.dart';
part 'model/script.dart';
part 'model/scripts.dart';
part 'model/script_create_request.dart';
Expand All @@ -164,7 +164,7 @@ part 'client/point.dart';
part 'client/delete_service.dart';
part 'client/write_service.dart';
part 'client/query_service.dart';
part 'client/invocable_scripts_service.dart';
part 'client/invokable_scripts_service.dart';
part 'client/flux_transformer.dart';
part 'client/flux_table.dart';
part 'client/retry.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

part of influxdb_client_api;

class InvocableScriptsApi {
InvocableScriptsApi(ApiClient apiClient) : apiClient = apiClient;
class InvokableScriptsApi {
InvokableScriptsApi(ApiClient apiClient) : apiClient = apiClient;

final ApiClient apiClient;

Expand Down Expand Up @@ -141,7 +141,7 @@ class InvocableScriptsApi {

/// Retrieve a script
///
/// Uses script ID to retrieve details of an invocable script.
/// Uses script ID to retrieve details of an invokable script.
///
/// Note: This method returns the HTTP [Response].
///
Expand Down Expand Up @@ -178,7 +178,7 @@ class InvocableScriptsApi {

/// Retrieve a script
///
/// Uses script ID to retrieve details of an invocable script.
/// Uses script ID to retrieve details of an invokable script.
///
/// Parameters:
///
Expand All @@ -203,7 +203,7 @@ class InvocableScriptsApi {

/// Update a script
///
/// Updates properties (`name`, `description`, and `script`) of an invocable script.
/// Updates properties (`name`, `description`, and `script`) of an invokable script.
///
/// Note: This method returns the HTTP [Response].
///
Expand Down Expand Up @@ -244,7 +244,7 @@ class InvocableScriptsApi {

/// Update a script
///
/// Updates properties (`name`, `description`, and `script`) of an invocable script.
/// Updates properties (`name`, `description`, and `script`) of an invokable script.
///
/// Parameters:
///
Expand Down
2 changes: 1 addition & 1 deletion lib/client/flux_transformer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum FluxResponseMode {
/// full information about types, default values and groups
full,

/// useful for Invocable scripts
/// useful for Invokable scripts
only_names
}

Expand Down
6 changes: 3 additions & 3 deletions lib/client/influxdb_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ class InfluxDBClient {
return PingApi(getApiClient(basePath: ''));
}

/// Create an InvocableScripts API instance.
InvocableScriptsService getInvocableScriptsService() {
return InvocableScriptsService(this);
/// Create an InvokableScripts API instance.
InvokableScriptsService getInvokableScriptsService() {
return InvokableScriptsService(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ part of influxdb_client_api;
///
/// API invokable scripts let you assign scripts to API endpoints and then
/// execute them as standard REST operations in InfluxDB Cloud.
class InvocableScriptsService extends DefaultService {
late InvocableScriptsApi service;
class InvokableScriptsService extends DefaultService {
late InvokableScriptsApi service;

///
/// Creates [InvocableScriptsService] with optional custom [writeOptions]
/// Creates [InvokableScriptsService] with optional custom [writeOptions]
///
InvocableScriptsService(InfluxDBClient client) : super(client) {
service = InvocableScriptsApi(client.getApiClient());
InvokableScriptsService(InfluxDBClient client) : super(client) {
service = InvokableScriptsApi(client.getApiClient());
}

/// Create a script.
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cp -r ${SRC}/api/dbrps_api.dart $OUT/api
cp -r ${SRC}/api/setup_api.dart $OUT/api
cp -r ${SRC}/api/write_api.dart $OUT/api
cp -r ${SRC}/api/ping_api.dart $OUT/api
cp -r ${SRC}/api/invocable_scripts_api.dart $OUT/api
cp -r ${SRC}/api/invokable_scripts_api.dart $OUT/api

### needs manual modification
#cp -r ${SRC}/api/query_api.dart $OUT/api
Expand Down
6 changes: 3 additions & 3 deletions test/influxdb_client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ void main() async {
expect(client, isNot(null));
});

test('create InvocableScriptsService', () async {
var invocableScriptsService = client.getInvocableScriptsService();
expect(invocableScriptsService, isNot(null));
test('create InvokableScriptsService', () async {
var invokableScriptsService = client.getInvokableScriptsService();
expect(invokableScriptsService, isNot(null));
});
}