@dolbyio/dolbyio-rest-apis-client
Version:
Node.JS wrapper for the Dolby.io REST APIs
33 lines (32 loc) • 1.57 kB
TypeScript
import { JwtToken } from './types/jwtToken';
import { AnalyzeMusicJob } from './types/analyzeMusic';
/**
* Start analyzing to learn about music in your media.
*
* The `input` location of your source media file and `output` location of your Analyze JSON results file are required.
*
* This is an asynchronous operation so you will receive a `job_id` to be used to get the job status and result.
*
* @link https://docs.dolby.io/media-apis/reference/media-analyze-music-post
*
* @param accessToken Access token to use for authentication.
* @param jobContent Content of the job description as a JSON payload. You can find the definition at this URL: https://docs.dolby.io/media-apis/reference/media-analyze-music-post
*
* @returns The job identifier through a {@link Promise}.
*/
export declare const start: (accessToken: JwtToken, jobContent: string) => Promise<string | null>;
/**
* Gets Music Analytics Status.
*
* For a given {@link jobId}, this method will check if the processing task has completed.
*
* When {@link AnalyzeMusicJob.status} is `Success`, you'll be able to retrieve your result from the `output` location you provided in the original {@link start} request.
*
* @link https://docs.dolby.io/media-apis/reference/media-analyze-music-get
*
* @param accessToken Access token to use for authentication.
* @param jobId Identifier of the job to retrieve.
*
* @returns The {@link AnalyzeMusicJob} object through a {@link Promise}.
*/
export declare const getResults: (accessToken: JwtToken, jobId: string) => Promise<AnalyzeMusicJob>;