Skip to content

Commit 19051a8

Browse files
committed
chore: rename InvocableScripts to InvokableScripts
for more info see influxdata/openapi#317
1 parent 5cd85d2 commit 19051a8

8 files changed

+42
-42
lines changed

CHANGELOG.md

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

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

88
### CI
99
1. [#118](https://github.com/influxdata/influxdb-client-php/pull/118): Use new Codecov uploader for reporting code coverage

examples/InvocableScripts.php examples/InvokableScripts.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
/**
3-
* Show to use Invocable scripts Cloud API to create custom endpoints that query data
3+
* Show to use Invokable scripts Cloud API to create custom endpoints that query data
44
*
5-
* Invocable Scripts are supported only in InfluxDB Cloud, currently there is no support in InfluxDB OSS.
5+
* Invokable Scripts are supported only in InfluxDB Cloud, currently there is no support in InfluxDB OSS.
66
*/
77

88
require __DIR__ . '/../vendor/autoload.php';
@@ -39,12 +39,12 @@
3939
$client->createWriteApi()->write([$point1, $point2]);
4040

4141
//
42-
// Creating InvocableScripts Api
42+
// Creating InvokableScripts Api
4343
//
44-
$scriptsApi = $client->createInvocableScriptsApi();
44+
$scriptsApi = $client->createInvokableScriptsApi();
4545

4646
//
47-
// Create Invocable Script
47+
// Create Invokable Script
4848
//
4949
print "\n------- Create -------\n";
5050
$scriptQuery = 'from(bucket: params.bucket_name) |> range(start: -30d) |> limit(n:2)';
@@ -58,7 +58,7 @@
5858
print $createdScript;
5959

6060
//
61-
// Update Invocable Script
61+
// Update Invokable Script
6262
//
6363
print "\n------- Update -------\n";
6464
$updateRequest = new ScriptUpdateRequest([

examples/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
## Others
2020
- [InfluxDB_18_Example.php](InfluxDB_18_Example.php) - How to use forward compatibility APIs from InfluxDB 1.8
2121
- [DeleteDataExample.php](DeleteDataExample.php) - How to delete data from InfluxDB by client
22-
- [InvocableScripts.php](InvocableScripts.php) - How to use Invocable scripts Cloud API to create custom endpoints that query data
22+
- [InvokableScripts.php](InvokableScripts.php) - How to use Invokable scripts Cloud API to create custom endpoints that query data

src/InfluxDB2/Client.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace InfluxDB2;
44

55
use InfluxDB2\Model\HealthCheck;
6-
use InfluxDB2\Service\InvocableScriptsService;
6+
use InfluxDB2\Service\InvokableScriptsService;
77
use InfluxDB2\Service\PingService;
88
use ReflectionClass;
99
use RuntimeException;
@@ -101,15 +101,15 @@ public function createQueryApi(): QueryApi
101101
}
102102

103103
/**
104-
* Create an InvocableScripts API instance.
104+
* Create an InvokableScripts API instance.
105105
*
106-
* @return InvocableScriptsApi
106+
* @return InvokableScriptsApi
107107
*/
108-
public function createInvocableScriptsApi(): InvocableScriptsApi
108+
public function createInvokableScriptsApi(): InvokableScriptsApi
109109
{
110-
/** @var InvocableScriptsService $service */
111-
$service = $this->createService(InvocableScriptsService::class);
112-
return new InvocableScriptsApi($this->options, $service);
110+
/** @var InvokableScriptsService $service */
111+
$service = $this->createService(InvokableScriptsService::class);
112+
return new InvokableScriptsApi($this->options, $service);
113113
}
114114

115115
/**

src/InfluxDB2/InvocableScriptsApi.php src/InfluxDB2/InvokableScriptsApi.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use InfluxDB2\Model\ScriptCreateRequest;
77
use InfluxDB2\Model\ScriptInvocationParams;
88
use InfluxDB2\Model\ScriptUpdateRequest;
9-
use InfluxDB2\Service\InvocableScriptsService;
9+
use InfluxDB2\Service\InvokableScriptsService;
1010
use Psr\Http\Message\StreamInterface;
1111

1212
/**
@@ -17,17 +17,17 @@
1717
*
1818
* @package InfluxDB2
1919
*/
20-
class InvocableScriptsApi extends DefaultApi
20+
class InvokableScriptsApi extends DefaultApi
2121
{
2222
private $service;
2323

2424
/**
25-
* InvocableScriptsApi constructor.
25+
* InvokableScriptsApi constructor.
2626
*
2727
* @param array $options default array options
28-
* @param InvocableScriptsService $service HTTP API for Invocable Scripts
28+
* @param InvokableScriptsService $service HTTP API for Invokable Scripts
2929
*/
30-
public function __construct(array $options, InvocableScriptsService $service)
30+
public function __construct(array $options, InvokableScriptsService $service)
3131
{
3232
parent::__construct($options);
3333
$this->service = $service;

src/InfluxDB2/Service/InvocableScriptsService.php src/InfluxDB2/Service/InvokableScriptsService.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* InvocableScriptsService
3+
* InvokableScriptsService
44
* PHP version 5
55
*
66
* @category Class
@@ -40,14 +40,14 @@
4040
use InfluxDB2\ObjectSerializer;
4141

4242
/**
43-
* InvocableScriptsService Class Doc Comment
43+
* InvokableScriptsService Class Doc Comment
4444
*
4545
* @category Class
4646
* @package InfluxDB2
4747
* @author OpenAPI Generator team
4848
* @link https://openapi-generator.tech
4949
*/
50-
class InvocableScriptsService
50+
class InvokableScriptsService
5151
{
5252
/**
5353
* @var ClientInterface

tests/InvocableScriptsApiTest.php

-19
This file was deleted.

tests/InvokableScriptsApiTest.php

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace InfluxDB2Test;
4+
5+
require_once('BasicTest.php');
6+
7+
/**
8+
* Class InvokableScriptsApiTest
9+
* @package InfluxDB2Test
10+
*/
11+
class InvokableScriptsApiTest extends BasicTest
12+
{
13+
public function testCreateInstance()
14+
{
15+
$invokableScriptsApi = $this->client->createInvokableScriptsApi();
16+
17+
$this->assertNotNull($invokableScriptsApi);
18+
}
19+
}

0 commit comments

Comments
 (0)