Skip to content

Instantly share code, notes, and snippets.

@yitznewton
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save yitznewton/cd860327f9ecafe21c17 to your computer and use it in GitHub Desktop.

Select an option

Save yitznewton/cd860327f9ecafe21c17 to your computer and use it in GitHub Desktop.
API client
<?php
function get_projects(ApiClient $api)
{
$projectList = [];
foreach ($api->getProjects(['limit' => 200]) as $project) {
$projectList[$project->getId()] = $project->getData()->name;
}
return $projectList;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment