Skip to content

Commit

Permalink
ULMS-2882 Changed api routes (conference, event)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkonst committed Feb 19, 2024
1 parent 6ab2c0d commit 71b4152
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 31 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulms/api-clients",
"version": "6.12.0",
"version": "6.12.0-dev.0-ulms-2882",
"description": "JavaScript API clients for ULMS platform",
"keywords": [],
"homepage": "https://github.com/foxford/ulms-api-clients-js#readme",
Expand Down
42 changes: 28 additions & 14 deletions src/http-conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
readRoom(roomId) {
return this.get(this.url(`/rooms/${roomId}`))
return this.get(this.url(`/conference_rooms/${roomId}`))
}

/**
Expand All @@ -111,7 +111,7 @@ class HTTPConference extends BasicClient {
time,
}

return this.patch(this.url(`/rooms/${roomId}`), payload)
return this.patch(this.url(`/conference_rooms/${roomId}`), payload)
}

/**
Expand All @@ -120,7 +120,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
closeRoom(roomId) {
return this.post(this.url(`/rooms/${roomId}/close`))
return this.post(this.url(`/conference_rooms/${roomId}/close`))
}

/**
Expand All @@ -129,7 +129,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
enterRoom(roomId) {
return this.post(this.url(`/rooms/${roomId}/enter`))
return this.post(this.url(`/conference_rooms/${roomId}/enter`))
}

/**
Expand All @@ -139,7 +139,9 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
listAgent(roomId, filterParameters = {}) {
return this.get(this.url(`/rooms/${roomId}/agents`, filterParameters))
return this.get(
this.url(`/conference_rooms/${roomId}/agents`, filterParameters)
)
}

/**
Expand All @@ -148,7 +150,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
createRtc(roomId) {
return this.post(this.url(`/rooms/${roomId}/rtcs`))
return this.post(this.url(`/conference_rooms/${roomId}/rtcs`))
}

/**
Expand All @@ -167,7 +169,9 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
listRtc(roomId, filterParameters = {}) {
return this.get(this.url(`/rooms/${roomId}/rtcs`, filterParameters))
return this.get(
this.url(`/conference_rooms/${roomId}/rtcs`, filterParameters)
)
}

/**
Expand All @@ -193,7 +197,9 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
listRtcStream(roomId, filterParameters = {}) {
return this.get(this.url(`/rooms/${roomId}/streams`, filterParameters))
return this.get(
this.url(`/conference_rooms/${roomId}/streams`, filterParameters)
)
}

/**
Expand Down Expand Up @@ -257,7 +263,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
readAgentReaderConfig(roomId) {
return this.get(this.url(`/rooms/${roomId}/configs/reader`))
return this.get(this.url(`/conference_rooms/${roomId}/configs/reader`))
}

/**
Expand All @@ -266,7 +272,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
readAgentWriterConfig(roomId) {
return this.get(this.url(`/rooms/${roomId}/configs/writer`))
return this.get(this.url(`/conference_rooms/${roomId}/configs/writer`))
}

/**
Expand All @@ -276,7 +282,9 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
readGroups(roomId, filterParameters) {
return this.get(this.url(`/rooms/${roomId}/groups`, filterParameters))
return this.get(
this.url(`/conference_rooms/${roomId}/groups`, filterParameters)
)
}

/**
Expand All @@ -288,7 +296,10 @@ class HTTPConference extends BasicClient {
updateAgentReaderConfig(roomId, configs) {
const payload = { configs }

return this.post(this.url(`/rooms/${roomId}/configs/reader`), payload)
return this.post(
this.url(`/conference_rooms/${roomId}/configs/reader`),
payload
)
}

/**
Expand All @@ -300,7 +311,10 @@ class HTTPConference extends BasicClient {
updateAgentWriterConfig(roomId, configs) {
const payload = { configs }

return this.post(this.url(`/rooms/${roomId}/configs/writer`), payload)
return this.post(
this.url(`/conference_rooms/${roomId}/configs/writer`),
payload
)
}

/**
Expand All @@ -310,7 +324,7 @@ class HTTPConference extends BasicClient {
* @returns {Promise}
*/
updateGroups(roomId, payload) {
return this.post(this.url(`/rooms/${roomId}/groups`), payload)
return this.post(this.url(`/conference_rooms/${roomId}/groups`), payload)
}
}

Expand Down
28 changes: 14 additions & 14 deletions src/http-event.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import BasicClient from './basic-client'

const eventEndpoints = {
agentsList: (id) => `/rooms/${id}/agents`,
agentsUpdate: (id) => `/rooms/${id}/agents`,
banList: (id) => `/rooms/${id}/bans`,
agentsList: (id) => `/event_rooms/${id}/agents`,
agentsUpdate: (id) => `/event_rooms/${id}/agents`,
banList: (id) => `/event_rooms/${id}/bans`,
changesCreate: (id) => `/editions/${id}/changes`,
changesDelete: (id) => `/changes/${id}`,
changesList: (id) => `/editions/${id}/changes`,
editionsCommit: (id) => `/editions/${id}/commit`,
editionsCreate: (id) => `/rooms/${id}/editions`,
editionsCreate: (id) => `/event_rooms/${id}/editions`,
editionsDelete: (id) => `/editions/${id}`,
editionsList: (id) => `/rooms/${id}/editions`,
eventsCreate: (id) => `/rooms/${id}/events`,
eventsRemove: (id) => `/rooms/${id}/events`,
eventsList: (id) => `/rooms/${id}/events`,
roomEnter: (id) => `/rooms/${id}/enter`,
roomRead: (id) => `/rooms/${id}`,
roomState: (id) => `/rooms/${id}/state`,
roomUpdate: (id) => `/rooms/${id}`,
roomUpdateLockedTypes: (id) => `/rooms/${id}/locked_types`,
roomUpdateWhiteboardAccess: (id) => `/rooms/${id}/whiteboard_access`,
editionsList: (id) => `/event_rooms/${id}/editions`,
eventsCreate: (id) => `/event_rooms/${id}/events`,
eventsRemove: (id) => `/event_rooms/${id}/events`,
eventsList: (id) => `/event_rooms/${id}/events`,
roomEnter: (id) => `/event_rooms/${id}/enter`,
roomRead: (id) => `/event_rooms/${id}`,
roomState: (id) => `/event_rooms/${id}/state`,
roomUpdate: (id) => `/event_rooms/${id}`,
roomUpdateLockedTypes: (id) => `/event_rooms/${id}/locked_types`,
roomUpdateWhiteboardAccess: (id) => `/event_rooms/${id}/whiteboard_access`,
}

class HTTPEvent extends BasicClient {
Expand Down

0 comments on commit 71b4152

Please sign in to comment.