# Meego.UserApi

All URIs are relative to *https://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**userLoginPost**](UserApi.md#userLoginPost) | **POST** /user/login | User logs in inside the app using this endpoint.
[**userRegisterPost**](UserApi.md#userRegisterPost) | **POST** /user/register | User registers inside the app using this endpoint.
[**userRetryOtpGet**](UserApi.md#userRetryOtpGet) | **GET** /user/retry-otp | Used for re sending OTP to the user for phone verification in case the earlier attempt fails.
[**userSendOtpGet**](UserApi.md#userSendOtpGet) | **GET** /user/send-otp | Used for sending OTP to the user for phone verification. (On the condition that the phone number is unique)
[**userSocialLoginPost**](UserApi.md#userSocialLoginPost) | **POST** /user/social-login | Used for social login. Takes a OAuth token and a type. Response may not have all the user details depending on the login status.
[**userValidateEmailGet**](UserApi.md#userValidateEmailGet) | **GET** /user/validate-email | Validates uniqueness of a user&#39;s email.
[**userVerifyOtpGet**](UserApi.md#userVerifyOtpGet) | **GET** /user/verify-otp | Used for veryfing OTP sent by the user.


<a name="userLoginPost"></a>
# **userLoginPost**
> IdNameCountryCodePhoneAgeGenderAvatarEmailModel userLoginPost(opts)

User logs in inside the app using this endpoint.

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var opts = { 
  'emailPasswordModel': new Meego.EmailPasswordModel() // EmailPasswordModel | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **emailPasswordModel** | [**EmailPasswordModel**](EmailPasswordModel.md)|  | [optional] 

### Return type

[**IdNameCountryCodePhoneAgeGenderAvatarEmailModel**](IdNameCountryCodePhoneAgeGenderAvatarEmailModel.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="userRegisterPost"></a>
# **userRegisterPost**
> IdNameCountryCodePhoneAgeGenderAvatarEmailModel userRegisterPost(opts)

User registers inside the app using this endpoint.

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var opts = { 
  'nameCountryCodePhoneEmailPasswordModel': new Meego.NameCountryCodePhoneEmailPasswordModel() // NameCountryCodePhoneEmailPasswordModel | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nameCountryCodePhoneEmailPasswordModel** | [**NameCountryCodePhoneEmailPasswordModel**](NameCountryCodePhoneEmailPasswordModel.md)|  | [optional] 

### Return type

[**IdNameCountryCodePhoneAgeGenderAvatarEmailModel**](IdNameCountryCodePhoneAgeGenderAvatarEmailModel.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="userRetryOtpGet"></a>
# **userRetryOtpGet**
> StatusCodeMessageModel userRetryOtpGet(countryCode, phone)

Used for re sending OTP to the user for phone verification in case the earlier attempt fails.

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var countryCode = "countryCode_example"; // String | 

var phone = "phone_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **countryCode** | **String**|  | 
 **phone** | **String**|  | 

### Return type

[**StatusCodeMessageModel**](StatusCodeMessageModel.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="userSendOtpGet"></a>
# **userSendOtpGet**
> StatusCodeMessageModel userSendOtpGet(countryCode, phone)

Used for sending OTP to the user for phone verification. (On the condition that the phone number is unique)

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var countryCode = "countryCode_example"; // String | 

var phone = "phone_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **countryCode** | **String**|  | 
 **phone** | **String**|  | 

### Return type

[**StatusCodeMessageModel**](StatusCodeMessageModel.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="userSocialLoginPost"></a>
# **userSocialLoginPost**
> IdNameEmailCountryCodePhoneAgeGenderAvatarStatusModel userSocialLoginPost(opts)

Used for social login. Takes a OAuth token and a type. Response may not have all the user details depending on the login status.

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var opts = { 
  'typeTokenModel': new Meego.TypeTokenModel() // TypeTokenModel | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **typeTokenModel** | [**TypeTokenModel**](TypeTokenModel.md)|  | [optional] 

### Return type

[**IdNameEmailCountryCodePhoneAgeGenderAvatarStatusModel**](IdNameEmailCountryCodePhoneAgeGenderAvatarStatusModel.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="userValidateEmailGet"></a>
# **userValidateEmailGet**
> StatusCodeMessageModel userValidateEmailGet(email)

Validates uniqueness of a user&#39;s email.

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var email = "email_example"; // String | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **email** | **String**|  | 

### Return type

[**StatusCodeMessageModel**](StatusCodeMessageModel.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="userVerifyOtpGet"></a>
# **userVerifyOtpGet**
> StatusCodeMessageStatusModel userVerifyOtpGet(countryCode, phone, otp)

Used for veryfing OTP sent by the user.

This should be unauthenticated.

### Example
```javascript
var Meego = require('meego');

var apiInstance = new Meego.UserApi();

var countryCode = "countryCode_example"; // String | 

var phone = "phone_example"; // String | 

var otp = 3.4; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **countryCode** | **String**|  | 
 **phone** | **String**|  | 
 **otp** | **Number**|  | 

### Return type

[**StatusCodeMessageStatusModel**](StatusCodeMessageStatusModel.md)

### Authorization

No authorization required

### HTTP request headers

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

