swe / space-sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
A PHP package to interact with JetBrains Space (autogenerated).
v19.0.1
2024-05-28 05:55 UTC
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^7
Requires (Dev)
- phpunit/phpunit: ^9
- vlucas/phpdotenv: ^5
- v19.0.1
- v19.0.0
- v18.0.0
- v17.0.0
- v16.0.0
- v15.0.0
- v14.0.0
- v13.0.0
- v12.0.0
- v11.0.0
- v10.0.0
- v9.0.0
- v8.0.0
- v7.0.0
- v6.2.0
- v6.1.0
- v6.0.0
- v5.0.0
- v4.0.0
- v3.5.0
- v3.4.0
- v3.3.0
- v3.2.0
- v3.1.0
- v3.0.1
- v3.0.0
- v2.x-dev
- v2.2.0
- v2.1.7
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.x-dev
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- v0.x-dev
- v0.0.8
- v0.0.7
- v0.0.6
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-main
This package is auto-updated.
Last update: 2024-05-28 05:57:09 UTC
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.