filippo-toso / timeseries-insights
A simple client library for Google Timeseries Insights Api
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/filippo-toso/timeseries-insights
Requires
- php: ^7.0 || ^8.0 || ^9.0
- google/apiclient: ^2.12
- google/gax: ^1.17
- google/protobuf: ^3.21
- grpc/grpc: ^1.42
README
A simple client library for Google Timeseries Insights Api
Requirements
- PHP 7.0+
Installing
Use Composer to install it:
composer require filippo-toso/timeseries-insights
Using It
use Google\Cloud\Timeseriesinsights\V1\TimeseriesInsightsControllerClient;
use Google\Cloud\Timeseriesinsights\V1\DataSet;
use Google\Cloud\Timeseriesinsights\V1\DataSource;
// The project ID from the credentials file downloaded from Google Console
define('PROJECT_ID', 'project-id');
$client = new TimeseriesInsightsControllerClient([
'credentials' => __DIR__ . '/credentials.json', // Your JSON credentials file downloaded from Google Console
]);
$datasets = $client->listDataSets('projects/' . PROJECT_ID);
print("List datasets: \r\n");
foreach ($datasets as $dataset) {
print($dataset->serializeToJsonString() . "\r\n");
}