Skip to content

unit27/teryt-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GUS TERYT SDK

The library provides a wrapper for GUS TERYT SOAP API.

Installation

Recommended way of installation is via composer

composer require unit27/teryt-sdk

Usage

Create an instance of the API:

use Goosfraba\Teryt\Soap\TerytApiFactory;
use Goosfraba\Teryt\Soap\Dsn;

$factory = new TerytApiFactory();

$dsn = Dsn::prod("your-user", "your-pass");
// or 
$dsn = Dsn::test(); // public test credentials
// or
$dsn = Dsn::parse("gus+teryt://your-user:your-pass@prod"); // your production credentials

$api = $factory->create($dsn);

Use API according to their documentation:

use Goosfraba\Teryt\TerytApi;

/** @var TerytApi $api */

$catalogFile = $api->PobierzKatalogSIMCAdr(); // downloads the SIMC catalogue in address version
$fileObject = $catalogFile->dump(); // Dumps the catalogue content into a file \SplFileObject

Supported functions

For know the SDK supports the following functions:

  • CzyZalogowany
  • PobierzDateAktualnegoKatTerc
  • PobierzDateAktualnegoKatNTS
  • PobierzDateAktualnegoKatSimc
  • PobierzDateAktualnegoKatUlic
  • PobierzListeWojewodztw
  • PobierzListePowiatow
  • PobierzListeGmin
  • PobierzGminyiPowDlaWoj
  • PobierzKatalogTERC
  • PobierzKatalogTERCAdr
  • PobierzKatalogNTS
  • PobierzKatalogSIMCAdr
  • PobierzKatalogSIMC
  • PobierzKatalogSIMCStat
  • PobierzKatalogULIC
  • PobierzKatalogULICAdr
  • PobierzKatalogULICBezDzielnic
  • PobierzKatalogWMRODZ
  • PobierzSlownikRodzajowJednostek
  • PobierzSlownikCechULIC
  • PobierzSlownikRodzajowSIMC
  • WyszukajMiejscowosc
  • WyszukajUlice

Feel free to contribute and add support for more functions.