# PassAppSwaggerApi.EmployeesActivityApi

All URIs are relative to *http://localhost:3010/api/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**checkIn**](EmployeesActivityApi.md#checkIn) | **PUT** /employees/activity/check/in | 
[**checkOut**](EmployeesActivityApi.md#checkOut) | **PUT** /employees/activity/check/out | 
[**createUserByEmp**](EmployeesActivityApi.md#createUserByEmp) | **POST** /employees/create/user | 
[**getActivityListForEmp**](EmployeesActivityApi.md#getActivityListForEmp) | **GET** /employees/activity/details | 
[**getOneActivityForEmp**](EmployeesActivityApi.md#getOneActivityForEmp) | **GET** /employees/activity/details/{id} | 
[**getUserById**](EmployeesActivityApi.md#getUserById) | **GET** /employees/search/users/{id} | 
[**searchUsers**](EmployeesActivityApi.md#searchUsers) | **GET** /employees/search/users | 

<a name="checkIn"></a>
# **checkIn**
> ActivityResult checkIn(body)



checkin activity

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let body = new PassAppSwaggerApi.Activity(); // Activity | activity data

apiInstance.checkIn(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Activity**](Activity.md)| activity data | 

### Return type

[**ActivityResult**](ActivityResult.md)

### Authorization

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

### HTTP request headers

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

<a name="checkOut"></a>
# **checkOut**
> Activity checkOut(body)



checkout activity

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let body = new PassAppSwaggerApi.Activity(); // Activity | _id ,station and signature only

apiInstance.checkOut(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Activity**](Activity.md)| _id ,station and signature only | 

### Return type

[**Activity**](Activity.md)

### Authorization

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

### HTTP request headers

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

<a name="createUserByEmp"></a>
# **createUserByEmp**
> User createUserByEmp(body)



register user by emp

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let body = new PassAppSwaggerApi.User(); // User | register details

apiInstance.createUserByEmp(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**User**](User.md)| register details | 

### Return type

[**User**](User.md)

### Authorization

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

### HTTP request headers

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

<a name="getActivityListForEmp"></a>
# **getActivityListForEmp**
> [Activity] getActivityListForEmp(opts)



get one activity

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let opts = { 
  'checkinStatus': 1.2 // Number | 1- in, 2 -out
};
apiInstance.getActivityListForEmp(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **checkinStatus** | **Number**| 1- in, 2 -out | [optional] 

### Return type

[**[Activity]**](Activity.md)

### Authorization

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

### HTTP request headers

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

<a name="getOneActivityForEmp"></a>
# **getOneActivityForEmp**
> Activity getOneActivityForEmp(id)



get one activity

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let id = "id_example"; // String | activity id

apiInstance.getOneActivityForEmp(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| activity id | 

### Return type

[**Activity**](Activity.md)

### Authorization

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

### HTTP request headers

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

<a name="getUserById"></a>
# **getUserById**
> User getUserById(id)



get user by id

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let id = "id_example"; // String | user id

apiInstance.getUserById(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| user id | 

### Return type

[**User**](User.md)

### Authorization

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

### HTTP request headers

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

<a name="searchUsers"></a>
# **searchUsers**
> [User] searchUsers(opts)



get all users

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';
let defaultClient = PassAppSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
let 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';

let apiInstance = new PassAppSwaggerApi.EmployeesActivityApi();
let opts = { 
  'name': 1.2, // Number | user frist name
  'mobile': 1.2 // Number | user mobile
};
apiInstance.searchUsers(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **name** | **Number**| user frist name | [optional] 
 **mobile** | **Number**| user mobile | [optional] 

### Return type

[**[User]**](User.md)

### Authorization

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

### HTTP request headers

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

