@dpgradio/creative 5.4.0 → 5.5.0
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/examples/useApi.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import api from '../src/api/api.js'
|
|
2
2
|
import configuration from '../src/config/config.js'
|
|
3
3
|
|
|
4
|
-
const appId = 'greety'
|
|
5
4
|
const stationId = 'qmusic_be'
|
|
6
5
|
|
|
7
|
-
await configuration.
|
|
6
|
+
await configuration.retrieveConfigForStation(stationId)
|
|
8
7
|
|
|
9
8
|
const channels = await api.channels.all()
|
|
10
9
|
|
package/package.json
CHANGED
|
@@ -4,4 +4,8 @@ export default class Requests extends Endpoint {
|
|
|
4
4
|
async requestTrack(eventSlug, request) {
|
|
5
5
|
return await this.api.request().post(`/requests/${eventSlug}`, request)
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
async requestsForTrack(eventSlug, selectorCode) {
|
|
9
|
+
return await this.requestData((r) => r.get(`/requests/${eventSlug}/track/${selectorCode}`), 'requests')
|
|
10
|
+
}
|
|
7
11
|
}
|