-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed to class Added support for Composer Removed stations folder as it is not necessary
- Loading branch information
1 parent
57289ca
commit d6df76d
Showing
15 changed files
with
197 additions
and
1,343 deletions.
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 |
---|---|---|
@@ -1,42 +1,18 @@ | ||
# PovodiAPI | ||
 | ||
Get water info in a simple API. This PHP class supports [Povodí Labe](http://www.pla.cz), [Povodí Odry](https://www.pod.cz), [Povodí Ohře](https://www.poh.cz) and [Povodí Vltavy](http://www.pvl.cz). | ||
Get water info in a simple class. This PHP class supports [Povodí Moravy](http://www.pmo.cz), [Povodí Labe](http://www.pla.cz), [Povodí Odry](https://www.pod.cz), [Povodí Ohře](https://www.poh.cz) and [Povodí Vltavy](http://www.pvl.cz). | ||
|
||
## Usage | ||
### Nádrže | ||
## Initialization | ||
PovodiAPI is available in Composer: | ||
``` | ||
./povodiapi.php?website=pla&channel=nadrze&station=100|1&response=json&values=all | ||
composer require danielkrasny/povodiapi | ||
``` | ||
Required to enter: | ||
- *website*: **pla**, **pod**, **poh**, **pvl** | ||
- *channel*: **nadrze** (used for this example), **sap**, **srazky** | ||
- *station*: ID of station, available in [/stations](/stations) | ||
- *response*: **json**, **rss** | ||
- *values*: **all**, **latest** | ||
|
||
### SaP (Stavy a průtoky) | ||
``` | ||
./povodiapi.php?website=pla&channel=sap&station=9|1&response=json&values=all | ||
Then use it as a class: | ||
```php | ||
$povodi = new DanielKrasny\PovodiAPI(); | ||
``` | ||
Required to enter: | ||
- *website*: **pla**, **pod**, **poh**, **pvl** | ||
- *channel*: **nadrze**, **sap** (used for this example), **srazky** | ||
- *station*: ID of station, available in [/stations](/stations) | ||
- *response*: **json**, **rss** | ||
- *values*: **all**, **latest** | ||
|
||
### Srážky | ||
``` | ||
./povodiapi.php?website=pla&channel=srazky&station=215|1&response=json&values=latest | ||
``` | ||
Required to enter: | ||
- *website*: **pla**, **pod**, **poh**, **pvl** | ||
- *channel*: **nadrze**, **sap**, **srazky** (used for this example) | ||
- *station*: ID of station, available in [/stations](/stations) | ||
- *response*: **json**, **rss** | ||
Optional: | ||
- *values*: **all**, **latest** (including total value), **total** | ||
- *temp*: Only for `rss` response, channel `srazky` and set values to `all`. Allow showing temperature in title. Options: **yes**, **no** | ||
More examples available in [wiki](https://github.com/DanielKrasny/PovodiAPI/wiki). | ||
|
||
##### License | ||
The script is available under the [MIT license](/LICENSE). |
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,41 @@ | ||
{ | ||
"name": "danielkrasny/povodiapi", | ||
"description": "Get water info from Povodí Labe/Odry/Ohře/Moravy/Vltavy in a simple class.", | ||
"keywords": [ | ||
"php", | ||
"water", | ||
"czech", | ||
"api", | ||
"php class", | ||
"povodi", | ||
"odra", | ||
"labe", | ||
"ohre", | ||
"vltava", | ||
"morava" | ||
], | ||
"homepage": "https://github.com/DanielKrasny/PovodiAPI", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Daniel Krásný", | ||
"role": "Developer", | ||
"homepage": "https://daniel.krasny.me" | ||
} | ||
], | ||
"support": { | ||
"issues": "https://github.com/DanielKrasny/PovodiAPI/issues", | ||
"source": "https://github.com/DanielKrasny/PovodiAPI/tree/master" | ||
}, | ||
"autoload": { | ||
"classmap": [ | ||
"povodiapi.php" | ||
] | ||
}, | ||
"require": { | ||
"php": ">=5.2.0", | ||
"ext-curl": "*", | ||
"ext-xml": "*", | ||
"ext-dom": "*" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.