You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,12 @@ use Storyblok\ManagementApi\ManagementApiClient;
43
43
$client = new ManagementApiClient($storyblokPersonalAccessToken);
44
44
```
45
45
46
+
For using the `ManagementApiClient` class you have to import:
47
+
48
+
```php
49
+
use Storyblok\ManagementApi\ManagementApiClient;
50
+
```
51
+
46
52
### Setting the space region
47
53
48
54
The second optional parameter is for setting the region.
@@ -114,6 +120,18 @@ Let's start analyzing the specialized classes, like for example the `SpaceApi`.
114
120
115
121
## Handling Spaces
116
122
123
+
For using the `SpaceApi` class you have to import:
124
+
125
+
```php
126
+
use Storyblok\ManagementApi\Endpoints\SpaceApi;
127
+
```
128
+
129
+
For using the `Space` class you have to import:
130
+
131
+
```php
132
+
use Storyblok\ManagementApi\Data\Space;
133
+
```
134
+
117
135
### Retrieve all the spaces
118
136
119
137
Fetch a list of all spaces associated with your account in the current region (the region is initialized in the `ManagementApiClient`):
@@ -190,6 +208,18 @@ try {
190
208
191
209
## Handling Stories
192
210
211
+
For using the `StoryApi` class you have to import:
212
+
213
+
```php
214
+
use Storyblok\ManagementApi\Endpoints\StoryApi;
215
+
```
216
+
217
+
For using the `Story` class you have to import:
218
+
219
+
```php
220
+
use Storyblok\ManagementApi\Data\Story;
221
+
```
222
+
193
223
### Getting the StoryApi instance
194
224
195
225
To handle Stories, get stories, get a single story, create a story, update a story, or delete a story, you can start getting the instance of StoryApi that allows you to access the methods for handling stories.
To get the current user, owner of the Personal access token used you can use the `UserApi` class for calling endpoints and the `User` for accessing to returned data object properties.
@@ -426,6 +469,18 @@ Typically, all the data object provides you some helper methods like:
426
469
427
470
## Handling assets
428
471
472
+
For using the `AssetApi` class you have to import:
473
+
474
+
```php
475
+
use Storyblok\ManagementApi\Endpoints\AssetApi;
476
+
```
477
+
478
+
For using the `Asset` class you have to import:
479
+
480
+
```php
481
+
use Storyblok\ManagementApi\Data\Asset;
482
+
```
483
+
429
484
### Getting the AssetApi instance
430
485
431
486
To handle assets, get assets, get a single asset, upload an asset, update an asset, or delete an asset, you can start getting the instance of AssetApi that allows you to access the methods for handling assets.
To handle tags, get tags,create an asset, update an asset, or delete an asset, you can start getting the instance of `TagApi` that allows you to access the methods for handling tags.
@@ -683,6 +750,18 @@ echo PHP_EOL;
683
750
684
751
If you need to handle workflows (retrieving workflows or create new custom workflow - in the case you have a proper plan - ) you can use the `WorkflowApi` class.
685
752
753
+
For using the `WorkflowApi` class you have to import:
754
+
755
+
```php
756
+
use Storyblok\ManagementApi\Endpoints\WorkflowApi;
757
+
```
758
+
759
+
For using the `Workflow` class you have to import:
0 commit comments