musora-content-services 2.0.5 → 2.0.7
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.0.7](https://github.com/railroadmedia/musora-content-services/compare/v2.0.6...v2.0.7) (2025-03-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **playlists:** config import ([#198](https://github.com/railroadmedia/musora-content-services/issues/198)) ([4965de4](https://github.com/railroadmedia/musora-content-services/commit/4965de4fc2d1cda8de022ff46a3e09caac9d351f))
|
|
11
|
+
|
|
12
|
+
### [2.0.6](https://github.com/railroadmedia/musora-content-services/compare/v2.0.5...v2.0.6) (2025-03-21)
|
|
13
|
+
|
|
5
14
|
### [2.0.5](https://github.com/railroadmedia/musora-content-services/compare/v2.0.4...v2.0.5) (2025-03-21)
|
|
6
15
|
|
|
7
16
|
### [2.0.4](https://github.com/railroadmedia/musora-content-services/compare/v2.0.3...v2.0.4) (2025-03-21)
|
package/package.json
CHANGED
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module Playlists
|
|
7
7
|
*/
|
|
8
|
-
import { fetchHandler } from '../railcontent'
|
|
9
|
-
import
|
|
10
|
-
import './playlists-types'
|
|
8
|
+
import { fetchHandler } from '../railcontent.js'
|
|
9
|
+
import './playlists-types.js'
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Exported functions that are excluded from index generation.
|
|
@@ -16,7 +15,7 @@ import './playlists-types'
|
|
|
16
15
|
*/
|
|
17
16
|
const excludeFromGeneratedIndex = []
|
|
18
17
|
|
|
19
|
-
const
|
|
18
|
+
const BASE_PATH = `/api/content-org`
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Fetches user playlists for a specific brand.
|
|
@@ -49,7 +48,7 @@ export async function fetchUserPlaylists(
|
|
|
49
48
|
const content = content_id ? `&content_id=${content_id}` : ''
|
|
50
49
|
const categoryString =
|
|
51
50
|
categories && categories.length ? categories.map((cat) => `categories[]=${cat}`).join('&') : ''
|
|
52
|
-
url = `${
|
|
51
|
+
url = `${BASE_PATH}/v1/user/playlists?brand=${brand}${limitString}${pageString}${sortString}${searchFilter}${content}${categoryString ? `&${categoryString}` : ''}`
|
|
53
52
|
return await fetchHandler(url)
|
|
54
53
|
}
|
|
55
54
|
|
|
@@ -79,7 +78,7 @@ export async function fetchUserPlaylists(
|
|
|
79
78
|
* .catch(error => console.error('Error creating playlist:', error));
|
|
80
79
|
*/
|
|
81
80
|
export async function createPlaylist(playlistData) {
|
|
82
|
-
const url = `${
|
|
81
|
+
const url = `${BASE_PATH}/v1/user/playlists`
|
|
83
82
|
return await fetchHandler(url, 'POST', null, playlistData)
|
|
84
83
|
}
|
|
85
84
|
|
|
@@ -117,6 +116,6 @@ export async function createPlaylist(playlistData) {
|
|
|
117
116
|
* });
|
|
118
117
|
*/
|
|
119
118
|
export async function addItemToPlaylist(payload) {
|
|
120
|
-
const url = `${
|
|
119
|
+
const url = `${BASE_PATH}/v1/user/playlists/items`
|
|
121
120
|
return await fetchHandler(url, 'POST', null, payload)
|
|
122
121
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { setLastUpdatedTime, wasLastUpdateOlderThanXSeconds } from '../../lib/lastUpdated.js'
|
|
5
5
|
import { fetchUserPermissionsData } from '../railcontent.js'
|
|
6
|
-
import './types'
|
|
6
|
+
import './types.js'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Exported functions that are excluded from index generation.
|