index.php 646 Bytes
Newer Older
Max Koder's avatar
Max Koder committed
1 2 3 4 5 6 7 8 9 10 11
<?php

require 'tootophp\autoload.php';

$tootoPHP = new TootoPHP\TootoPHP('mastodon.xyz');

$app = $tootoPHP->registerApp('TootoPHP', 'http://max-koder.fr');
if ( $app === false) {
    throw new Exception('Problem during register app');
}

Max Koder's avatar
Max Koder committed
12 13
//var_dump($app->getUser());
//
Max Koder's avatar
Max Koder committed
14 15
//var_dump($app->getFavourites());

Max Koder's avatar
Max Koder committed
16
//var_dump($app->getAccount(1629));
Max Koder's avatar
Max Koder committed
17 18 19

//var_dump($app->getFollowers(1629));

Max Koder's avatar
Max Koder committed
20 21 22 23 24 25 26 27
//var_dump($app->getFollowing(1629));

//var_dump($app->postStatus('This status is posted by #PHP'));

//var_dump($app->getStatuses('1629', ['only_media' => true]));

//var_dump($app->getStatuses('1629'));

Max Koder's avatar
Max Koder committed
28
//var_dump($app->getFollowers(1629, ['limit' => 5]));