minter-js-org
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -1,5 +0,3 @@ | ||
## 0.0.2 - 2018-11-07 | ||
- fix path | ||
## 0.0.1 - 2018-11-07 | ||
- initial | ||
- wip |
{ | ||
"name": "minter-js-org", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Communicate with minter.org user database through it API", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -42,5 +42,6 @@ import axios from 'axios'; | ||
* @param {boolean} login - should make login | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<User|{confirmations: Array}>} | ||
*/ | ||
this.register = function register(data, login) { | ||
this.register = function register(data, login, axiosConfig) { | ||
// generate mnemonic if not specified | ||
@@ -60,5 +61,5 @@ const mnemonic = data.mnemonic ? data.mnemonic : generateMnemonic(); | ||
return new Promise((resolve, reject) => { | ||
instance.post('register', userData) | ||
instance.post('register', userData, axiosConfig) | ||
.then(() => { | ||
this.login(data) | ||
this.login(data, axiosConfig) | ||
.then((authData) => { | ||
@@ -75,3 +76,3 @@ resolve({ | ||
} else { | ||
return instance.post('register', userData) | ||
return instance.post('register', userData, axiosConfig) | ||
.then((response) => response.data.data); | ||
@@ -84,4 +85,4 @@ } | ||
* @param password | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @return {Promise<User>} | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<User|{password: string}>} | ||
*/ | ||
@@ -104,3 +105,3 @@ this.login = function login({username, password}, axiosConfig) { | ||
* Requires auth | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<User>} | ||
@@ -120,3 +121,3 @@ */ | ||
* @param {string} [profile.language] | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<{confirmations: Array}>} | ||
@@ -134,3 +135,3 @@ */ | ||
* @param {string} newPasswordToStore | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<Array<Address>>} | ||
@@ -162,3 +163,3 @@ */ | ||
* @param {Blob|File} avatar - image, max 0.5 MB, max 500x500 | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<UserAvatar>} | ||
@@ -177,3 +178,3 @@ */ | ||
* Requires auth | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<UserAvatar>} | ||
@@ -189,3 +190,3 @@ */ | ||
* @param {number} id | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<Address>} | ||
@@ -202,3 +203,3 @@ */ | ||
* @param {number} id | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<Address>} | ||
@@ -214,3 +215,3 @@ */ | ||
* @param {Address} address | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise} | ||
@@ -226,3 +227,3 @@ */ | ||
* @param {Address} address | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise} | ||
@@ -237,3 +238,3 @@ */ | ||
* @param {number} id | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise} | ||
@@ -248,3 +249,3 @@ */ | ||
* Requires auth | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<Array<Address>>} | ||
@@ -260,3 +261,3 @@ */ | ||
* Requires auth | ||
* @param {AxiosRequestConfig} axiosConfig | ||
* @param {AxiosRequestConfig} [axiosConfig] | ||
* @return {Promise<Array<Address>>} | ||
@@ -263,0 +264,0 @@ */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17309
363