Skip to content

Commit 5cd02e2

Browse files
committed
adds documentation and some minor improvements
1 parent a11ad5c commit 5cd02e2

File tree

5 files changed

+91
-243
lines changed

5 files changed

+91
-243
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
1+
![travis-ci-status](https://travis-ci.org/moay/opensensemap-api-php-client.svg?branch=master)
2+
13
# opensensemap-api-php-client
4+
25
A client for retrieving sensor data from a senseBox from the opensensemap api
6+
7+
## Usage
8+
9+
Take a look at the implementation example in the directory `example`.
10+
11+
```php
12+
$client = \Moay\OpensensemapApiClient\OpensensemapApiClientFactory::create();
13+
14+
// Change senseBox id
15+
$senseBoxData = $client->getSenseBoxData('someSenseBoxId');
16+
17+
foreach ($senseBoxData->getSensorValues() as $sensorValue) {
18+
// $sensorValue->getValueType()
19+
// $sensorValue->getValue()
20+
// $sensorValue->getUnit()
21+
// $sensorValue->getSensorType()
22+
// $sensorValue->getMeasurementTime()->format('Y-m-d H:i:s')
23+
}
24+
```
25+
26+
## Features
27+
28+
The client gives you the latest data for a specific senseBox from the OpenSenseMap Api.
29+
30+
## License
31+
32+
The client is published under the [MIT license](LICENSE.md).
33+
34+
senseBox and all related contents, visuals and brands are published under CC licenses or other public domain licenses.
35+
Make sure to check out the project.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"description": "A client for retrieving sensor data from a senseBox from the opensensemap api",
44
"type": "library",
55
"require": {
6-
"guzzlehttp/guzzle": "^6.3",
7-
"ext-json": "*"
6+
"php": ">=7.0",
7+
"ext-json": "*",
8+
"guzzlehttp/guzzle": "^6.3"
89
},
910
"require-dev": {
1011
"phpunit/phpunit": "^8.2"

0 commit comments

Comments
 (0)