-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Slavko Rihtaric
committed
Aug 26, 2024
1 parent
68ffb91
commit ca94422
Showing
1 changed file
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# Databox | ||
|
||
Push API resources Open API documentation | ||
|
||
|
||
## Installation & Usage | ||
|
||
### Requirements | ||
|
||
PHP 7.4 and later. | ||
Should also work with PHP 8.0. | ||
|
||
### Composer | ||
|
||
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: | ||
|
||
```json | ||
{ | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" | ||
} | ||
], | ||
"require": { | ||
"GIT_USER_ID/GIT_REPO_ID": "*@dev" | ||
} | ||
} | ||
``` | ||
|
||
Then run `composer install` | ||
|
||
### Manual Installation | ||
|
||
Download the files and include `autoload.php`: | ||
|
||
```php | ||
<?php | ||
require_once('/path/to/Databox/vendor/autoload.php'); | ||
``` | ||
|
||
## Getting Started | ||
|
||
Please follow the [installation procedure](#installation--usage) and then run the following: | ||
|
||
```php | ||
<?php | ||
require_once(__DIR__ . '/vendor/autoload.php'); | ||
|
||
|
||
|
||
// Configure HTTP basic authorization: basicAuth | ||
$config = Databox\Configuration::getDefaultConfiguration() | ||
->setUsername('YOUR_USERNAME') | ||
->setPassword('YOUR_PASSWORD'); | ||
|
||
|
||
$apiInstance = new Databox\Api\DefaultApi( | ||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. | ||
// This is optional, `GuzzleHttp\Client` will be used as default. | ||
new GuzzleHttp\Client(), | ||
$config | ||
); | ||
|
||
try { | ||
$apiInstance->dataDelete(); | ||
} catch (Exception $e) { | ||
echo 'Exception when calling DefaultApi->dataDelete: ', $e->getMessage(), PHP_EOL; | ||
} | ||
|
||
``` | ||
|
||
## API Endpoints | ||
|
||
All URIs are relative to *https://push.databox.com* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*DefaultApi* | [**dataDelete**](docs/Api/DefaultApi.md#datadelete) | **DELETE** /data | | ||
*DefaultApi* | [**dataMetricKeyDelete**](docs/Api/DefaultApi.md#datametrickeydelete) | **DELETE** /data/{metricKey} | | ||
*DefaultApi* | [**dataPost**](docs/Api/DefaultApi.md#datapost) | **POST** /data | | ||
*DefaultApi* | [**metrickeysGet**](docs/Api/DefaultApi.md#metrickeysget) | **GET** /metrickeys | | ||
*DefaultApi* | [**metrickeysPost**](docs/Api/DefaultApi.md#metrickeyspost) | **POST** /metrickeys | | ||
*DefaultApi* | [**pingGet**](docs/Api/DefaultApi.md#pingget) | **GET** /ping | | ||
|
||
## Models | ||
|
||
- [ApiResponse](docs/Model/ApiResponse.md) | ||
- [PushData](docs/Model/PushData.md) | ||
- [PushDataAttribute](docs/Model/PushDataAttribute.md) | ||
- [State](docs/Model/State.md) | ||
|
||
## Authorization | ||
|
||
Authentication schemes defined for the API: | ||
### basicAuth | ||
|
||
- **Type**: HTTP basic authentication | ||
|
||
## Tests | ||
|
||
To run the tests, use: | ||
|
||
```bash | ||
composer install | ||
vendor/bin/phpunit | ||
``` | ||
|
||
## Author | ||
|
||
|
||
|
||
## About this package | ||
|
||
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: | ||
|
||
- API version: `0.4.1` | ||
- Package version: `2.1.3` | ||
- Generator version: `7.6.0` | ||
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen` |