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
+73-2Lines changed: 73 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,7 +129,7 @@ $client = new ManagementApiClient($storyblokPersonalAccessToken);
129
129
130
130
The Storyblok **Management API Client** provides two main approaches for interacting with the API:
131
131
132
-
- Using specific API classes (like `StoryApi` or `SpaceApi` or `AssetApi` or `TagApi` or `UserApi`)
132
+
- Using specific API classes (like `StoryApi` or `SpaceApi` or `AssetApi` or `AssetFolderApi` or `TagApi` or `UserApi`)
133
133
- Using specific API classes for handling bulk data (like `StoryBulkApi`)
134
134
- Using the `ManagementApi` class
135
135
@@ -139,11 +139,12 @@ Alternatively, you can leverage dedicated classes like `SpaceApi`, which are tai
139
139
140
140
If a dedicated API class like `SpaceApi` or `StoryApi` does not exist for your desired endpoint, you can always fall back to the more versatile `ManagementApi` class.
141
141
142
-
In addition to the general-purpose `ManagementApi` class, the Storyblok Management PHP client also provides specific classes such as `SpaceApi`, `StoryApi`, `TagApi`and `AssetApi`. These classes function similarly to the `ManagementApi` but are tailored for specific scenarios, offering additional methods or data types to work with particular resources.
142
+
In addition to the general-purpose `ManagementApi` class, the Storyblok Management PHP client also provides specific classes such as `SpaceApi`, `StoryApi`, `TagApi`, `AssetApi`and `AssetFolderApi`. These classes function similarly to the `ManagementApi` but are tailored for specific scenarios, offering additional methods or data types to work with particular resources.
143
143
144
144
-`SpaceApi` focuses on managing space-level operations, such as retrieving space information, performing backup etc.
145
145
-`StoryApi` specializes in handling stories and their content, including creating, updating, retrieving, and deleting stories. This class also provides methods that deal with the structure and fields specific to stories.
146
146
-`AssetApi` designed to manage assets like images, files, and other media. It provides methods to upload, retrieve, and manage assets, offering features specific to media management.
147
+
-`AssetFolderApi` designed to manage asset folders, including creating, retrieving, updating, and deleting folders for organizing assets.
147
148
-`TagApi` designed to manage tags.
148
149
-`UserApi` designed to handle the current user. "Current" means the user related to the access token used for instancing the `ManagementApiClient` object.
149
150
@@ -1035,6 +1036,76 @@ try {
1035
1036
}
1036
1037
```
1037
1038
1039
+
## Handling asset folders
1040
+
1041
+
For using the `AssetFolderApi` class you have to import:
1042
+
1043
+
```php
1044
+
use Storyblok\ManagementApi\Endpoints\AssetFolderApi;
1045
+
```
1046
+
1047
+
For using the `AssetFolder` class you have to import:
1048
+
1049
+
```php
1050
+
use Storyblok\ManagementApi\Data\AssetFolder;
1051
+
```
1052
+
1053
+
### Getting the AssetFolderApi instance
1054
+
1055
+
```php
1056
+
$assetFolderApi = new AssetFolderApi($client, $spaceId);
0 commit comments