<project version="4">
<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
- <change afterPath="$PROJECT_DIR$/images/switch.png" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/scripts/switch.php" afterDir="false" />
+ <change afterPath="$PROJECT_DIR$/scripts/lib/climacell.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/pcgames.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/pcgames.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/scenes.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/scenes.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<property name="editor.config.ad.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/images" />
<property name="list.type.of.created.stylesheet" value="Less" />
+ <property name="node.js.detected.package.eslint" value="true" />
+ <property name="node.js.detected.package.tslint" value="true" />
+ <property name="node.js.path.for.package.eslint" value="project" />
+ <property name="node.js.path.for.package.tslint" value="project" />
+ <property name="node.js.selected.package.eslint" value="(autodetect)" />
+ <property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Problems" />
<property name="project.structure.proportion" value="0.15" />
<option name="Make" enabled="true" />
</method>
</configuration>
- <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
- <option name="arquillianRunConfiguration">
- <value>
- <option name="containerStateName" value="" />
- </value>
- </option>
- <option name="TEST_OBJECT" value="class" />
- <method v="2">
- <option name="Make" enabled="true" />
- </method>
- </configuration>
<configuration default="true" type="ArquillianTestNG" factoryName="">
<option name="arquillianRunConfiguration">
<value>
<workItem from="1613594262179" duration="860000" />
<workItem from="1613737644524" duration="2679000" />
<workItem from="1613767930279" duration="780000" />
- <workItem from="1613993901536" duration="33445000" />
- </task>
- <task id="LOCAL-00406" summary=".">
- <created>1605973216961</created>
- <option name="number" value="00406" />
- <option name="presentableId" value="LOCAL-00406" />
- <option name="project" value="LOCAL" />
- <updated>1605973216962</updated>
+ <workItem from="1613993901536" duration="34042000" />
+ <workItem from="1615115966365" duration="657000" />
+ <workItem from="1615272627869" duration="1428000" />
+ <workItem from="1615664533256" duration="33000" />
</task>
<task id="LOCAL-00407" summary=".">
<created>1605976064822</created>
<option name="project" value="LOCAL" />
<updated>1614370268864</updated>
</task>
- <option name="localTasksCounter" value="455" />
+ <task id="LOCAL-00455" summary=".">
+ <created>1614761270670</created>
+ <option name="number" value="00455" />
+ <option name="presentableId" value="LOCAL-00455" />
+ <option name="project" value="LOCAL" />
+ <updated>1614761270671</updated>
+ </task>
+ <option name="localTasksCounter" value="456" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
--- /dev/null
+<?php
+
+function _climacell($params, $ttl = 300)
+{
+ $cacheKey = 'climacell_' . hash('sha256', $params);
+ $redis = getRedisClient();
+ if (!$redis->exists($cacheKey)) {
+ $res = file_get_contents('https://data.climacell.co/v4/timelines?units=metric&apikey=95AtuwRGIISYHPleGTyY2bGhcJw7Yv3p&location=6044b50271ef6b0008d0848f&fields=temperature,humidity,windSpeed&' . $params);
+ $redis->set($cacheKey, $res, null, $ttl);
+ } else {
+ $res = $redis->get($cacheKey);
+ }
+ return json_decode($res);
+
+}
+
+function climacellCurrent()
+{
+ return _climacell('timesteps=1h', 300);
+}
+
+function climacellForecasts()
+{
+ return _climacell('timesteps=1d', 7200);
+}
\ No newline at end of file