Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

aimastering

1.0.0 • Public • Published

aimastering

Aimastering - JavaScript client for aimastering This is a AI Mastering API document. You can use the mastering feature of AI Mastering through this API. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install aimastering --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your aimastering from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('aimastering') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Aimastering = require('aimastering');
 
var defaultClient = Aimastering.ApiClient.instance;
 
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix['Authorization'] = "Token"
 
var api = new Aimastering.AccessTokenApi()
 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAccessToken(callback);
 

Documentation for API Endpoints

All URIs are relative to https://aimastering.com:443/api

Class Method HTTP request Description
Aimastering.AccessTokenApi createAccessToken POST /access_tokens Create an API access token.
Aimastering.AudioApi createAudio POST /audios Create a new audio.
Aimastering.AudioApi downloadAudio GET /audios/{id}/download Download an audio data by id.
Aimastering.AudioApi downloadAudioByToken GET /audios/download_by_token Download an audio data by audio_download_token.
Aimastering.AudioApi getAudio GET /audios/{id} Get an audio by id.
Aimastering.AudioApi getAudioAnalysis GET /audios/{id}/analysis Get an audio analysis by id.
Aimastering.AudioApi getAudioDownloadToken GET /audios/{id}/download_token Get an audio download token by id.
Aimastering.AudioApi listAudios GET /audios Get all audios accessable.
Aimastering.ConfigApi getConfig GET /config Get config.
Aimastering.ExternalSearchApi searchExternal GET /external_search Search external music and get name, url, thumbnails, etc.
Aimastering.LibraryAudioApi createLibraryAudio POST /library_audios Create a new library audio.
Aimastering.LibraryAudioApi createLibraryAudioLike POST /library_audios/{id}/like Create a new library audio like.
Aimastering.LibraryAudioApi deleteLibraryAudio DELETE /library_audios/{id} Delete library audio.
Aimastering.LibraryAudioApi getLibraryAudio GET /library_audios/{id} Get a library audio by id.
Aimastering.LibraryAudioApi getLibraryAudioAnalysis GET /library_audios/{id}/analysis Get a library audio analysis by id.
Aimastering.LibraryAudioApi listLibraryAudios GET /library_audios Get all library audios accessable.
Aimastering.LibraryAudioApi updateLibraryAudio PUT /library_audios/{id} Update library audio.
Aimastering.MasteringApi cancelMastering PUT /masterings/{id}/cancel Cancel a mastering by id.
Aimastering.MasteringApi createMastering POST /masterings Create a new mastering.
Aimastering.MasteringApi deleteMastering DELETE /masterings/{id} Delete mastering.
Aimastering.MasteringApi getMastering GET /masterings/{id} Get a mastering by id.
Aimastering.MasteringApi getMasteringUnlockProduct GET /masterings/{id}/unlock_product Review a mastering by id.
Aimastering.MasteringApi listMasterings GET /masterings Get all accessable masterings.
Aimastering.MasteringApi publishMastering POST /masterings/{id}/publish Publish a mastering by id.
Aimastering.MasteringApi reviewMastering PUT /masterings/{id}/review Review a mastering by id.
Aimastering.PaymentApi createPayment POST /payments Create a new payment.
Aimastering.PaymentApi executePayment PUT /payments/{id}/execute Execute a payment by id.
Aimastering.PaymentApi getPayment GET /payments/{id} Get a payment by id.
Aimastering.PaymentApi listPayments GET /payments Get all accessable payments.
Aimastering.PaymentCustomerApi getDefaultPaymentCustomer GET /payment_customers/default Get a default payment customer.
Aimastering.PlanApi listPlans GET /plans Get all accessable plans.
Aimastering.StatisticsApi listAnonymizedMasterings GET /statistics/anonymized_masterings Get anonymized masterings.
Aimastering.StatisticsApi listKpis GET /statistics/kpis Get KPIs.
Aimastering.SubscriptionApi cancelSubscription PUT /subscriptions/{id}/cancel Cancel a subscription by id.
Aimastering.SubscriptionApi cancelSubscriptionCancellation PUT /subscriptions/{id}/cancel_cancellation Cancel the subscription cancellation by id.
Aimastering.SubscriptionApi createSubscription POST /subscriptions Create a new subscription.
Aimastering.SubscriptionApi getSubscription GET /subscriptions/{id} Get a subscription by id.
Aimastering.SubscriptionApi listSubscriptions GET /subscriptions Get all accessable subscriptions.
Aimastering.UserApi getSelf GET /users/self Get self user.
Aimastering.UserApi updateSelf PUT /users/self Update self user.
Aimastering.VideoApi downloadVideo GET /videos/{id}/download Download an video data by id.
Aimastering.VideoApi downloadVideoByToken GET /videos/download_by_token Download an video data by video_download_token.
Aimastering.VideoApi getVideo GET /videos/{id} Get an video by id.
Aimastering.VideoApi getVideoDownloadToken GET /videos/{id}/download_token Get an video download token by id.
Aimastering.VideoApi listVideos GET /videos Get all videos accessable.

Documentation for Models

Documentation for Authorization

bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Keywords

none

install

npm i aimastering

version

1.0.0

license

Apache 2.0

last publish

collaborators

  • avatar
Report a vulnerability