2017 © Pedro PelĂĄez
 

library tel-search-php-api

image

twomedia/tel-search-php-api

  • Friday, January 15, 2016
  • by stefanzweifel
  • Repository
  • 1 Watchers
  • 0 Stars
  • 124 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

tel.search.ch PHP API Wrapper

A simple PHP API wrapper for http://tel.search.ch. A valid API key is required!, (*1)

Installation

Download the latest release or install it with composer (composer require twomedia/tel-search-php-api), (*2)

Laravel

Require TwoMedia\TelSearch\TelSearchProvider::class in your providers list in config/app.php., (*3)

    $providers = [
        ...
        TwoMedia\TelSearch\TelSearchServiceProvider::class,
        ...
    ];

Add your API key in your services config file with the key tel-search.secret:, (*4)

    ...
        'tel-search' => [
            'secret' => 'YOUR_SECRET_API_KEY'
        ],
    ...

Usage

Create a new Instance of the Client and pass your API key to the constructor. Search for Names or Geolocations with the what() and where() methods. If you use Laravel, you can get the instance from the IoC Container and, (*5)

    $client = new TwoMedia\TelSearch\Client("YOUR_API_KEY");
    $response = $client->what(["Max", "Mustermann", "044123456"])->where(["ZĂŒrich"])->send();
    $entries = $response->entries();

    // Laravel
    $client = app("TwoMedia\TelSearch\Client");
    $response = $client->what(["Max", "Mustermann", "044123456"])->where(["ZĂŒrich"])->send();
    $entries = $response->entries();

The package returns 10 results by default. Package specific settings might be introduced in the future. You can find further documentation to the API here., (*6)

License

This code is published under the MIT License. This means you can do almost anything with it, as long as the copyright notice and the accompanying license file is left intact., (*7)

The Versions

15/01 2016

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

15/01 2016

1.0.0

1.0.0.0

  Sources   Download

The Requires

 

The Development Requires