{"action":"created","issue":{"url":"https://api.github.com/repos/cdaguerre/php-trello-api/issues/24","repository_url":"https://api.github.com/repos/cdaguerre/php-trello-api","labels_url":"https://api.github.com/repos/cdaguerre/php-trello-api/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/cdaguerre/php-trello-api/issues/24/comments","events_url":"https://api.github.com/repos/cdaguerre/php-trello-api/issues/24/events","html_url":"https://github.com/cdaguerre/php-trello-api/issues/24","id":145994332,"number":24,"title":"Too many api calls when trying to get cards moved from a list to another","user":{"login":"seblegall","id":3866325,"avatar_url":"https://avatars.githubusercontent.com/u/3866325?v=3","gravatar_id":"","url":"https://api.github.com/users/seblegall","html_url":"https://github.com/seblegall","followers_url":"https://api.github.com/users/seblegall/followers","following_url":"https://api.github.com/users/seblegall/following{/other_user}","gists_url":"https://api.github.com/users/seblegall/gists{/gist_id}","starred_url":"https://api.github.com/users/seblegall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seblegall/subscriptions","organizations_url":"https://api.github.com/users/seblegall/orgs","repos_url":"https://api.github.com/users/seblegall/repos","events_url":"https://api.github.com/users/seblegall/events{/privacy}","received_events_url":"https://api.github.com/users/seblegall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-05T13:47:48Z","updated_at":"2016-04-07T11:59:27Z","closed_at":null,"body":"Hi,\r\n\r\nHere is a use case I needed to implement for generating BurnDown Chart using Trello actions.\r\n\r\nHere is my algorithme : \r\n1. Get board \r\n2. Get lists \"from and \"to\"\r\n3. Get all cards in the \"to\" list.\r\n4. Foreach cards of this list, get all actions of the card.\r\n5. Foreach action, check the type of action (update) and check from wich list and to wich list the card has been moved (in order to check if the card is coming from my \"from\" list)\r\n6. If the card is coming from the \"from\" list, get the name and preg_match ([0-9]*)\r\n\r\nThe global goal is to find all cards which have been moved from a list 1 to a list 2 during an interval of 2 dates.\r\n\r\nUnfortunately, it seems that Trello API does not provide a web service to get all the moved card from or to a selected list.\r\n\r\nAnyway, with your php-trello-api wrapper, it seems that the refresh method is called each time an object is instantiated... resulting an API call for each instantiation...\r\n\r\nIn my example it result 1865 API Calls... \r\n\r\nHere is the Blackfire profile : https://blackfire.io/profiles/dff19c00-03a0-41b8-99f7-d36dcf542f3e/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=&callname=main()\r\n"},"comment":{"url":"https://api.github.com/repos/cdaguerre/php-trello-api/issues/comments/206834748","html_url":"https://github.com/cdaguerre/php-trello-api/issues/24#issuecomment-206834748","issue_url":"https://api.github.com/repos/cdaguerre/php-trello-api/issues/24","id":206834748,"user":{"login":"seblegall","id":3866325,"avatar_url":"https://avatars.githubusercontent.com/u/3866325?v=3","gravatar_id":"","url":"https://api.github.com/users/seblegall","html_url":"https://github.com/seblegall","followers_url":"https://api.github.com/users/seblegall/followers","following_url":"https://api.github.com/users/seblegall/following{/other_user}","gists_url":"https://api.github.com/users/seblegall/gists{/gist_id}","starred_url":"https://api.github.com/users/seblegall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seblegall/subscriptions","organizations_url":"https://api.github.com/users/seblegall/orgs","repos_url":"https://api.github.com/users/seblegall/repos","events_url":"https://api.github.com/users/seblegall/events{/privacy}","received_events_url":"https://api.github.com/users/seblegall/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T11:59:27Z","updated_at":"2016-04-07T11:59:27Z","body":"@cdaguerre Yes, I will try that. Another way to improve api calls I implemented is to call the api directly.\r\n\r\nInstead of  \r\n```php\r\n$lists = $board->getLists()\r\n``` \r\nI use : \r\n\r\n```php\r\n$lists = $this->client->api('board')->lists()->all($board->getId());\r\n``` \r\nThen...\r\n\r\n```php\r\nnew Cardlist($this->client, $list['id']);\r\n``` \r\n"}}