code: public function api($name)
      {
          switch ($name) {
              case 'user':
              case 'users':
                  $api = new Api\Users($this->getHttpClient());
                  break;
              default:
                  throw new InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name));
          }
  
          return $api;
      }
docs: @param string $name
  
  @throws InvalidArgumentException
  
  @return AbstractApi