docs: def call(cls, method, *args, **kwargs):
          """ Call a remote api method and return the result."""
          api = None
          empty_key = kwargs.pop('empty_key', False)
          try:
              api = cls.get_api_connector()
              apikey = cls.get('api.key')
              if not apikey and not empty_key:
                  cls.echo("No apikey found, please use 'gandi setup' "
                           "command")
                  sys.exit(1)
          except MissingConfiguration:
              if api and empty_key:
                  apikey = ''
              elif not kwargs.get('safe'):
                  cls.echo("No configuration found, please use 'gandi setup' "
                           "command")
                  sys.exit(1)
              else:
                  return []
  
          # make the call
          cls.debug('calling method: %s' % method)
          for arg in args:
              cls.debug('with params: %r' % arg)
          try:
              resp = api.request(method, apikey, *args,
                                 **{'dry_run': kwargs.get('dry_run', False),
                                    'return_dry_run':
                                    kwargs.get('return_dry_run', False)})
              cls.dump('responded: %r' % resp)
              return resp
          except APICallFailed as err:
              if kwargs.get('safe'):
                  return []
              if err.code == 530040:
                  cls.echo("Error: It appears you haven't purchased any credits "
                           "yet.\n"
                           "Please visit https://www.gandi.net/credit/buy to "
                           "learn more and buy credits.")
                  sys.exit(1)
              if err.code == 510150:
                  cls.echo("Invalid API key, please use 'gandi setup' command.")
                  sys.exit(1)
              if isinstance(err, DryRunException):
                  if kwargs.get('return_dry_run', False):
                      return err.dry_run
                  else:
                      for msg in err.dry_run:
                          # TODO use trads with %s
                          cls.echo(msg['reason'])
                          cls.echo('\t' + ' '.join(msg['attr']))
                      sys.exit(1)
              error = UsageError(err.errors)
              setattr(error, 'code', err.code)
              raise error