https://developer.zendesk.com/rest_api/docs/voice-api/greetings#create-greetings
12570
def channels_voice_greeting_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/channels/voice/greetings.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
679897
async def create_post_request(self, method: str, params: Dict = None):
        
        if params is None:
            params = {}
        headers = {"Content-Type": "application/json"}
        payload = {
            "method": method,
            "params": [params],
            "id": next(self.idgen),
            "version": "1.0",
        }

        if self.debug > 1:
            _LOGGER.debug("> POST %s with body: %s", self.guide_endpoint, payload)

        async with aiohttp.ClientSession(headers=headers) as session:
            res = await session.post(self.guide_endpoint, json=payload, headers=headers)
            if self.debug > 1:
                _LOGGER.debug("Received %s: %s" % (res.status_code, res.text))
            if res.status != 200:
                raise SongpalException(
                    "Got a non-ok (status %s) response for %s" % (res.status, method),
                    error=await res.json()["error"],
                )

            res = await res.json()

        # TODO handle exceptions from POST? This used to raise SongpalException
        #      on requests.RequestException (Unable to get APIs).

        if "error" in res:
            raise SongpalException("Got an error for %s" % method, error=res["error"])

        if self.debug > 1:
            _LOGGER.debug("Got %s: %s", method, pf(res))

        return res
1013180
def _generate_create_callable(name, display_name, arguments, regex, doc, supported, post_arguments, is_action):
    
    def f(self, *args, **kwargs):
        for key, value in args[-1].items():
            if type(value) == file:
                return self._put_or_post_multipart('POST', self._generate_url(regex, args[:-1]), args[-1])
        return self._put_or_post_json('POST', self._generate_url(regex, args[:-1]), args[-1])
    if is_action:
        f.__name__ = str(name)
    else:
        f.__name__ = str('create_%s' % name)
    f.__doc__ = doc
    f._resource_uri = regex
    f._get_args = arguments
    f._put_or_post_args = post_arguments
    f.resource_name = display_name
    f.is_api_call = True
    f.is_supported_api = supported
    return f
1339779
def users_create_or_update_many(self, data, **kwargs):
        ""
        api_path = "/api/v2/users/create_or_update_many.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
752796
def create_contact(self, *args, **kwargs):
        """"""
        url = 'contacts.json'
        contact_data = {
            'active': True,
            'helpdesk_agent': False,
            'description': 'Freshdesk Contact'
        }
        contact_data.update(kwargs)
        payload = {
            'user': contact_data
        }

        return Contact(**self._api._post(url, data=payload)['user'])
1374973
def _parse_welcome(client, command, actor, args):
    """"""
    _, _, hostmask = args.rpartition(' ')
    client.user.update_from_hostmask(hostmask)
    client.dispatch_event("WELCOME", hostmask)
99105
function constructMessageApi(namespace, cmd, destName, seq) {
  var api = {},
      valid = true,
      timeout = module.exports.ackTimeout,
      resolve,
      reject;

  var promise = new Promise(function(_resolve, _reject) {
    resolve = _resolve;
    reject = _reject;
  });

  setImmediate(function() {
    valid = false;
  });

  api.within = function(newTimeout) {
    if (!valid) {
      throw new Error("within() / acknowledged() calls are only valid immediately after sending a message.");
    }
    if (resolve.monitored) {
      throw new Error("within() must be called *before* acknowledged()");
    }
    if ("number" !== typeof newTimeout) {
      newTimeout = parseInt(newTimeout, 10);
    }
    if(!newTimeout) {
      throw new Error("Timeout must be a number");
    }
    timeout = newTimeout;
    return api;
  };

  api.acknowledged = function(cb) {
    if (!valid) {
      throw new Error("within() / acknowledged() calls are only valid immediately after sending a message.");
    }
    // This flag indicates that the caller does actually care about the resolution of this acknowledgement.
    resolve.monitored = true;
    return promise.timeout(timeout)
        .catch(Promise.TimeoutError, function() {
          // We retrieve the pending here to ensure it's deleted.
          namespace.getPending(seq);
          throw new Error("Timed out waiting for acknowledgement for message " + cmd + " with seq " + seq + " to " + destName + " in namespace " + namespace.interface.name);
        })
        .nodeify(cb);
  };

  api.ackd = api.acknowledged;

  return [api, resolve, reject];
}
277765
def __create(self, client_id, client_secret, calls, **kwargs):
        
        params = {
            'client_id': client_id,
            'client_secret': client_secret,
            'calls': calls
        }
        return self.make_call(self.__create, params, kwargs)
869325
def create(self, verbose=None):
        
        if not self.email_enabled:
            raise EmailNotEnabledError("See settings.EMAIL_ENABLED")
        response = requests.post(
            self.api_url,
            auth=("api", self.api_key),
            data={
                "address": self.address,
                "name": self.name,
                "description": self.display_name,
            },
        )
        if verbose:
            sys.stdout.write(
                f"Creating mailing list {self.address}. "
                f"Got response={response.status_code}.\n"
            )
        return response
326683
def oauth_client_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/oauth/clients.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
735162
def voice_message_create(recipients, body, params={})
      # Convert an array of recipients to a comma-separated string.
      recipients = recipients.join(',') if recipients.kind_of?(Array)

      VoiceMessage.new(request(
        :post,
        'voicemessages',
        params.merge({ :recipients => recipients, :body => body.to_s })))
    end
1158295
def send_appreciation!(user_id, opts = {})
      params = { "toUserID" => user_id }
      params["companyValueID"] = opts[:company_value_id] if opts[:company_value_id]
      params["amount"] = opts[:amount] if opts[:amount]
      params["note"] = opts[:note] if opts[:note]
      params["privateAppreciation"] = opts[:private] || false
      put "/api/v1/user/#{user_id}/appreciation", {}, params
    end
890089
function(params, callback) {
        /**
         * Callback for QB.chat.dialog.create().
         * @param {Object} error - The error object
         * @param {Object} createdDialog - the dialog object
         * @callback createDialogCallback
         * */

        if (params && params.occupants_ids && Utils.isArray(params.occupants_ids)) {
            params.occupants_ids = params.occupants_ids.join(', ');
        }

        this.service.ajax({
            url: Utils.getUrl(DIALOGS_API_URL),
            type: 'POST',
            data: params
        }, callback);
    }
956428
def organizations_create_many(self, data, **kwargs):
        ""
        api_path = "/api/v2/organizations/create_many.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1300564
function hello(req, res) {
  // variables defined in the Swagger document can be referenced using req.swagger.params.{parameter_name}
  var name = req.swagger.params.name.value || 'stranger';
  var hello = util.format('Hello, %s!', name);

  // this sends back a JSON response which is a single string
  res.json(hello);
}
1076795
def channels_voice_greeting_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/channels/voice/greetings/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
436053
def organization_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/organizations.json"
        return self.call(api_path, method="POST", data=data, **kwargs)