jozefcipa/cp.sk-api

Api to fetch 3 nearest departures from cp.sk

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Type:project

pkg:composer/jozefcipa/cp.sk-api

dev-master 2017-10-01 11:45 UTC

This package is not auto-updated.

Last update: 2025-10-02 00:16:37 UTC


README

Api to fetch 3 nearest departures from cp.sk

Inspired by official python version.

Usage

use JozefCipa\CP\CpSK;
use JozefCipa\CP\CpException;

$cpsk = new CpSK;

$departures = $cpsk->from('Pod Táborom')
	    		->to('Čierny most')
	    		->useVehicles(CpSK::MHD)
	    		->inCity('Prešov')
	    		->at('12:00 13.03.2017')
	    		->find();

Note: Stops names must match exact name available on cp.sk

Credits: Official creator

Beware that by using this you might be violating cp.sk ToS