1.0.1 • Published 4 years ago
youglish-api-client v1.0.1
youglish-api-client
A Node.js client for the Youglish REST API
Installation
This is a Node.js module available through the
npm registry. It can be installed using the
npm
or
yarn
command line tools.
npm install youglish-api-client
Usage
require('dotenv').config()
require('assert')(process.env.YOUGLISH_API_KEY)
const YouglishClient = require('.')
main()
async function main () {
const youglish = new YouglishClient({ key: process.env.YOUGLISH_API_KEY })
const query = 'electromagnetic'
console.log('Searching for', query)
const results = await youglish.videos({ query })
console.log(results)
}
Example result object
{
total_results: '2841',
set_size: '10',
results: [
{
display: 'which plays the electromagnetic waves of a body,',
seg: null,
vid: '7yqfTap_cF4',
start: '651',
id: '50687345'
},
{
display: 'powerful than the biggest electromagnetic rail gun projectile.',
seg: null,
vid: 'vncYqSZMrgM',
start: '95',
id: '48459898'
},
{
display: 'other modalities within the electromagnetic spectrum.',
seg: null,
vid: 'NzZJQrPPv0M',
start: '28',
id: '56000310'
},
{
display: "You're not stretching because you're bound by electromagnetic forces.",
seg: null,
vid: 'gniDHWq0R_Q',
start: '238',
id: '52197453'
},
{
display: 'of the electromagnetic spectrum as your home wifi.',
seg: null,
vid: '9j8G_4FocrA',
start: '450',
id: '68935211'
},
{
display: 'wavelength of electromagnetic radiation,',
seg: null,
vid: 'laqTml7s_a0',
start: '2860',
id: '17832015'
},
{
display: "There's a whole electromagnetic spectrum.",
seg: null,
vid: 'laqTml7s_a0',
start: '2871',
id: '17832019'
},
{
display: "But that's the electromagnetic wave spectrum.",
seg: null,
vid: 'laqTml7s_a0',
start: '3000',
id: '17832066'
},
{
display: 'and electromagnetic fields in the universe,',
seg: null,
vid: 'laqTml7s_a0',
start: '44',
id: '17831016'
},
{
display: 'What is an electromagnetic halo?',
seg: null,
vid: 'VaMjhwFE1Zw',
start: '1749',
id: '5448533'
}
]
}
Tests
npm install
npm test
Dependencies
- got: Human-friendly and powerful HTTP request library for Node.js