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**](UserApi.md#getSelf) | **GET** /users/self | Get self user.
[**notifyRegistration**](UserApi.md#notifyRegistration) | **PUT** /users/self/notify_registration | Notify user is registered.
[**sendInvitation**](UserApi.md#sendInvitation) | **POST** /users/self/send_invitation | Send invitation.
[**updateSelf**](UserApi.md#updateSelf) | **PUT** /users/self | Update self user.
<a name="getSelf"></a>
# **getSelf**
> User getSelf()
Get self user.
### Example
```javascript
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**](User.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="notifyRegistration"></a>
# **notifyRegistration**
> User notifyRegistration(opts)
Notify user is registered.
### Example
```javascript
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**](User.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
<a name="sendInvitation"></a>
# **sendInvitation**
> User sendInvitation(inviteeEmail)
Send invitation.
### Example
```javascript
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**](User.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
<a name="updateSelf"></a>
# **updateSelf**
> User updateSelf(opts)
Update self user.
### Example
```javascript
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**](User.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json