devworldbr-api 1.0.2 → 1.0.3
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/README.md +21 -1
- package/index.js +18 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -178,13 +178,30 @@ Shazam
|
|
|
178
178
|
Utilize o método para identificar músicas a partir de uma URL de áudio.
|
|
179
179
|
|
|
180
180
|
const result = await api.shazam(
|
|
181
|
-
'https://
|
|
181
|
+
'https://files.devworldbr.site/1790997158474-653221556.mp3'
|
|
182
182
|
);
|
|
183
183
|
|
|
184
184
|
console.log(result);
|
|
185
185
|
|
|
186
186
|
---
|
|
187
187
|
|
|
188
|
+
---
|
|
189
|
+
Inteligencias artificiais
|
|
190
|
+
|
|
191
|
+
Chat GPT
|
|
192
|
+
|
|
193
|
+
const result = await api.gpt('oq é javascript?');
|
|
194
|
+
console.log(result);
|
|
195
|
+
|
|
196
|
+
Groq
|
|
197
|
+
const result = await api.groq('oq é javascript?');
|
|
198
|
+
console.log(result);
|
|
199
|
+
|
|
200
|
+
Gemini
|
|
201
|
+
const result = await api.gemini('oq é javascript?');
|
|
202
|
+
console.log(result);
|
|
203
|
+
---
|
|
204
|
+
|
|
188
205
|
Retornos
|
|
189
206
|
|
|
190
207
|
Por padrão, os métodos da SDK retornam os dados fornecidos pela API em formato JSON.
|
|
@@ -261,6 +278,9 @@ FacebookDL()
|
|
|
261
278
|
SoundCloudDL()
|
|
262
279
|
mediafireDL()
|
|
263
280
|
shazam()
|
|
281
|
+
gpt()
|
|
282
|
+
groq()
|
|
283
|
+
gemini()
|
|
264
284
|
|
|
265
285
|
Os métodos podem receber parâmetros diferentes de acordo com o recurso utilizado.
|
|
266
286
|
|
package/index.js
CHANGED
|
@@ -12,7 +12,7 @@ class DevWorldBR {
|
|
|
12
12
|
|
|
13
13
|
this.client = axios.create({
|
|
14
14
|
baseURL: this.baseURL,
|
|
15
|
-
timeout:
|
|
15
|
+
timeout: 3000000
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -94,8 +94,25 @@ class DevWorldBR {
|
|
|
94
94
|
if (!audioUrl) throw new Error('O parâmetro "audioUrl" é obrigatório.');
|
|
95
95
|
return await this._get('/api/ferramentas/shazam/v1', { url: audioUrl });
|
|
96
96
|
}
|
|
97
|
+
|
|
98
|
+
async gpt(query) {
|
|
99
|
+
if (!query) throw new Error('O parâmetro "query" é obrigatório.');
|
|
100
|
+
return await this._get('/api/inteligencias-artificiais/chatgpt/v1', { query })
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async groq(query) {
|
|
104
|
+
if (!query) throw new Error('O parâmetro "query" é obrigatório.');
|
|
105
|
+
return await this._get('/api/inteligencias-artificiais/groq/v1', { query })
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async gemini(query) {
|
|
109
|
+
if (!query) throw new Error('O parâmetro "query" é obrigatório.');
|
|
110
|
+
return await this._get('/api/inteligencias-artificiais/gemini/v1', { query })
|
|
111
|
+
}
|
|
97
112
|
}
|
|
98
113
|
|
|
114
|
+
|
|
115
|
+
|
|
99
116
|
module.exports = DevWorldBR;
|
|
100
117
|
module.exports.default = DevWorldBR;
|
|
101
118
|
module.exports.DevWorldBR = DevWorldBR;
|