# PassAppSwaggerApi.UserApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /users/{id} | 
[**getUser**](UserApi.md#getUser) | **GET** /users/{id} | 
[**getUsers**](UserApi.md#getUsers) | **GET** /users | 
[**updateUser**](UserApi.md#updateUser) | **PUT** /users/{id} | 
[**uploadImage**](UserApi.md#uploadImage) | **PUT** /users/image/upload | 

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



delete user

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';

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

apiInstance.deleteUser(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

No authorization required

### HTTP request headers

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

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



get selected user

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';

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

apiInstance.getUser(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

No authorization required

### HTTP request headers

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

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



get all users

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';

let apiInstance = new PassAppSwaggerApi.UserApi();
apiInstance.getUsers((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters
This endpoint does not need any parameter.

### Return type

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

### Authorization

No authorization required

### HTTP request headers

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

<a name="updateUser"></a>
# **updateUser**
> User updateUser(bodyid)



update user

### Example
```javascript
import PassAppSwaggerApi from 'pass_app_swagger_api';

let apiInstance = new PassAppSwaggerApi.UserApi();
let body = new PassAppSwaggerApi.User(); // User | user details
let id = "id_example"; // String | user id

apiInstance.updateUser(bodyid, (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)| user details | 
 **id** | **String**| user id | 

### Return type

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

### Authorization

No authorization required

### HTTP request headers

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

<a name="uploadImage"></a>
# **uploadImage**
> ImageResult uploadImage(image)



upload image

### 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.UserApi();
let image = "image_example"; // File | 

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **image** | **File**|  | 

### Return type

[**ImageResult**](ImageResult.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json, application/xml

