An open API service indexing awesome lists of open source software.

https://github.com/phalski/skipass-client

A PHP client to access skipass site contents
https://github.com/phalski/skipass-client

php

Last synced: 2 months ago
JSON representation

A PHP client to access skipass site contents

Awesome Lists containing this project

README

        

# Skipass site scraping client

Usage:

```php
count();
} catch (\Phalski\Skipass\FetchException $e) {
// something went wrong with the http request
}

// retrieve the usage data of a specific day (day_id is between 0 and count())
try {
$result = $skipass->findById(2);
if ($result->hasErrors()) {
// handle all the errors withing $result->getErrors()
throw new LogicException();
}
$data = $result->getData();
} catch (\Phalski\Skipass\FetchException $e) {
// something went wrong with the http request for the latest count
} catch (\InvalidArgumentException $e) {
// day_id is not between 0 and count()
}

// retrieve the usage data of multiple days
$first = 3;
$offset = 5;
try {
$result = $skipass->findAll($first, $offset);
if ($result->hasErrors()) {
// handle all the errors withing $result->getErrors()
throw new LogicException();
}
$data = $result->getData();
} catch (\Phalski\Skipass\FetchException $e) {
// something went wrong with the http request for the latest count
} catch (\InvalidArgumentException $e) {
// offset is not between 0 and count()
}

// retrieve the usage data of all days
try {
$result = $skipass->findAll(-1);
if ($result->hasErrors()) {
// handle all the errors withing $result->getErrors()
throw new LogicException();
}
$data = $result->getData();
} catch (\Phalski\Skipass\FetchException $e) {
// something went wrong with the http request for the latest count
} catch (\InvalidArgumentException $e) {
// day_id is not between 0 and count()
}

```