diff --git a/composer.json b/composer.json index 75e1a86..ac30ce3 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ "repositories": [ { "type": "vcs", - "url": "https://github.com/events-radar/radar-api-php" + "url": "https://0xacab.org/radar/radar-api-php" } ], - "minimum-stability": "alpha", + "minimum-stability": "beta", "prefer-stable": true, "require": { - "events-radar/radar-api-php": "0.1.*@alpha" + "events-radar/radar-api-php": "0.1.*@beta" } } diff --git a/composer.lock b/composer.lock index 29f9717..b6af17b 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,11 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "80ea414a6d35f60a21a71bfd55c8ed5a", + "hash": "1c78465da129002f122b2e8e75f6e1db", + "content-hash": "c8fa5cf6c9d380ba0857cf9b16b3103e", "packages": [ { "name": "doctrine/common", @@ -78,17 +79,11 @@ }, { "name": "events-radar/radar-api-php", - "version": "0.1.0-alpha3", + "version": "0.1.0-beta1", "source": { "type": "git", - "url": "https://github.com/events-radar/radar-api-php.git", - "reference": "20e0b5c7d268f413fc1705bb81c46bce99b5ec1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/events-radar/radar-api-php/zipball/20e0b5c7d268f413fc1705bb81c46bce99b5ec1d", - "reference": "20e0b5c7d268f413fc1705bb81c46bce99b5ec1d", - "shasum": "" + "url": "https://0xacab.org/radar/radar-api-php", + "reference": "e272465d34853ffb781b3ea99bad53f40e567f82" }, "require": { "doctrine/common": "2.3.0", @@ -111,11 +106,7 @@ "GPL-2.0+" ], "description": "Radar API connect", - "support": { - "source": "https://github.com/events-radar/radar-api-php/tree/0.1.0-alpha3", - "issues": "https://github.com/events-radar/radar-api-php/issues" - }, - "time": "2015-02-24 20:52:50" + "time": "2017-04-27 15:31:59" }, { "name": "guzzle/cache", @@ -123,12 +114,12 @@ "target-dir": "Guzzle/Cache", "source": { "type": "git", - "url": "https://github.com/guzzle/cache.git", + "url": "https://github.com/Guzzle3/cache.git", "reference": "9d20d5afd4203f84893e809777ffa01e47bd4ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/cache/zipball/9d20d5afd4203f84893e809777ffa01e47bd4ea7", + "url": "https://api.github.com/repos/Guzzle3/cache/zipball/9d20d5afd4203f84893e809777ffa01e47bd4ea7", "reference": "9d20d5afd4203f84893e809777ffa01e47bd4ea7", "shasum": "" }, @@ -167,6 +158,7 @@ "doctrine", "zf" ], + "abandoned": "guzzle/guzzle", "time": "2014-01-08 21:24:51" }, { @@ -175,12 +167,12 @@ "target-dir": "Guzzle/Common", "source": { "type": "git", - "url": "https://github.com/guzzle/common.git", + "url": "https://github.com/Guzzle3/common.git", "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", + "url": "https://api.github.com/repos/Guzzle3/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", "shasum": "" }, @@ -211,6 +203,7 @@ "event", "exception" ], + "abandoned": "guzzle/guzzle", "time": "2014-08-11 04:32:36" }, { @@ -219,12 +212,12 @@ "target-dir": "Guzzle/Http", "source": { "type": "git", - "url": "https://github.com/guzzle/http.git", + "url": "https://github.com/Guzzle3/http.git", "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", + "url": "https://api.github.com/repos/Guzzle3/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", "shasum": "" }, @@ -268,6 +261,7 @@ "http", "http client" ], + "abandoned": "guzzle/guzzle", "time": "2014-08-11 04:32:36" }, { @@ -276,12 +270,12 @@ "target-dir": "Guzzle/Parser", "source": { "type": "git", - "url": "https://github.com/guzzle/parser.git", + "url": "https://github.com/Guzzle3/parser.git", "reference": "6874d171318a8e93eb6d224cf85e4678490b625c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c", + "url": "https://api.github.com/repos/Guzzle3/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c", "reference": "6874d171318a8e93eb6d224cf85e4678490b625c", "shasum": "" }, @@ -312,6 +306,7 @@ "message", "url" ], + "abandoned": "guzzle/guzzle", "time": "2014-02-05 18:29:46" }, { @@ -320,12 +315,12 @@ "target-dir": "Guzzle/Plugin/Cache", "source": { "type": "git", - "url": "https://github.com/guzzle/plugin-cache.git", + "url": "https://github.com/Guzzle3/plugin-cache.git", "reference": "152bc4fa58e1578d01d501a97cbeee1c34edecb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/plugin-cache/zipball/152bc4fa58e1578d01d501a97cbeee1c34edecb6", + "url": "https://api.github.com/repos/Guzzle3/plugin-cache/zipball/152bc4fa58e1578d01d501a97cbeee1c34edecb6", "reference": "152bc4fa58e1578d01d501a97cbeee1c34edecb6", "shasum": "" }, @@ -362,6 +357,7 @@ "Guzzle", "plugin" ], + "abandoned": "guzzle/guzzle", "time": "2014-02-05 10:00:42" }, { @@ -370,12 +366,12 @@ "target-dir": "Guzzle/Stream", "source": { "type": "git", - "url": "https://github.com/guzzle/stream.git", + "url": "https://github.com/Guzzle3/stream.git", "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0", + "url": "https://api.github.com/repos/Guzzle3/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0", "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0", "shasum": "" }, @@ -415,6 +411,7 @@ "component", "stream" ], + "abandoned": "guzzle/guzzle", "time": "2014-05-01 21:36:02" }, { @@ -455,29 +452,30 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.6.5", - "target-dir": "Symfony/Component/EventDispatcher", + "version": "v3.3.2", "source": { "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "4054a102470665451108f9b59305c79176ef98f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/70f7c8478739ad21e3deef0d977b38c77f1fb284", - "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4054a102470665451108f9b59305c79176ef98f0", + "reference": "4054a102470665451108f9b59305c79176ef98f0", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" }, "suggest": { "symfony/dependency-injection": "", @@ -486,38 +484,41 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.3-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2015-03-13 17:37:22" + "homepage": "https://symfony.com", + "time": "2017-06-04 18:15:29" } ], "packages-dev": [], "aliases": [], - "minimum-stability": "alpha", + "minimum-stability": "beta", "stability-flags": { - "events-radar/radar-api-php": 15 + "events-radar/radar-api-php": 10 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/radar.inc.php b/radar.inc.php index 3cd71e4..24be12f 100644 --- a/radar.inc.php +++ b/radar.inc.php @@ -24,7 +24,9 @@ function radar_retrieve_events($settings) { $settings['fields'] = _radar_field_name_mapping($settings['fields']); $filter = radar_filter($settings); $request = $client->prepareEventsRequest($filter, $settings['fields'], $settings['max_count']); - return $client->retrieve($request); + $response = $client->retrieveResponse($request); + $events = $client->parseResponse($response); + return $events; } function radar_retrieve_entities(array $entities) { @@ -111,6 +113,10 @@ function _radar_field_name_mapping($fields) { function _radar_parse_items($type, $items, $fields, $subfields = array()) { $content = array(); foreach ((array) $items as $item) { + if (!is_object($item)) { + error_log('_radar_parse_items called with empty item'); + continue; + } $current_content = array(); // Cycle through the fields in best order that we can. foreach ($fields as $field_name) { @@ -131,7 +137,6 @@ function _radar_parse_items($type, $items, $fields, $subfields = array()) { } $content[] = $current_content; } - return $content; } diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 5e1469e..ff6ecfb 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -13,9 +13,7 @@ namespace Composer\Autoload; /** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * * $loader = new \Composer\Autoload\ClassLoader(); * @@ -39,6 +37,8 @@ namespace Composer\Autoload; * * @author Fabien Potencier * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ */ class ClassLoader { @@ -147,7 +147,7 @@ class ClassLoader * appending or prepending to the ones previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories + * @param array|string $paths The PSR-4 base directories * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100644 index 0000000..1a28124 --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) 2016 Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 36d78b7..15b6640 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -6,7 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Guzzle\\Stream' => array($vendorDir . '/guzzle/stream'), 'Guzzle\\Plugin\\Cache' => array($vendorDir . '/guzzle/plugin-cache'), 'Guzzle\\Parser' => array($vendorDir . '/guzzle/parser'), diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index c5f7265..3fa1019 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,5 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Radar\\Connect\\' => array($vendorDir . '/events-radar/radar-api-php/src'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index cfab793..0a63268 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -23,19 +23,26 @@ class ComposerAutoloaderInit0602dde9fe6a3b6e770da50fa17cf0fd self::$loader = $loader = new \Composer\Autoload\ClassLoader(); spl_autoload_unregister(array('ComposerAutoloaderInit0602dde9fe6a3b6e770da50fa17cf0fd', 'loadClassLoader')); - $map = require __DIR__ . '/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->set($namespace, $path); - } + $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } + call_user_func(\Composer\Autoload\ComposerStaticInit0602dde9fe6a3b6e770da50fa17cf0fd::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } } $loader->register(true); @@ -43,8 +50,3 @@ class ComposerAutoloaderInit0602dde9fe6a3b6e770da50fa17cf0fd return $loader; } } - -function composerRequire0602dde9fe6a3b6e770da50fa17cf0fd($file) -{ - require $file; -} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100644 index 0000000..aa67b7e --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,82 @@ + + array ( + 'Symfony\\Component\\EventDispatcher\\' => 34, + ), + 'R' => + array ( + 'Radar\\Connect\\' => 14, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'Symfony\\Component\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', + ), + 'Radar\\Connect\\' => + array ( + 0 => __DIR__ . '/..' . '/events-radar/radar-api-php/src', + ), + ); + + public static $prefixesPsr0 = array ( + 'G' => + array ( + 'Guzzle\\Stream' => + array ( + 0 => __DIR__ . '/..' . '/guzzle/stream', + ), + 'Guzzle\\Plugin\\Cache' => + array ( + 0 => __DIR__ . '/..' . '/guzzle/plugin-cache', + ), + 'Guzzle\\Parser' => + array ( + 0 => __DIR__ . '/..' . '/guzzle/parser', + ), + 'Guzzle\\Http' => + array ( + 0 => __DIR__ . '/..' . '/guzzle/http', + ), + 'Guzzle\\Common' => + array ( + 0 => __DIR__ . '/..' . '/guzzle/common', + ), + 'Guzzle\\Cache' => + array ( + 0 => __DIR__ . '/..' . '/guzzle/cache', + ), + ), + 'D' => + array ( + 'Doctrine\\Common' => + array ( + 0 => __DIR__ . '/..' . '/doctrine/common/lib', + ), + ), + ); + + public static $classMap = array ( + 'geoPHP' => __DIR__ . '/..' . '/phayes/geophp/geoPHP.inc', + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit0602dde9fe6a3b6e770da50fa17cf0fd::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit0602dde9fe6a3b6e770da50fa17cf0fd::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit0602dde9fe6a3b6e770da50fa17cf0fd::$prefixesPsr0; + $loader->classMap = ComposerStaticInit0602dde9fe6a3b6e770da50fa17cf0fd::$classMap; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 1ab4743..d2340db 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -116,12 +116,12 @@ "target-dir": "Guzzle/Common", "source": { "type": "git", - "url": "https://github.com/guzzle/common.git", + "url": "https://github.com/Guzzle3/common.git", "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", + "url": "https://api.github.com/repos/Guzzle3/common/zipball/2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", "reference": "2e36af7cf2ce3ea1f2d7c2831843b883a8e7b7dc", "shasum": "" }, @@ -153,7 +153,8 @@ "common", "event", "exception" - ] + ], + "abandoned": "guzzle/guzzle" }, { "name": "guzzle/cache", @@ -162,12 +163,12 @@ "target-dir": "Guzzle/Cache", "source": { "type": "git", - "url": "https://github.com/guzzle/cache.git", + "url": "https://github.com/Guzzle3/cache.git", "reference": "9d20d5afd4203f84893e809777ffa01e47bd4ea7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/cache/zipball/9d20d5afd4203f84893e809777ffa01e47bd4ea7", + "url": "https://api.github.com/repos/Guzzle3/cache/zipball/9d20d5afd4203f84893e809777ffa01e47bd4ea7", "reference": "9d20d5afd4203f84893e809777ffa01e47bd4ea7", "shasum": "" }, @@ -207,7 +208,8 @@ "cache", "doctrine", "zf" - ] + ], + "abandoned": "guzzle/guzzle" }, { "name": "guzzle/stream", @@ -216,12 +218,12 @@ "target-dir": "Guzzle/Stream", "source": { "type": "git", - "url": "https://github.com/guzzle/stream.git", + "url": "https://github.com/Guzzle3/stream.git", "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0", + "url": "https://api.github.com/repos/Guzzle3/stream/zipball/60c7fed02e98d2c518dae8f97874c8f4622100f0", "reference": "60c7fed02e98d2c518dae8f97874c8f4622100f0", "shasum": "" }, @@ -262,7 +264,8 @@ "Guzzle", "component", "stream" - ] + ], + "abandoned": "guzzle/guzzle" }, { "name": "guzzle/parser", @@ -271,12 +274,12 @@ "target-dir": "Guzzle/Parser", "source": { "type": "git", - "url": "https://github.com/guzzle/parser.git", + "url": "https://github.com/Guzzle3/parser.git", "reference": "6874d171318a8e93eb6d224cf85e4678490b625c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c", + "url": "https://api.github.com/repos/Guzzle3/parser/zipball/6874d171318a8e93eb6d224cf85e4678490b625c", "reference": "6874d171318a8e93eb6d224cf85e4678490b625c", "shasum": "" }, @@ -308,7 +311,8 @@ "http", "message", "url" - ] + ], + "abandoned": "guzzle/guzzle" }, { "name": "guzzle/http", @@ -317,12 +321,12 @@ "target-dir": "Guzzle/Http", "source": { "type": "git", - "url": "https://github.com/guzzle/http.git", + "url": "https://github.com/Guzzle3/http.git", "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", + "url": "https://api.github.com/repos/Guzzle3/http/zipball/1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", "reference": "1e8dd1e2ba9dc42332396f39fbfab950b2301dc5", "shasum": "" }, @@ -367,7 +371,8 @@ "curl", "http", "http client" - ] + ], + "abandoned": "guzzle/guzzle" }, { "name": "guzzle/plugin-cache", @@ -376,12 +381,12 @@ "target-dir": "Guzzle/Plugin/Cache", "source": { "type": "git", - "url": "https://github.com/guzzle/plugin-cache.git", + "url": "https://github.com/Guzzle3/plugin-cache.git", "reference": "152bc4fa58e1578d01d501a97cbeee1c34edecb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/plugin-cache/zipball/152bc4fa58e1578d01d501a97cbeee1c34edecb6", + "url": "https://api.github.com/repos/Guzzle3/plugin-cache/zipball/152bc4fa58e1578d01d501a97cbeee1c34edecb6", "reference": "152bc4fa58e1578d01d501a97cbeee1c34edecb6", "shasum": "" }, @@ -419,23 +424,83 @@ "keywords": [ "Guzzle", "plugin" - ] + ], + "abandoned": "guzzle/guzzle" }, { - "name": "events-radar/radar-api-php", - "version": "0.1.0-alpha3", - "version_normalized": "0.1.0.0-alpha3", + "name": "symfony/event-dispatcher", + "version": "v3.3.2", + "version_normalized": "3.3.2.0", "source": { "type": "git", - "url": "https://github.com/events-radar/radar-api-php.git", - "reference": "20e0b5c7d268f413fc1705bb81c46bce99b5ec1d" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "4054a102470665451108f9b59305c79176ef98f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/events-radar/radar-api-php/zipball/20e0b5c7d268f413fc1705bb81c46bce99b5ec1d", - "reference": "20e0b5c7d268f413fc1705bb81c46bce99b5ec1d", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4054a102470665451108f9b59305c79176ef98f0", + "reference": "4054a102470665451108f9b59305c79176ef98f0", "shasum": "" }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2017-06-04 18:15:29", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com" + }, + { + "name": "events-radar/radar-api-php", + "version": "0.1.0-beta1", + "version_normalized": "0.1.0.0-beta1", + "source": { + "type": "git", + "url": "https://0xacab.org/radar/radar-api-php", + "reference": "e272465d34853ffb781b3ea99bad53f40e567f82" + }, "require": { "doctrine/common": "2.3.0", "guzzle/cache": "3.9.2", @@ -447,9 +512,9 @@ "guzzle/guzzle": "3.9.2", "phpunit/phpunit": "~4.5" }, - "time": "2015-02-24 20:52:50", + "time": "2017-04-27 15:31:59", "type": "library", - "installation-source": "dist", + "installation-source": "source", "autoload": { "psr-4": { "Radar\\Connect\\": "src" @@ -458,71 +523,6 @@ "license": [ "GPL-2.0+" ], - "description": "Radar API connect", - "support": { - "source": "https://github.com/events-radar/radar-api-php/tree/0.1.0-alpha3", - "issues": "https://github.com/events-radar/radar-api-php/issues" - } - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.6.5", - "version_normalized": "2.6.5.0", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/70f7c8478739ad21e3deef0d977b38c77f1fb284", - "reference": "70f7c8478739ad21e3deef0d977b38c77f1fb284", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2015-03-13 17:37:22", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com" + "description": "Radar API connect" } ] diff --git a/vendor/events-radar/radar-api-php/docs/files/Connect.php.txt b/vendor/events-radar/radar-api-php/docs/files/Connect.php.txt index 1a8e563..dc9515b 100644 --- a/vendor/events-radar/radar-api-php/docs/files/Connect.php.txt +++ b/vendor/events-radar/radar-api-php/docs/files/Connect.php.txt @@ -44,7 +44,7 @@ class Connect { $this->apiUrl = $configuration['api_url']; } else { - $this->apiUrl = 'https://new-radar.squat.net/api/1.0/'; + $this->apiUrl = 'https://radar.squat.net/api/1.0/'; } $this->debug = !empty($configuration['debug']); } diff --git a/vendor/events-radar/radar-api-php/events.php b/vendor/events-radar/radar-api-php/events.php index 1ff5a3b..8cd7a5e 100644 --- a/vendor/events-radar/radar-api-php/events.php +++ b/vendor/events-radar/radar-api-php/events.php @@ -16,8 +16,17 @@ require('radar_client.php'); // Shared radar connect client. $client = radar_client(); + // Basic cache for output. $cache = radar_cache(); +// If you want to empty the cache completely +//$cache->flushAll(); +// If you want to remove one item like the stored HTML for evets.php +$cache->delete('events.php'); + +// Add a prefered language for requests. If none is set 'und' is used and +// content is returned in its original language, first language posted.. +$client->setLanguage('de'); // Check to see if there is a copy in the cache. if ($cache->contains('events.php') && $page = $cache->fetch('events.php')) { @@ -25,15 +34,14 @@ if ($cache->contains('events.php') && $page = $cache->fetch('events.php')) { print $page['html']; // If it's more than an hour old, get a new one. if ($page['created'] + 60 * 60 < time()) { - $events = radar_events_retrieve($client); - $html = radar_events_format($client, $events); + $html = radar_events_page_html($client); $cache->delete('events.php'); } } else { // Generate the page and output it. - $events = radar_events_retrieve($client); - $html = radar_events_format($client, $events, true); + $html = radar_events_page_html($client); + print $html; } if (!empty($html)) { @@ -42,6 +50,17 @@ if (!empty($html)) { $cache->save('events.php', $page); } +/** + * Make HTML page. + */ +function radar_events_page_html($client) { + $request = radar_prepare_events_request($client); + $response = $client->retrieveResponse($request); + $events = $client->parseResponse($response); + $metadata = $client->parseResponseMeta($response); + return radar_events_format($client, $events, $metadata); +} + /** * Set a filter and retrieve events matching the filter. * @@ -51,14 +70,19 @@ if (!empty($html)) { * @return Radar\Connect\Event[] * Array of radar connect events. */ -function radar_events_retrieve(\Radar\Connect\Connect $client) { +function radar_prepare_events_request(\Radar\Connect\Connect $client) { $filter = new \Radar\Connect\Filter; $filter->addCity('Berlin'); // Alternatives:- //$filter->addCity('Amsterdam'); //$filter->addDate(new DateTime('tomorrow')); //$filter->addDay(); + //$filter->addCategory('music'); + //Some filters don't have explicit methods to set them so for tags... + //$filter->add('tag', 'Punk'); // See docs/classes/Radar.Connect.Filter.html for full list of methods. + // You can also see all the filter values and their counts in the metadata + // returned. See the examples at the top of radar_events_format(). // Get the request. // arguments: @@ -66,6 +90,9 @@ function radar_events_retrieve(\Radar\Connect\Connect $client) { // $fields - array of field names to collect, empty for default // $limit - maximum number of events to return. $request = $client->prepareEventsRequest($filter, array(), 50); + return $request; + + // Execute request. return $client->retrieve($request); } @@ -77,17 +104,43 @@ function radar_events_retrieve(\Radar\Connect\Connect $client) { * The connect client. * @param \Radar\Connect\Event[] $events * Array of Event entities, for example response to events request. - * @param bool $output - * If HTML output should also be sent to stdout. + * @param array $metadata + * Array of counts and facets. * * @return string * The HTML output. */ -function radar_events_format(\Radar\Connect\Connect $client, array $events, $output = FALSE) { +function radar_events_format(\Radar\Connect\Connect $client, array $events, array $metadata) { ob_start(); ob_implicit_flush(TRUE); $html = ''; + // Metadata includes the result count. + print "

There are {$metadata['count']} results for the query

\n"; + + // Retrieve some facets. Summaries of filters you can use + // in further narrowed queries, and their result counts. + print '

Forthcoming days

\n"; + + // For other factets it's even more convenient. The 'filter' value is also the value you set to filter the query. + print "

Categories