Search by

jozefcipa / cp.sk-api

JozefCipa

Api to fetch 3 nearest departures from cp.sk

Package info

github.com/JozefCipa/php-cpsk-api

Issues

Type:project

pkg:composer/jozefcipa/cp.sk-api

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 0

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

This package is not auto-updated.

Last update: 2026-10-29 06:00:07 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