HussainLatiff's picture
Added node.js AI Mastering module (#21)
0e27770 verified
|
raw
history blame
5.42 kB

Aimastering.UserApi

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

Method HTTP request Description
getSelf GET /users/self Get self user.
notifyRegistration PUT /users/self/notify_registration Notify user is registered.
sendInvitation POST /users/self/send_invitation Send invitation.
updateSelf PUT /users/self Update self user.

getSelf

User getSelf()

Get self user.

Example

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 = 'Token';

var apiInstance = new Aimastering.UserApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getSelf(callback);

Parameters

This endpoint does not need any parameter.

Return type

User

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

notifyRegistration

User notifyRegistration(opts)

Notify user is registered.

Example

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 = 'Token';

var apiInstance = new Aimastering.UserApi();

var opts = { 
  'affiliateId': "affiliateId_example", // String | The affiliate id of inviter.
  'referrerUrl': "referrerUrl_example" // String | The referrer URL.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.notifyRegistration(opts, callback);

Parameters

Name Type Description Notes
affiliateId String The affiliate id of inviter. [optional]
referrerUrl String The referrer URL. [optional]

Return type

User

Authorization

bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

sendInvitation

User sendInvitation(inviteeEmail)

Send invitation.

Example

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 = 'Token';

var apiInstance = new Aimastering.UserApi();

var inviteeEmail = "inviteeEmail_example"; // String | The email of invitee.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.sendInvitation(inviteeEmail, callback);

Parameters

Name Type Description Notes
inviteeEmail String The email of invitee.

Return type

User

Authorization

bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

updateSelf

User updateSelf(opts)

Update self user.

Example

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 = 'Token';

var apiInstance = new Aimastering.UserApi();

var opts = { 
  'agreedTermsOfService': true, // Boolean | Whether you agreed terms of service.
  'email': "email_example" // String | The email.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateSelf(opts, callback);

Parameters

Name Type Description Notes
agreedTermsOfService Boolean Whether you agreed terms of service. [optional]
email String The email. [optional]

Return type

User

Authorization

bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json