PHPackages                             risan/sl - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. risan/sl

ActiveLibrary[HTTP &amp; Networking](/categories/http)

risan/sl
========

HTTP client library for sl.se, Stockholm public transportation API.

v1.1.0(10y ago)011MITPHP

Since Dec 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/risan/sl)[ Packagist](https://packagist.org/packages/risan/sl)[ Docs](https://github.com/risan/sl)[ RSS](/packages/risan-sl/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (5)Used By (0)

Stockholm Pulic Transport
=========================

[](#stockholm-pulic-transport)

[![Build Status](https://camo.githubusercontent.com/7da7992ee31be6c1b06c5d54560236c30f73ddab8768f3ed6a71930c9c6dbbf7/68747470733a2f2f7472617669732d63692e6f72672f726973616e2f736c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/risan/sl)[![HHVM Status](https://camo.githubusercontent.com/75c857d9b751d750a9079308387d05c8a850942c855088f2b9b4eeffb660ec44/687474703a2f2f6868766d2e683463632e64652f62616467652f726973616e2f736c2e7376673f7374796c653d666c6174)](http://hhvm.h4cc.de/package/risan/sl)[![StyleCI](https://camo.githubusercontent.com/da1ba5279c4a1885fa85f27c45379ede6c823bcb5e595aaf2b844726a4e93bbd/68747470733a2f2f7374796c6563692e696f2f7265706f732f34383133393036382f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/48139068)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c54ddcd63e70ca2a88c1f4f8539ceb763b9d916a790cc16ae085a2e2256aa5ec/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726973616e2f736c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/risan/sl/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/32794f654972e935b9135e1adfba9c51a78683981bbb02a018e6293e7230eaa7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726973616e2f736c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/risan/sl/?branch=master)[![SensioLabs Insight](https://camo.githubusercontent.com/6e6624b1f3e49344ae2521e6b2ee2183397a14cd632ce01dbb0e189b2f6d45d2/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f30333633633964312d313765632d343735632d626566342d3964376538383964373762332e737667)](https://insight.sensiolabs.com/projects/0363c9d1-17ec-475c-bef4-9d7e889d77b3)[![Latest Stable Version](https://camo.githubusercontent.com/166d9a76651d807d65f3c850d95d5001e8cde9901ff3e16700529e4f231b9815/68747470733a2f2f706f7365722e707567782e6f72672f726973616e2f736c2f762f737461626c65)](https://packagist.org/packages/risan/sl)[![License](https://camo.githubusercontent.com/57a07c3a49c4b2bdd0ac14428934b407eefb5065593c7055508948b41955579b/68747470733a2f2f706f7365722e707567782e6f72672f726973616e2f736c2f6c6963656e7365)](https://packagist.org/packages/risan/sl)

PHP HTTP client library for communicating with [sl.se](http://sl.se/)—a Stockholm public transportation website.

Table of Contents
-----------------

[](#table-of-contents)

- [Dependencies](#dependencies)
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Search for Station](#search-for-station)
- [Find Departures](#find-departures)
    - [Bus Departures](#bus-departures)
    - [Train Departures](#train-departures)
    - [Metro Departures](#metro-departures)
    - [Tram Departures](#tram-departures)
    - [Light Rail Departures](#light-rail-departures)
    - [Ship Departures](#ship-departures)

Dependencies
------------

[](#dependencies)

This package relies on the following libraries to work:

- [Guzzle](https://github.com/guzzle/guzzle)
- [Illuminate Support](https://github.com/illuminate/support)

All above dependencies will be automatically downloaded if you are using [Composer](https://getcomposer.org/) to install this package.

Installation
------------

[](#installation)

To install this library using [Composer](https://getcomposer.org/), simply run the following command inside your project directory:

```
composer require risan/sl
```

Or you may also add `risan\sl` package into your `composer.json` file like so:

```
"require": {
  "risan/sl": "~1.1"
}
```

And don't forget to run the following composer command to install this library:

```
composer install
```

Basic Usage
-----------

[](#basic-usage)

Here is some basic example to use this library:

```
