添加黑名单
@param string|array $account
@return BaseResponse
@throws Exception\TIMException
768690
public function blackAdd($account)
    {
        $request = new AddBlackRequest($this->identifier, $account);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
1150510
public function deleteKFAccount($account){
        if (!$this->access_token && !$this->checkAuth()) return false;
        $result = $this->http_get(self::API_BASE_URL_PREFIX.self::CS_KF_ACCOUNT_DEL_URL.'access_token='.$this->access_token.'&kf_account='.$account);
        if ($result)
        {
            $json = json_decode($result,true);
            if (!$json || !empty($json['errcode'])) {
                $this->errCode = $json['errcode'];
                $this->errMsg = $json['errmsg'];
                return false;
            }
            return $json;
        }
        return false;
    }
871816
public function multiAccountImportAsync($accounts, AsyncCallback $callback = null)
    {
        $request = new MultiAccountImportRequest($accounts);
        $response = new MultiAccountImportResponse();
        return $this->client->sendRequestAsync($request, $response, $callback);
    }
1195322
public static function make($account = null, $clientId = null, $clientSecret = null)
    {
        return new static($account, $clientId, $clientSecret);
    }
429326
public function updateAccount(array $account)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_ACCOUNT_UPDATE_PREFIX, $account, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'ok';
    }
400613
public function setAccount(\Coral\CoreBundle\Entity\Account $account)
    {
        $this->account = $account;

        return $this;
    }
786329
public function addAccount(Account $account)
    {
        $this->accounts->add($account);
        $account->addOrganization($this);

        return $this;
    }
1273289
public function refresh($account)
    {
        $identity = $this->identity($account);

        return $this->findByIdentity([$identity => $account->$identity]);
    }
991040
public function getAddressesByAccount($account)
    {
        $args = [
            (string)$account
        ];
        return $this->rpc->query(__FUNCTION__, $args);
    }
1342259
protected function parseAccount($account)
    {
        // Separate the account by it's account and permission list.
        $parts = explode(':', trim($account));

        // We should receive exactly two parts of a permission
        // listing, otherwise we'll return null.
        if (count($parts) === 2) {
            $account = new Account($parts[0]);

            $acl = $this->parseAccessControlList($parts[1]);

            $account->setPermissions($acl);

            return $account;
        }

        return null;
    }
1284224
public function getAccountKey($key, $default = null, $account = null)
    {
        if (!$this->account || ($account && $account !== $this->account)) {
            $this->useAccount($account);
        }

        return Core::instance()->getConfig("accounts.{$this->account}.{$key}", $default);
    }
1321950
public function push($amount = null, $number = null, $reference = null, $command = null, $account = null)
    {
        $account = $account ?: $this->account;
        $configs = (new ConfigurationRepository)->useAccount($account);

        if (!$configs->getAccountKey('sandbox')) {
            throw new ErrorException('Cannot simulate a transaction in the live environment.');
        }

        $shortCode = $configs->getAccountKey('lnmo.shortcode');

        $body = [
            'CommandID'     => $command ?: $this->command,
            'Amount'        => $amount ?: $this->amount,
            'Msisdn'        => $number ?: $this->number,
            'ShortCode'     => $shortCode,
            'BillRefNumber' => $reference ?: $this->reference,
        ];

        try {
            $response = $this->makeRequest(
                $body,
                Core::instance()->getEndpoint(MPESA_SIMULATE, $account),
                $account
            );

            return json_decode($response->getBody());
        } catch (RequestException $exception) {
            return json_decode($exception->getResponse()->getBody());
        }
    }
851408
def add_account(self, account, nickname, password):
        
        password = to_binary(password)
        password = hashlib.md5(password).hexdigest()
        return self._post(
            'https://api.weixin.qq.com/customservice/kfaccount/add',
            data={
                'kf_account': account,
                'nickname': nickname,
                'password': password
            }
        )
664601
public function createChild($account) {
        $id = $this->getId();
        $payload = $account->getPayload();

        $this->setTokenValue($this->getEntityIdName(), $id);

        $response = $this->put($payload);

        $entity = $response->getData();
        $this->setEntity($entity);

        return $this;
    }
219346
public function put($account, $action, $parameters = null, $httpHeadersToSet = array())
    {
        return $this->sendRequest('PUT', $account, $action, $parameters, null, null, $httpHeadersToSet);
    }
321127
public function get($account, $action = '', $parameters = null, $acceptableContentTypes = null)
    {
        if (is_array($account)) {
            $tmp_results = array();
            foreach ($account as $accnt) {
                $result = $this->sendRequest('GET', $accnt, $action, $parameters, null, $acceptableContentTypes);
                if ($result === false) {
                    return false;
                }
                $tmp_results[ $accnt ] = $result;
            }
            
            return $tmp_results;
        }
        
        return $this->sendRequest('GET', $account, $action, $parameters, null, $acceptableContentTypes);
    }
1033524
private function loadAccountsAndUser()
    {
        if (!$this->accounts_and_user_loaded) {
            $email_address = $this->getEmailAddress();
            $password = $this->getPassword();

            if (empty($email_address) || empty($password)) {
                throw new Authentication('Email address and password are required');
            }

            $response = $this->getConnector()->post('https://my.activecollab.com/api/v1/external/login', null, [
                'email' => $this->getEmailAddress(),
                'password' => $this->getPassword(),
            ]);

            if ($response instanceof ResponseInterface) {
                if ($response->isJson()) {
                    $result = $response->getJson();

                    if (empty($result['is_ok'])) {
                        if (empty($result['message'])) {
                            throw new ListAccounts();
                        } else {
                            throw new ListAccounts($result['message']);
                        }
                    } elseif (empty($result['user']) || empty($result['user']['intent'])) {
                        throw new ListAccounts('Invalid response');
                    } else {
                        $this->accounts = $this->all_accounts = [];

                        if (!empty($result['accounts']) && is_array($result['accounts'])) {
                            foreach ($result['accounts'] as $account) {
                                $this->all_accounts[] = $account;

                                if ($account['class'] == 'FeatherApplicationInstance' || $account['class'] == 'ActiveCollab\Shepherd\Model\Account\ActiveCollab\FeatherAccount') {
                                    $account_id = (integer) $account['name'];

                                    $this->accounts[$account_id] = [
                                        'id' => (integer) $account['name'],
                                        'name' => $account['display_name'],
                                        'url' => $account['url'],
                                    ];
                                }
                            }
                        }

                        $this->intent = $result['user']['intent'];
                        unset($result['user']['intent']);
                        $this->user = $result['user'];
                    }
                } else {
                    throw new Authentication(
                        sprintf(
                            'Invalid response. JSON expected, got "%s", status code "%s"',
                            $response->getContentType(),
                            $response->getHttpCode()
                        )
                    );
                }
            } else {
                throw new Authentication('Invalid response');
            }
        }
    }