| @@ 88-97 (lines=10) @@ | ||
| 85 | * |
|
| 86 | * @return \EasyWeChat\Support\Collection |
|
| 87 | */ |
|
| 88 | public function getAuthorizerToken($appId, $refreshToken) |
|
| 89 | { |
|
| 90 | $params = [ |
|
| 91 | 'component_appid' => $this->getAppId(), |
|
| 92 | 'authorizer_appid' => $appId, |
|
| 93 | 'authorizer_refresh_token' => $refreshToken, |
|
| 94 | ]; |
|
| 95 | ||
| 96 | return $this->parseJSON('json', [self::GET_AUTHORIZER_TOKEN, $params]); |
|
| 97 | } |
|
| 98 | ||
| 99 | /** |
|
| 100 | * Get authorizer info. |
|
| @@ 124-133 (lines=10) @@ | ||
| 121 | * |
|
| 122 | * @return \EasyWeChat\Support\Collection |
|
| 123 | */ |
|
| 124 | public function getAuthorizerOption($authorizerAppId, $optionName) |
|
| 125 | { |
|
| 126 | $params = [ |
|
| 127 | 'component_appid' => $this->getAppId(), |
|
| 128 | 'authorizer_appid' => $authorizerAppId, |
|
| 129 | 'option_name' => $optionName, |
|
| 130 | ]; |
|
| 131 | ||
| 132 | return $this->parseJSON('json', [self::GET_AUTHORIZER_OPTION, $params]); |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * Set authorizer option. |
|
| @@ 144-154 (lines=11) @@ | ||
| 141 | * |
|
| 142 | * @return \EasyWeChat\Support\Collection |
|
| 143 | */ |
|
| 144 | public function setAuthorizerOption($authorizerAppId, $optionName, $optionValue) |
|
| 145 | { |
|
| 146 | $params = [ |
|
| 147 | 'component_appid' => $this->getAppId(), |
|
| 148 | 'authorizer_appid' => $authorizerAppId, |
|
| 149 | 'option_name' => $optionName, |
|
| 150 | 'option_value' => $optionValue, |
|
| 151 | ]; |
|
| 152 | ||
| 153 | return $this->parseJSON('json', [self::SET_AUTHORIZER_OPTION, $params]); |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * Get authorizer list. |
|
| @@ 164-173 (lines=10) @@ | ||
| 161 | * |
|
| 162 | * @return \EasyWeChat\Support\Collection |
|
| 163 | */ |
|
| 164 | public function getAuthorizerList($offset = 0, $count = 500) |
|
| 165 | { |
|
| 166 | $params = [ |
|
| 167 | 'component_appid' => $this->getAppId(), |
|
| 168 | 'offset' => $offset, |
|
| 169 | 'count' => $count, |
|
| 170 | ]; |
|
| 171 | ||
| 172 | return $this->parseJSON('json', [self::GET_AUTHORIZER_LIST, $params]); |
|
| 173 | } |
|
| 174 | } |
|
| 175 | ||