dymo-api 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dymo-api.cjs +1 -1
- package/lib/private-api.cjs +1 -1
- package/lib/public-api.cjs +4 -4
- package/package.json +1 -1
package/lib/dymo-api.cjs
CHANGED
|
@@ -26,7 +26,7 @@ class Configuration {
|
|
|
26
26
|
if (this.apiKey !== null) tokens.api = `Bearer ${this.apiKey}`;
|
|
27
27
|
try {
|
|
28
28
|
if (Object.keys(tokens).length < 1) return;
|
|
29
|
-
const response = await axios.post('https://api.tpeoficial.com/dvr/tokens', { tokens });
|
|
29
|
+
const response = await axios.post('https://api.tpeoficial.com/v1/dvr/tokens', { tokens });
|
|
30
30
|
if (tokens.root && response.data.root === false) throw customError(3000, "Invalid root token.");
|
|
31
31
|
if (tokens.private && response.data.private === false) throw customError(3000, "Invalid private token.");
|
|
32
32
|
// Saves the response and the current request time.
|
package/lib/private-api.cjs
CHANGED
|
@@ -13,7 +13,7 @@ exports.isValidData = async (token, data) => {
|
|
|
13
13
|
}
|
|
14
14
|
if (!i) throw customError(1500, "You must provide at least one parameter.");
|
|
15
15
|
try {
|
|
16
|
-
const response = await axios.get(`https://api.tpeoficial.com/private/secure/verify`, { params: data, headers: { 'Authorization': token } });
|
|
16
|
+
const response = await axios.get(`https://api.tpeoficial.com/v1/private/secure/verify`, { params: data, headers: { 'Authorization': token } });
|
|
17
17
|
return response.data;
|
|
18
18
|
} catch (error) {
|
|
19
19
|
throw customError(5000, error.message);
|
package/lib/public-api.cjs
CHANGED
|
@@ -6,7 +6,7 @@ exports.getPrayerTimes = async (data) => {
|
|
|
6
6
|
const { lat, lon } = data;
|
|
7
7
|
if (!lat || !lon) throw customError(1000, "You must provide a latitude and longitude.");
|
|
8
8
|
try {
|
|
9
|
-
const response = await axios.get(`https://api.tpeoficial.com/public/islam/prayertimes`, { params: data });
|
|
9
|
+
const response = await axios.get(`https://api.tpeoficial.com/v1/public/islam/prayertimes`, { params: data });
|
|
10
10
|
return response.data;
|
|
11
11
|
} catch (error) {
|
|
12
12
|
throw customError(5000, error.message);
|
|
@@ -17,7 +17,7 @@ exports.inputSatinizer = async (data) => {
|
|
|
17
17
|
const { input } = data;
|
|
18
18
|
if (!input) throw customError(1000, "You must specify at least the input.");
|
|
19
19
|
try {
|
|
20
|
-
const response = await axios.get('https://api.tpeoficial.com/public/inputSatinizer', { params: { input: encodeURIComponent(input) } });
|
|
20
|
+
const response = await axios.get('https://api.tpeoficial.com/v1/public/inputSatinizer', { params: { input: encodeURIComponent(input) } });
|
|
21
21
|
return response.data;
|
|
22
22
|
} catch (error) {
|
|
23
23
|
throw customError(5000, error.message);
|
|
@@ -43,7 +43,7 @@ exports.isValidPwd = async (data) => {
|
|
|
43
43
|
if (min) params.min = min;
|
|
44
44
|
if (max) params.max = max;
|
|
45
45
|
try {
|
|
46
|
-
const response = await axios.get(`https://api.tpeoficial.com/public/validPwd`, { params });
|
|
46
|
+
const response = await axios.get(`https://api.tpeoficial.com/v1/public/validPwd`, { params });
|
|
47
47
|
return response.data;
|
|
48
48
|
} catch (error) {
|
|
49
49
|
throw customError(5000, error.message);
|
|
@@ -54,7 +54,7 @@ exports.newURLEncrypt = async (data) => {
|
|
|
54
54
|
const { url } = data;
|
|
55
55
|
if (!url || (!url.startsWith("https://") && !url.startsWith("http://"))) throw customError(1500, "You must provide a valid url.");
|
|
56
56
|
try {
|
|
57
|
-
const response = await axios.get(`https://api.tpeoficial.com/public/url-encrypt`, { params: data });
|
|
57
|
+
const response = await axios.get(`https://api.tpeoficial.com/v1/public/url-encrypt`, { params: data });
|
|
58
58
|
return response.data;
|
|
59
59
|
} catch (error) {
|
|
60
60
|
throw customError(5000, error.message);
|