Empty array while retrieving repo list

Issue #25 invalid
Mustapha FODIL created an issue

Hello,

First of all, thank you for this good work !

I'm trying to play around with bitbucket api i have, two main things that i would like to achieve.

First one is retrieving repo list. When i issue the request i have an empty array as repo list.

Here's the code :

$repos= new Bitbucket\API\Repositories();
$res = json_decode($changesets->all($username)->getContent());
echo "<pre>";
print_r($res);
exit;

And here's the response

stdClass Object
(
    [pagelen] => 10
    [values] => Array
        (
        )

    [page] => 1
)

Any idea on this ?

Not sure, which version i'm using, i just installed via composer...

I've created credentials on bitbucket, and i'm sure that i have repos available on the $username account

Comments (3)

  1. Mustapha FODIL reporter

    My bad !

    Found that i've forgotten to set OauthListener for credentials..

    $changesets->getClient()->addListener( new Bitbucket\API\Http\Listener\OAuthListener($oauth_params) );

    By the way is there a way to specify a global Oauthlistener so i don't have to do it for each request ? thks

  2. Alexandru Guzinschi

    By the way is there a way to specify a global Oauthlistener so i don't have to do it for each request ? thks

    It's mandatory to provide OAuth credentials on each request. For more info please read OAuth specification.

  3. Log in to comment