https://api.slack.com/methods/groups.invite
486337
def invite(self, group_name, user):
        
        group_id = self.get_group_id(group_name)
        self.params.update({
            'channel': group_id,
            'user':    user,
            })
        return FromUrl('https://slack.com/api/groups.invite', self._requests)(data=self.params)
976305
function(callback) {
        request.get(
            this.getResourceUrl({ path: '/groups', user: null }),
            function onResourceGroupsResponse(err, res, body) {
                callback(
                    err,
                    body && body.groups,
                    body && body.search,
                    res
                );
            }
        );
        return this;
    }
1082735
public JSONObject invite(String jobKey, HashMap<String, String> params) throws JSONException {
        return oClient.post("/hr/v1/jobs/" + jobKey + "/candidates", params);
    }
574617
def grant(perm, group_list = [])
      validate_usergroup_list(group_list)
      api.post(['grant', perm].uri_concat, group_list, 'application/json')
    end
26837
async def call(self, method, **params):
        
        url = self.SLACK_RPC_PREFIX + method
        data = FormData()
        data.add_fields(MultiDict(token=self.bot_token, charset='utf-8', **params))
        response_body = await self.request(
            method='POST',
            url=url,
            data=data
        )
        if 'warning' in response_body:
            logger.warning(f'Warnings received from API call {method}: {response_body["warning"]}')
        if 'ok' not in response_body:
            logger.error(f'No ok marker in slack API call {method} {params} => {response_body}')
            raise SlackCallException('There is no ok marker, ... strange', method=method)
        if not response_body['ok']:
            logger.error(f'Slack API call failed {method} {params} => {response_body}')
            raise SlackCallException(f'No OK response returned', method=method)
        return response_body
1106341
def invite(invite)
      code = resolve_invite_code(invite)
      Invite.new(JSON.parse(API::Invite.resolve(token, code)), self)
    end
932437
def group_memberships_assignable(self, group_id, **kwargs):
        ""
        api_path = "/api/v2/groups/{group_id}/memberships/assignable.json"
        api_path = api_path.format(group_id=group_id)
        return self.call(api_path, **kwargs)
580049
def history(self, group_name, **kwargs):
        
        group_id = self.get_group_id(group_name)
        self.params.update({
            'channel': group_id,
            })
        if kwargs:
            self.params.update(kwargs)
        return FromUrl('https://slack.com/api/groups.history', self._requests)(data=self.params).get()
552012
@Override
    public SendInvitation invitees(ApiBaseUser... users) {
        this.invitees.addAll(Arrays.asList(users));
        return this;
    }
116292
def delete_invite(code)
      invite = resolve_invite_code(code)
      API::Invite.delete(token, invite)
    end
541048
def receive_invite(opts = {})
      recv(opts.merge(request: 'INVITE', rrs: true)) do |recv|
        action = doc.create_element('action') do |action|
          action << doc.create_element('ereg') do |ereg|
            ereg['regexp'] = '<sip:(.*)>.*;tag=([^;]*)'
            ereg['search_in'] = 'hdr'
            ereg['header'] = 'From:'
            ereg['assign_to'] = 'dummy,remote_addr,remote_tag'
          end
          action << doc.create_element('ereg') do |ereg|
            ereg['regexp'] = '<sip:(.*)>'
            ereg['search_in'] = 'hdr'
            ereg['header'] = 'To:'
            ereg['assign_to'] = 'dummy,local_addr'
          end
          action << doc.create_element('assignstr') do |assignstr|
            assignstr['assign_to'] = "call_addr"
            assignstr['value']     = "[$local_addr]"
          end
        end
        recv << action
      end
      # These variables (except dummy) will only be used if we initiate a hangup
      @reference_variables += %w(dummy remote_addr remote_tag local_addr call_addr)
    end
1280421
def groups_setPurpose(self, *, channel: str, purpose: str, **kwargs) -> SlackResponse:
        
        kwargs.update({"channel": channel, "purpose": purpose})
        return self.api_call("groups.setPurpose", json=kwargs)
279856
def set_purpose(self, group_name, purpose):
        
        group_id = self.get_group_id(group_name)
        self.params.update({
            'channel': group_id,
            'purpose': purpose,
            })
        return FromUrl('https://slack.com/api/groups.setPurpose', self._requests)(data=self.params).post()
247849
def send_slack_message(channel, text):
    """"""
    http = httplib2.Http()
    return http.request(SLACK_MESSAGE_URL, 'POST', body=json.dumps({
        'channel': channel,
        'text': text,
    }))
1028471
def invites
      invites = JSON.parse(API::Server.invites(@bot.token, @id))
      invites.map { |invite| Invite.new(invite, @bot) }
    end
256293
def groups_createChild(self, *, channel: str, **kwargs) -> SlackResponse:
        
        self._validate_xoxp_token()
        kwargs.update({"channel": channel})
        return self.api_call("groups.createChild", http_verb="GET", params=kwargs)
1048683
function slackAPI(args, err_cb) {
    err_cb = err_cb || function () {};
    var self = this;
    var authtoken = args.token;

    this.slackData = {};
    this.token = '';
    this.logging = true;
    this.autoReconnect = true;
    this.i = 0;

    if (typeof args !== 'object') {
        this.logging = true;

        this.out('error', errors.object_arg_required);
        throw new Error(errors.object_arg_required);
    }

    if (typeof args.logging !== 'boolean') {
        this.logging = true;
        this.out('error', errors.boolean_arg_required);
    } else {
        this.logging = args.logging;
    }

    if (!authtoken || typeof authtoken !== 'string' || !authtoken.match(/^([a-z]*)\-([0-9]*)\-([0-9a-zA-Z]*)/)) {
        this.logging = true;

        this.out('error', errors.invalid_token);
        throw new Error(errors.invalid_token);
    }

    if (typeof args.autoReconnect !== 'boolean') {
        this.autoReconnect = false;
    } else {
        this.autoReconnect = args.autoReconnect;
    }

    this.token = authtoken;

    self.reqAPI('rtm.start', {}, function (data) {
        if (!data.ok) return err_cb(data.error);

        self.slackData.self = data.self;
        self.slackData.team = data.team;
        self.slackData.channels = data.channels;
        self.slackData.groups = data.groups;
        self.slackData.users = data.users;
        self.slackData.ims = data.ims;

        self.connectSlack(data.url, function (err, data) {
            if (!err) {
                self.emit(events[data.type], data);
            } else {
                self.emit('error', data);
            }
        });
    });

    eventEmitter.call(this);
}