public function api($name)
    {
        switch ($name) {
            case 'action':
            case 'actions':
                $api = new Api\Action($this);
                break;
            case 'board':
            case 'boards':
                $api = new Api\Board($this);
                break;
            case 'card':
            case 'cards':
                $api = new Api\Card($this);
                break;
            case 'checklist':
            case 'checklists':
                $api = new Api\Checklist($this);
                break;
            case 'list':
            case 'lists':
                $api = new Api\Cardlist($this);
                break;
            case 'member':
            case 'members':
                $api = new Api\Member($this);
                break;
            case 'notification':
            case 'notifications':
                $api = new Api\Notification($this);
                break;
            case 'organization':
            case 'organizations':
                $api = new Api\Organization($this);
                break;
            case 'token':
            case 'tokens':
                $api = new Api\Token($this);
                break;
            case 'webhook':
            case 'webhooks':
                $api = new Api\Webhook($this);
                break;
            default:
                throw new InvalidArgumentException(sprintf('Undefined api called: "%s"', $name));
        }

        return $api;
    }
public function api($name)
    {
        switch ($name) {
            case 'action':
            case 'actions':
                $api = new Api\Action($this);
                break;
            case 'board':
            case 'boards':
                $api = new Api\Board($this);
                break;
            case 'card':
            case 'cards':
                $api = new Api\Card($this);
                break;
            case 'checklist':
            case 'checklists':
                $api = new Api\Checklist($this);
                break;
            case 'list':
            case 'lists':
                $api = new Api\Cardlist($this);
                break;
            case 'member':
            case 'members':
                $api = new Api\Member($this);
                break;
            case 'notification':
            case 'notifications':
                $api = new Api\Notification($this);
                break;
            case 'organization':
            case 'organizations':
                $api = new Api\Organization($this);
                break;
            case 'token':
            case 'tokens':
                $api = new Api\Token($this);
                break;
            case 'webhook':
            case 'webhooks':
                $api = new Api\Webhook($this);
                break;
            default:
                throw new InvalidArgumentException(sprintf('Undefined api called: "%s"', $name));
        }

        return $api;
    }
public function api ( $ name ) { switch ( $ name ) { case 'action' : case 'actions' : $ api = new Api \ Action ( $ this ) ; break ; case 'board' : case 'boards' : $ api = new Api \ Board ( $ this ) ; break ; case 'card' : case 'cards' : $ api = new Api \ Card ( $ this ) ; break ; case 'checklist' : case 'checklists' : $ api = new Api \ Checklist ( $ this ) ; break ; case 'list' : case 'lists' : $ api = new Api \ Cardlist ( $ this ) ; break ; case 'member' : case 'members' : $ api = new Api \ Member ( $ this ) ; break ; case 'notification' : case 'notifications' : $ api = new Api \ Notification ( $ this ) ; break ; case 'organization' : case 'organizations' : $ api = new Api \ Organization ( $ this ) ; break ; case 'token' : case 'tokens' : $ api = new Api \ Token ( $ this ) ; break ; case 'webhook' : case 'webhooks' : $ api = new Api \ Webhook ( $ this ) ; break ; default : throw new InvalidArgumentException ( sprintf ( 'Undefined api called: "%s"' , $ name ) ) ; } return $ api ; }
Get an API by name

@param string $name

@return ApiInterface

@throws InvalidArgumentException if the requested api does not exist
Get an API by name