PHPackages                             vikingmaster/tampere-journeys-api-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vikingmaster/tampere-journeys-api-sdk

ActiveLibrary[API Development](/categories/api)

vikingmaster/tampere-journeys-api-sdk
=====================================

PHP SDK for Tampere Journeys API

0.1.2(6y ago)06[2 issues](https://github.com/sybbear/tampere-journeys-api-sdk/issues)[2 PRs](https://github.com/sybbear/tampere-journeys-api-sdk/pulls)MITHTMLPHP ^7.2

Since Nov 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sybbear/tampere-journeys-api-sdk)[ Packagist](https://packagist.org/packages/vikingmaster/tampere-journeys-api-sdk)[ RSS](/packages/vikingmaster-tampere-journeys-api-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (6)Used By (0)

Tampere Journey API SDK
=======================

[](#tampere-journey-api-sdk)

This is an unofficial SDK release for [Tampere Journeys API](http://wiki.itsfactory.fi/index.php/Journeys_API).

Installation
============

[](#installation)

Install using composer: `composer require vikingmaster/tampere-journeys-api-sdk`

Usage
=====

[](#usage)

Creating an API Client instance. Available config parameters:

- `baseUri` Base URI to make requests to
- `timeout` (optional) Http request timeout in seconds
- `userAgent` (optional) User-Agent header

```
$api = new \Vikingmaster\TampereJourneysApiSdk\TampereJourneysApiClient([
    'baseUri' => 'http://data.itsfactory.fi/journeys/api'
]);
```

### Fetching lines:

[](#fetching-lines)

```
//Fetch lines
$request = $api->makeGetLinesRequest()
    ->setIndent(true)
    ->setDescription('Description')
;
$response = $request->send();
$lines = $response->getLines();
```

### Fetching journey patterns

[](#fetching-journey-patterns)

```
$request = $api->makeGetJourneyPatternsRequest()
    ->setFirstStopPointId(1)
    ->setLastStopPointId(2)
    ->setLineId(17)
    ->setName("Nokian asema C - Keho")
;
$response = $request->send();
$patterns = $response->getJourneyPatterns();
```

Exception handling
==================

[](#exception-handling)

When there is a request error, TampereJourneyApiException will be thrown:

```
use \Vikingmaster\TampereJourneysApiSdk\Exceptions\TampereJourneyApiException;

try {
    $response = $request->send();
} catch (TampereJourneyApiException $e) {
    //These methods are available for problem tracing
    $apiError  = $e->getApiError();
    $request   = $e->getRequest();
    $response  = $e->getResponse();
    $apiClient = $e->getApiClient();
} catch (\Exception $e) {
    //Any other errors such as network or configuration error
}
```

Pagination
==========

[](#pagination)

Some of the responses can be long, so multiple requests might be needed to fetch everything

```
/** @var array|\Vikingmaster\TampereJourneysApiSdk\Dto\Line[] $entries */
$entries = [];

$fetch      = true;
$startIndex = 0;
while ($fetch) {
    try {
        $response = $request->setStartIndex($startIndex)->send();
        $entries  = array_merge($entries, $response->getLines());
    } catch (\Exception $e) {
         //Handle exception / resend the request
        break;
    }

    $fetch      = $response->getPaging()->hasMoreData();
    $startIndex = $response->getPaging()->getPageSize();
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2380d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21ba96cedcb4a15bf7e8049c437b30da4e494168cbc4a6800e814aacb91aabe7?d=identicon)[vikingmaster](/maintainers/vikingmaster)

---

Top Contributors

[![sybbear](https://avatars.githubusercontent.com/u/2473385?v=4)](https://github.com/sybbear "sybbear (1 commits)")

---

Tags

phpapisdkbustamperejourneyssmart-city

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vikingmaster-tampere-journeys-api-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/vikingmaster-tampere-journeys-api-sdk/health.svg)](https://phpackages.com/packages/vikingmaster-tampere-journeys-api-sdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
