# NodeSwaggerApi.DashboardApi

All URIs are relative to *https://api.supremepay.lk:3011/api/admin*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getAdminActivites**](DashboardApi.md#getAdminActivites) | **GET** /dashboard/users/admin/activities | 
[**getBorrowersUsers**](DashboardApi.md#getBorrowersUsers) | **GET** /dashboard/users/borrowers/stats | 
[**getBorrowersUsersCount**](DashboardApi.md#getBorrowersUsersCount) | **GET** /dashboard/users/borrowers/stats/count | 
[**getLoanCount**](DashboardApi.md#getLoanCount) | **GET** /dashboard/loans/stats | 
[**getLoanPaymentsHistory**](DashboardApi.md#getLoanPaymentsHistory) | **GET** /dashboard/payments/history | 
[**getRegisterdUsersCount**](DashboardApi.md#getRegisterdUsersCount) | **GET** /dashboard/users/stats/count | 
[**getRegisteredUsers**](DashboardApi.md#getRegisteredUsers) | **GET** /dashboard/users/stats/test | 
[**getRegisteredUsersList**](DashboardApi.md#getRegisteredUsersList) | **GET** /dashboard/users/stats | 
[**getUsersActivities**](DashboardApi.md#getUsersActivities) | **GET** /dashboard/users/activities | 
[**getUsersLoginHistory**](DashboardApi.md#getUsersLoginHistory) | **GET** /dashboard/users/login/history | 


<a name="getAdminActivites"></a>
# **getAdminActivites**
> AdminHistory getAdminActivites(opts)



Returns admins recent activities

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 50 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 50]

### Return type

[**AdminHistory**](AdminHistory.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getBorrowersUsers"></a>
# **getBorrowersUsers**
> UserProfile getBorrowersUsers(opts)



Returns users borrowers list

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'usertype': "mobitel", // String | Order by user type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **usertype** | **String**| Order by user type. | [optional] [default to mobitel]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getBorrowersUsersCount"></a>
# **getBorrowersUsersCount**
> UserProfile getBorrowersUsersCount(opts)



Returns borrowers users count

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'usertype': "mobitel", // String | Order by user type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **usertype** | **String**| Order by user type. | [optional] [default to mobitel]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getLoanCount"></a>
# **getLoanCount**
> Preloan getLoanCount(opts)



Returns loans count

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**Preloan**](Preloan.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getLoanPaymentsHistory"></a>
# **getLoanPaymentsHistory**
> LoanPaymentsHistory getLoanPaymentsHistory(opts)



Returns last payments

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**LoanPaymentsHistory**](LoanPaymentsHistory.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getRegisterdUsersCount"></a>
# **getRegisterdUsersCount**
> UserProfile getRegisterdUsersCount(opts)



Returns users count

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'usertype': "mobitel", // String | Order by user type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **usertype** | **String**| Order by user type. | [optional] [default to mobitel]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getRegisteredUsers"></a>
# **getRegisteredUsers**
> UserProfile getRegisteredUsers(opts)



Returns users list

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'usertype': "mobitel", // String | Order by user type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **usertype** | **String**| Order by user type. | [optional] [default to mobitel]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getRegisteredUsersList"></a>
# **getRegisteredUsersList**
> UserProfile getRegisteredUsersList(opts)



Returns users list

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'usertype': "mobitel", // String | Order by user type.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 10 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **usertype** | **String**| Order by user type. | [optional] [default to mobitel]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 10]

### Return type

[**UserProfile**](UserProfile.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getUsersActivities"></a>
# **getUsersActivities**
> UserHistory getUsersActivities(opts)



Returns users recent activities

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 50 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 50]

### Return type

[**UserHistory**](UserHistory.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getUsersLoginHistory"></a>
# **getUsersLoginHistory**
> LoginHistory getUsersLoginHistory(opts)



Returns users recent login history

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.DashboardApi();

var opts = { 
  'sort': "desc", // String | Sort order.
  'formdate': "formdate_example", // String | From date (YYYY-mm-dd).
  'todate': "todate_example", // String | To date (YYYY-mm-dd).
  'page': 0, // Number | The number of items to skip before starting to collect the result set.
  'perpage': 50 // Number | The numbers of items to return.
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **sort** | **String**| Sort order. | [optional] [default to desc]
 **formdate** | **String**| From date (YYYY-mm-dd). | [optional] 
 **todate** | **String**| To date (YYYY-mm-dd). | [optional] 
 **page** | **Number**| The number of items to skip before starting to collect the result set. | [optional] [default to 0]
 **perpage** | **Number**| The numbers of items to return. | [optional] [default to 50]

### Return type

[**LoginHistory**](LoginHistory.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

