1.0.20210817 • Published 3 years ago
@maxim_mazurok/gapi.client.poly v1.0.20210817
TypeScript typings for Poly API v1
The Poly API provides read access to assets hosted on poly.google.com to all, and upload access to poly.google.com for whitelisted accounts. For detailed description please check documentation.
Installing
Install typings for Poly API:
npm install @types/gapi.client.poly@v1 --save-dev
Usage
You need to initialize Google API client in your code:
gapi.load('client', () => {
// now we can use gapi.client
// ...
});
Then load api client wrapper:
gapi.client.load('poly', 'v1', () => {
// now we can use gapi.client.poly
// ...
});
After that you can use Poly API resources:
/*
Returns detailed information about an asset given its name. PRIVATE assets are returned only if the currently authenticated user (via OAuth token) is the author of the asset.
*/
await gapi.client.poly.assets.get({ name: "name", });
/*
Lists all public, remixable assets. These are assets with an access level of PUBLIC and published under the CC-By license.
*/
await gapi.client.poly.assets.list({ });
1.0.20210817
3 years ago
1.0.20210504
3 years ago
1.0.20210429
3 years ago
1.0.20201208
3 years ago
1.0.20201006
3 years ago