Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
})]
});
const ActivitiesResponse = struct.pick({
items: [struct.pick({
contentDetails: struct.pick({
upload: struct.pick({
videoId: 'string'
})
}),
})],
nextPageToken: 'string?'
});
const VideosResponse = struct.pick({
items: [struct.pick({
id: 'string',
snippet: struct.pick({
publishedAt: 'string', // 2007-03-05T08:22:25.000Z
channelId: 'string',
title: 'string',
// description: 'string',
thumbnails: struct.record(['string', struct.pick({
url: 'string',
width: 'number',
height: 'number',
})]),
channelTitle: 'string',
// tags: ['string'],
// categoryId: 'string', // 10
// liveBroadcastContent: 'string', // none
id: struct.pick({
channelId: 'string'
})
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string',
channelTitle: 'string'
})
})]
});
const ActivitiesResponse = struct.pick({
items: [struct.pick({
contentDetails: struct.pick({
upload: struct.pick({
videoId: 'string'
})
}),
})],
nextPageToken: 'string?'
});
const VideosResponse = struct.pick({
items: [struct.pick({
id: 'string',
snippet: struct.pick({
publishedAt: 'string', // 2007-03-05T08:22:25.000Z
channelId: 'string',
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string',
channelTitle: 'string'
})
})]
});
const ActivitiesResponse = struct.pick({
items: [struct.pick({
contentDetails: struct.pick({
upload: struct.pick({
videoId: 'string'
})
}),
})],
nextPageToken: 'string?'
});
const VideosResponse = struct.pick({
items: [struct.pick({
id: 'string',
snippet: struct.pick({
publishedAt: 'string', // 2007-03-05T08:22:25.000Z
channelId: 'string',
title: 'string',
// description: 'string',
thumbnails: struct.record(['string', struct.pick({
// description: 'string',
thumbnails: struct.record(['string', struct.pick({
url: 'string',
width: 'number',
height: 'number',
})]),
channelTitle: 'string',
// tags: ['string'],
// categoryId: 'string', // 10
// liveBroadcastContent: 'string', // none
// localized: struct.pick({
// title: 'string',
// description: 'string',
// })
}),
contentDetails: struct.pick({
duration: 'string', // PT2M57S
// dimension: 'string', // 2d
// definition: 'string', // sd
// caption: 'string', // false
// licensedContent: 'boolean', // true
// projection: 'string', // rectangular
}),
})],
nextPageToken: 'string?'
});
class Youtube {
constructor(/**Main*/main) {
this.main = main;
this.id = 'youtube';
this.name = 'Youtube';
const debug = require('debug')('app:Youtube');
const rateLimit = new RateLimit(1000);
const gotLimited = rateLimit.wrap((url, options) => {
return gotLockTimeout(got(url, options), 2.5 * 60 * 1000);
});
const VideosItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string'
})
})]
});
const ChannelsItemsId = struct.pick({
items: [struct.pick({
id: 'string'
})],
nextPageToken: 'string?'
});
const SearchItemsId = struct.pick({
items: [struct.pick({
id: struct.pick({
channelId: 'string'
})
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
import arrayByPart from "../tools/arrayByPart";
import parallel from "../tools/parallel";
import formatDuration from "../tools/formatDuration";
import ensureMap from "../tools/ensureMap";
import promiseTry from "../tools/promiseTry";
import {gotLockTimeout} from "../tools/gotWithTimeout";
const got = require('got');
const debug = require('debug')('app:Youtube');
const rateLimit = new RateLimit(1000);
const gotLimited = rateLimit.wrap((url, options) => {
return gotLockTimeout(got(url, options), 2.5 * 60 * 1000);
});
const VideosItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string'
})
})]
});
const ChannelsItemsId = struct.pick({
items: [struct.pick({
id: 'string'
})],
nextPageToken: 'string?'
});
const SearchItemsId = struct.pick({
items: [struct.pick({
const VideosItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string'
})
})]
});
const ChannelsItemsId = struct.pick({
items: [struct.pick({
id: 'string'
})],
nextPageToken: 'string?'
});
const SearchItemsId = struct.pick({
items: [struct.pick({
id: struct.pick({
channelId: 'string'
})
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string',
channelTitle: 'string'
})
})]
});
items: [struct.pick({
snippet: struct.pick({
channelId: 'string'
})
})]
});
const ChannelsItemsId = struct.pick({
items: [struct.pick({
id: 'string'
})],
nextPageToken: 'string?'
});
const SearchItemsId = struct.pick({
items: [struct.pick({
id: struct.pick({
channelId: 'string'
})
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string',
channelTitle: 'string'
})
})]
});
const ActivitiesResponse = struct.pick({
id: 'string'
})],
nextPageToken: 'string?'
});
const SearchItemsId = struct.pick({
items: [struct.pick({
id: struct.pick({
channelId: 'string'
})
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string',
channelTitle: 'string'
})
})]
});
const ActivitiesResponse = struct.pick({
items: [struct.pick({
contentDetails: struct.pick({
upload: struct.pick({
videoId: 'string'
})
}),
})],
nextPageToken: 'string?'
});
const ChannelsItemsId = struct.pick({
items: [struct.pick({
id: 'string'
})],
nextPageToken: 'string?'
});
const SearchItemsId = struct.pick({
items: [struct.pick({
id: struct.pick({
channelId: 'string'
})
})]
});
const SearchItemsSnippet = struct.pick({
items: [struct.pick({
snippet: struct.pick({
channelId: 'string',
channelTitle: 'string'
})
})]
});
const ActivitiesResponse = struct.pick({
items: [struct.pick({
contentDetails: struct.pick({
upload: struct.pick({
videoId: 'string'
})
}),
})],