swe/space-sdk
最新稳定版本:v19.0.1
Composer 安装命令:
composer require swe/space-sdk
包简介
A PHP package to interact with JetBrains Space (autogenerated).
README 文档
README
Simplify your PHP connection to JetBrains Space with this package. It represents the whole Space HTTP API and is always up-to-date (checks every day at 3am GMT for updates).
Installation
Install this package with composer require swe/space-sdk and you're done. Don't forget to create an application in
your Space Organisation for the client credentials flow
and grand permissions. The (most) permissions for each request are included in the comments, like so:
final class Blog extends AbstractApi { /** * Permissions that may be checked: Article.View * * @param array $request * @param array $response * @return array * @throws GuzzleException */ final public function getAllBlogPosts(array $request = [], array $response = []): array { $uri = 'blog'; return $this->client->get($this->buildUrl($uri), $request, $response); } }
Examples:
use Swe\SpaceSDK\HttpClient; use Swe\SpaceSDK\Space; $clientId = 'Your Client ID Here'; $clientSecret = 'Your Client Secret Here'; $url = 'Your Space URL'; $space = new Space(new HttpClient($url, $clientId, $clientSecret)); // Let's create a project. $projectInformation = $space->projects()->createProject([ 'key' => [ 'key' => 'MY_PROJECT', ], 'name' => 'My Project', ]); // Create a new channel if not exist. if ($space->chats()->channels()->isNameFree(['name' => 'General'])) { $channel = $space->chats()->channels()->addNewChannel([ 'name' => 'General', 'description' => 'No specific topic..', 'private' => false, ]); }
Information
All package classes are generated automatically. Please submit your issues on GitHub.
统计信息
- 总下载量: 1.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-21