Bitbucket API: Using the API Issue and filter to get only requested data back

2.5k views Asked by At

I am using the BB API and in particular the issues division. At the moment i am using the following to get all issue then looping through to get what i require but i noticed that we can add a filter option to get just the required issues back.

  $issue->all(account, repo);

But looking into the api code noticed the $options param. But i cannot find any doc or details on how to supply the $options values. I have tried the following

  $issue->all(account, repo, array('filter'=>array('status','new));

But this does not play ball.

So how can i use this third param $options so that i can use the filter setting?

for reference i am using gentlero/bitbucket-api for the php backend and this is where the all function is

2

There are 2 answers

1
Simon Davies On

looking closer and with more paitence i used the following and it seemded to work:

  $issue->all(account, repo,array('status' => 'resolved'));
0
Craig Wayne On