Skip to content

Commit

Permalink
Populate readme with examples and basic description.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanly committed Jun 26, 2014
1 parent c3caebf commit 8599786
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
traktor
Traktor
=======

A Trakt.tv API client library in PHP, compatible with PSR-4 and Composer.
[![Build Status - Master](https://api.travis-ci.org/alanly/traktor.svg?branch=master)](https://travis-ci.org/alanly/traktor)

Traktor is a simple PHP client for the Trakt.tv API service, that allows you to cleanly integrate the data available on Trakt into your application. Currently, it supports only non-developer and GET-based methods.

It aims to be fairly basic and simple to use:

```php
$traktor = new Traktor\Client;
$traktor->setApiKey('foobar');
$summary = $traktor->get('movie.summary', ['the-social-network-2010']);
echo $summary->imdb_id;
// "tt1285016"
echo $summary->tagline;
// "You don't get to 500 million friends without making a few enemies"
```

```php
$traktor = new Traktor\Client;
$traktor->setApiKey('foobar');
$summary = $traktor->get('show.episode.summary', ['silicon-valley', 1, 3]);
echo $summary->show->title;
// "Silicon Valley"
echo $summary->episode->season;
// 1
echo $summary->episode->number;
// 3
echo $summary->episode->title;
// "Articles of Incorporation"
```

0 comments on commit 8599786

Please sign in to comment.