diff --git a/shared/main.php b/shared/main.php index 0ea4ef2..ecebfe2 100644 --- a/shared/main.php +++ b/shared/main.php @@ -16,7 +16,7 @@ limitations under the License. */ function uupApiVersion() { - return '1.37.0'; + return '1.38.0-dev'; } require_once dirname(__FILE__).'/auths.php'; diff --git a/shared/utils.php b/shared/utils.php index 6a78915..8c9c1cb 100644 --- a/shared/utils.php +++ b/shared/utils.php @@ -166,3 +166,16 @@ function uupApiFixDownloadLink($link) { $link ); } + +function uupApiReadJson($path) { + $data = @file_get_contents($path); + + if(empty($data)) + return false; + + return json_decode($data, true); +} + +function uupApiWriteJson($path, $data) { + return file_put_contents($path, json_encode($data)."\n"); +}