API_SendInvitation
500272
def sendInvitation( dbid, userid, usertext = "Welcome to my application!" )
      @dbid, @userid, @usertext = dbid, userid, usertext 
      
      xmlRequestData = toXML( :userid, @userid )
      xmlRequestData << toXML( :usertext, @usertext )
      
      sendRequest( :sendInvitation, xmlRequestData )
      
      return self if @chainAPIcalls
      @requestSucceeded
   end
1139138
def deliver_hook(target, payload, instance_id=None, hook_id=None, **kwargs):
    
    r = requests.post(
        url=target,
        data=json.dumps(payload),
        headers={
            "Content-Type": "application/json",
            "Authorization": "Token %s" % settings.HOOK_AUTH_TOKEN,
        },
    )
    r.raise_for_status()
    return r.text
815160
async def send_api(container, targetname, name, params = {}):
    
    handle = object()
    apiEvent = ModuleAPICall(handle, targetname, name, params = params)
    await container.wait_for_send(apiEvent)
1355577
public function sendInvitation()
    {
        $data = [
            'name' => $this->full_name,
            'login' => $this->login,
            'password' => $this->getOriginalHashValue('password'),
            'link' => Backend::url('backend'),
        ];

        Mail::send('backend::mail.invite', $data, function ($message) {
            $message->to($this->email, $this->full_name);
        });
    }
1193186
def _notify_fn(self):
        """"""
        self._notifyrunning = True
        while self._notifyrunning:
            try:
                with IHCController._mutex:
                    # Are there are any new ids to be added?
                    if self._newnotifyids:
                        self.client.enable_runtime_notifications(
                            self._newnotifyids)
                        self._newnotifyids = []

                changes = self.client.wait_for_resource_value_changes()
                if changes is False:
                    self.re_authenticate(True)
                    continue
                for ihcid in changes:
                    value = changes[ihcid]
                    if ihcid in self._ihcevents:
                        for callback in self._ihcevents[ihcid]:
                            callback(ihcid, value)
            except Exception as exp:
                self.re_authenticate(True)
786536
private void sendStatusAndClose(final Channel chan, final HttpResponseStatus status) {
    if (chan.isConnected()) {
      final DefaultHttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status);
      final ChannelFuture future = chan.write(response);
      future.addListener(ChannelFutureListener.CLOSE);
    }
  }
562104
private function sendResponse(string $invocationId, $responseData): void
    {
        $url = "http://{$this->apiUrl}/2018-06-01/runtime/invocation/$invocationId/response";
        $this->postJson($url, $responseData);
    }
282655
function(self, eventType, content) {
    return self.client.sendEvent(self.roomId, eventType, content);
}
488493
function send(ev, data, fn) {
            /* jshint validthis: true */
            // ignore newListener event to avoid this error in node 0.8
            // https://github.com/cayasso/primus-emitter/issues/3
            if (/^(newListener|removeListener)/.test(ev)) return this;
            this.emitter.send.apply(this.emitter, arguments);
            return this;
          }
1171893
function prepareNativeRequest (self) {

    if (self._emitter) {
        self._doUploadProgress = function (eventType, event) {
            event.lengthComputable = (event.loaded >= 0) && (event.total > 0); 
            self._emitter.emit(eventType, event);
        };
    }

    return self;
}
997072
def send_notification(method, params)
      data = MessagePack.dump([2, method, params]).bytes
      ws.send(data)
    rescue => exc
      warn exc
      abort exc
    end
495870
private void sendPauseStatus(IPlayItem item) {
        Status pause = new Status(StatusCodes.NS_PAUSE_NOTIFY);
        pause.setClientid(streamId);
        pause.setDetails(item.getName());

        doPushMessage(pause);
    }
78919
def _send_api_message(self, message):
        

        self.slack.chat.post_message(**message)
        self.log.debug("sent api message %r", message)
963225
def notify(title, message, key, event=None, retcode=None):
    

    data = {
        'title': title if len(title) <= 20 else title[:19] + u'\u2026',
        'msg': message,
        'key': key
    }

    if event:
        data['event'] = event

    headers = {'User-Agent': USER_AGENT}

    endpoint = "https://api.simplepush.io"

    resp = requests.post(endpoint + '/send', data=data, headers=headers)

    resp.raise_for_status()
1112245
def sendVY(self, vy):
        '''
        

        '''
        self.lock.acquire()
        self.data.vy = vy
        self.lock.release()
516560
function sendResponse(success) {
        success = success || false;
        response.status(200);
        response.contentType('application/json');
        response.send(JSON.stringify({success: success}));
      }
380958
function send() {
		// Check form for errors
		if(!$("#transaction").val()) return alert('Missing parameter !');

		// Send
		nem.com.requests.transaction.announce(endpoint, $("#transaction").val()).then(function(res) {
			// If code >= 2, it's an error
			if (res.code >= 2) {
				alert(res.message);
			} else {
				alert(res.message);
			}
		}, function(err) {
			alert(err);
		})
	}