We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://developer\.blackbaud\.com/skyapi/docs/in\-depth\-topics/api\-request\-throttling
sky-api/packages/oauth2/src/SkyAPIEndpoint.php
Line 42 in caea23f
<?php namespace GrotonSchool\OAuth2\Client\Provider; use Battis\DataUtilities\Path; use Exception; use GuzzleHttp\Client; use League\OAuth2\Client\Token\AccessToken; /** @deprecated 0.2.3 externalized to {@link https://github.com/groton-school/appengine-sky-api groton-school/appengine-sky-api} */ class SkyAPIEndpoint { /** @var Client */ private $client; /** @var BlackbaudSKY */ private $sky; /** @var string */ private $path; /** @var AccessToken */ private $accessToken; public function __construct( BlackbaudSky $sky, string $path, AccessToken $accessToken ) { assert(!empty($sky), new Exception("BlackbaudSKY instance required")); $this->sky = $sky; $this->path = $path; $this->accessToken = $accessToken; $this->client = new Client([ "base_uri" => Path::join($this->sky->getBaseApiUrl(), $this->path) . "/", ]); } public function send(string $method, string $url, array $options = []): mixed { /* * TODO deal with refreshing tokens (need callback to store new refresh token) * https://developer.blackbaud.com/skyapi/docs/in-depth-topics/api-request-throttling */ usleep(100000); $request = $this->sky->getAuthenticatedRequest( $method, $url, $this->accessToken, $options ); return json_decode( $this->client ->send($request) ->getBody() ->getContents(), true ); } public function get(string $url, array $options = []): mixed { return $this->send("get", $url, $options); } public function post(string $url, array $options = []): mixed { return $this->send("post", $url, $options); } public function patch(string $url, array $options = []): mixed { return $this->send("patch", $url, $options); } public function delete(string $url, array $options = []): mixed { return $this->send("delete", $url, $options); } public function endpoint(string $path): SkyAPIEndpoint { return new SkyAPIEndpoint( $this->sky, Path::join($this->path, $path), $this->accessToken ); } }
The text was updated successfully, but these errors were encountered:
battis
No branches or pull requests
https://developer\.blackbaud\.com/skyapi/docs/in\-depth\-topics/api\-request\-throttling
sky-api/packages/oauth2/src/SkyAPIEndpoint.php
Line 42 in caea23f
The text was updated successfully, but these errors were encountered: