@pbvision/partner-sdk 0.1.9 → 0.1.10

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pbvision/partner-sdk",
3
3
  "description": "SDK for interacting with the PB Vision pickleball AI engine.",
4
- "version": "0.1.9",
4
+ "version": "0.1.10",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "engines": {
package/src/index.js CHANGED
@@ -62,13 +62,13 @@ export class PBVision {
62
62
  * @param {VideoMetadata} [metadata]
63
63
  * @returns {VideoUrlToDownloadResponse}
64
64
  */
65
- async sendVideoUrlToDownload (videoUrl, { userEmails = [], name, desc, gameStartEpoch, facility, court } = {}) {
65
+ async sendVideoUrlToDownload (videoUrl, { userEmails = [], name, desc, gameStartEpoch, facility, court, fid } = {}) {
66
66
  assert(typeof videoUrl === 'string' && videoUrl.startsWith('http'),
67
67
  'URL must be a string beginning with http')
68
68
  assert(videoUrl.split('?')[0].endsWith('.mp4'), 'video URL must have the .mp4 extension')
69
69
  const resp = await this.__callAPI(
70
70
  'add_video_by_url',
71
- { url: videoUrl, userEmails, name, desc, gameStartEpoch, facility, court })
71
+ { url: videoUrl, userEmails, name, desc, gameStartEpoch, facility, court, fid })
72
72
  return JSON.parse(resp)
73
73
  }
74
74
 
@@ -102,6 +102,7 @@ export class PBVision {
102
102
  * @property {integer} [gameStartEpoch] the epoch at which the game started
103
103
  * @property {string} [facility] the facility where the game was recorded (e.g., "Cool Club #3 - Barcelona")
104
104
  * @property {string} [court] the court where the game was recorded (e.g., "11A")
105
+ * @property {integer} [fid] the ID of the folder in which this video should be added
105
106
  */
106
107
 
107
108
  /**
@@ -114,10 +115,10 @@ export class PBVision {
114
115
  * @param {VideoMetadata} [metadata]
115
116
  * @returns {VideoUrlToDownloadResponse}
116
117
  */
117
- async uploadVideo (mp4Filename, { userEmails = [], name, desc, gameStartEpoch, facility, court } = {}) {
118
+ async uploadVideo (mp4Filename, { userEmails = [], name, desc, gameStartEpoch, facility, court, fid } = {}) {
118
119
  const pieces = mp4Filename.split('.')
119
120
  const ext = pieces[pieces.length - 1]
120
- const makeVIDResp = await this.__callAPI('make_video_id', { userEmails, name, desc, gameStartEpoch, facility, court, fileExt: ext })
121
+ const makeVIDResp = await this.__callAPI('make_video_id', { userEmails, name, desc, gameStartEpoch, facility, court, fid, fileExt: ext })
121
122
  const { hasCredits, vid } = JSON.parse(makeVIDResp)
122
123
  if (hasCredits === false) {
123
124
  return { hasCredits }