Skip to content

Commit

Permalink
Create readme. Fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolashohm committed Feb 19, 2015
1 parent cc7e056 commit ab8dc2f
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,48 @@
[![Build Status](https://travis-ci.org/nickel715/networker.svg)](https://travis-ci.org/nickel715/networker)
[![Coverage Status](https://coveralls.io/repos/nickel715/networker/badge.svg?branch=master)](https://coveralls.io/r/nickel715/networker?branch=master)

Some websites does not provides a feature to find followers youe follow on other networks like twitter.

## Features

* Get users you are following or followers you
* Store userslist
* Check if users exists on network

## Supported networks

* Twitter
* Github
* Pinboard.in
* Trakt.tv

## Code example

```php
$username = 'nickel715';

$credentials = array(
'consumer_key' => '',
'consumer_secret' => '',
'oauth_token' => '',
'oauth_token_secret' => '',
);

$twitterAuth = new \TwitterOAuth\Auth\SingleUserAuth($credentials, new \TwitterOAuth\Serializer\ArraySerializer());

$importNetwork = new Network\Twitter;
$importNetwork->setTwitter($twitterAuth);

$userList = $importNetwork->getAll($username);
$storage = new Storage\File('userlist.txt');
$storage->addAll($userList);

$exportNetwork = new Network\Pinboard;
$exportNetwork->setHttpClient(new \Zend\Http\Client);

foreach ($storage->findAll() as $user) {
if ($exportNetwork->userExists($user)) {
echo $exportNetwork->getUserLink($user), PHP_EOL;
}
}
```

0 comments on commit ab8dc2f

Please sign in to comment.