machek/mmyql

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Zend Framework 2 module for easy access to YQL (Yahoo! Query Language)

dev-master 2013-05-04 22:04 UTC

This package is not auto-updated.

Last update: 2021-12-05 22:11:25 UTC


README

Version 0.01 Created by Zdenek Machek during Yahoo! Hack Europe: London 2013

Introduction

This is simple module simplifying YQL - Yahoo! Query Language (http://developer.yahoo.com/yql/) usage

Requirements

Installation

  1. Add "machek/mmyql": "dev-master" to your composer.json file and run php composer.phar update.
  2. Add MMYQL to your config/application.config.php file under the modules key.
  3. copy /vendor/machek/mmyql/configmmyql.local.php.dist to /config/autoload/mmyql.local.php

Usage

		$select = "latitude, longitude, radius";
        $from = "geo.placefinder";
        $where = "text=\"{$query}\"";

        $response = $this->getServiceLocator()->get('serviceYQL')->executeQuery($select, $from, $where);
        $responseArray = json_decode($response);
        $resultArray = array('coordinates' => array('latitude' => $result->latitude, 'longitude' => $result->longitude, 'radius' => $result->radius));

or check this project where we used it: https://github.com/Gisleburt/yahoohack