@saooti/octopus-sdk 41.11.0-beta1 → 41.11.0-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api/mediathequeApi.ts +20 -2
package/package.json
CHANGED
|
@@ -2,6 +2,21 @@ import { PlaylistMedia } from "../stores/class/radio/playlistMedia";
|
|
|
2
2
|
import { Mix } from "../stores/class/radio/mix";
|
|
3
3
|
import { ModuleApi } from "./apiConnection";
|
|
4
4
|
import classicApi from "./classicApi";
|
|
5
|
+
import { Cartouchier } from "@/stores/class/cartouchier/cartouchier";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve all cartouchier from the given organisation
|
|
9
|
+
* @param organisationId The ID of the organisation
|
|
10
|
+
* @param options Filtering options
|
|
11
|
+
* @returns List of cartouchier belonging to the organisation
|
|
12
|
+
*/
|
|
13
|
+
async function getAllCartouchiers(organisationId: string, options?: { ownerId?: string }): Promise<Array<Cartouchier>> {
|
|
14
|
+
return classicApi.fetchData<Array<Cartouchier>>({
|
|
15
|
+
api: ModuleApi.MEDIA,
|
|
16
|
+
path: `cartouchier/list/${organisationId}`,
|
|
17
|
+
parameters: options
|
|
18
|
+
});
|
|
19
|
+
}
|
|
5
20
|
|
|
6
21
|
/**
|
|
7
22
|
* Retrieve all mix from the given organisation
|
|
@@ -29,12 +44,14 @@ async function deleteMix(mixId: number): Promise<void> {
|
|
|
29
44
|
/**
|
|
30
45
|
* Retrieve all playlist from the given organisation
|
|
31
46
|
* @param organisationId The ID of the organisation
|
|
47
|
+
* @param options Filtering options
|
|
32
48
|
* @returns List of playlist belonging to the organisation
|
|
33
49
|
*/
|
|
34
|
-
async function getAllPlaylists(organisationId: string): Promise<Array<PlaylistMedia>> {
|
|
50
|
+
async function getAllPlaylists(organisationId: string, options?: { ownerId?: string }): Promise<Array<PlaylistMedia>> {
|
|
35
51
|
return classicApi.fetchData<Array<PlaylistMedia>>({
|
|
36
52
|
api: ModuleApi.MEDIA,
|
|
37
|
-
path: `playlist/${organisationId}
|
|
53
|
+
path: `playlist/${organisationId}`,
|
|
54
|
+
parameters: options
|
|
38
55
|
});
|
|
39
56
|
}
|
|
40
57
|
|
|
@@ -50,6 +67,7 @@ async function deletePlaylist(playlistId: number): Promise<void> {
|
|
|
50
67
|
}
|
|
51
68
|
|
|
52
69
|
export const mediathequeApi = {
|
|
70
|
+
getAllCartouchiers,
|
|
53
71
|
getAllMix,
|
|
54
72
|
deleteMix,
|
|
55
73
|
getAllPlaylists,
|