yutaapis 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 +399 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,2 +1,401 @@
|
|
|
1
1
|
# yutaapis
|
|
2
2
|
Módulo SDK TypeScript/JavaScript desenvolvido para consumo do Yuta APIs; em parceria com HutaoBot
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<h1 align="center">
|
|
6
|
+
<p>
|
|
7
|
+
<img src="https://raw.githubusercontent.com/Lm-Only/yutaapis/refs/heads/main/assets/banner.jpg" alt="Yuta APIS" width="720">
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
##
|
|
11
|
+
|
|
12
|
+
> [!IMPORTANT]
|
|
13
|
+
> **Este módulo ainda está em desenvolvimento por Lm Only, é de certeza que algumas rotas ainda não estejam configuradas,**
|
|
14
|
+
> **Em breve o módulo deve estar totalmente pronto**
|
|
15
|
+
|
|
16
|
+
## Instalação
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm i yutaapis
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Quickstart
|
|
23
|
+
|
|
24
|
+
```javascript
|
|
25
|
+
// Esm - "type": "module"
|
|
26
|
+
import YutaApis from 'yutaapis';
|
|
27
|
+
|
|
28
|
+
const api = new YutaApis({
|
|
29
|
+
apiToken: process.env.TOKEN // token do Yuta obtido no site
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const gitstalkResult = await api.pesquisas.gitstalk('Lm-Only'); // Promise<Object>
|
|
33
|
+
|
|
34
|
+
if (!gitstalkResult.status) {
|
|
35
|
+
console.error(gitstalkResult.msg || 'Error na API');
|
|
36
|
+
process.exit();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
console.log(gitstalkResult);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Sumário
|
|
43
|
+
|
|
44
|
+
- [Api](https://yuta-apis.xyz)
|
|
45
|
+
- [planos](https://yuta-apis.xyz/planos)
|
|
46
|
+
- [login](https://yuta-apis.xyz/login)
|
|
47
|
+
|
|
48
|
+
- [Pesquisas](#pesquisas)
|
|
49
|
+
- [wiki](#pesquisas-wiki)
|
|
50
|
+
- [ytsearch](#pesquisas-ytsearch)
|
|
51
|
+
- [gitstalk](#pesquisas-gitstalk)
|
|
52
|
+
|
|
53
|
+
- [Downloads](#downloads)
|
|
54
|
+
- [ytmp3](#downloads-ytmp3)
|
|
55
|
+
- [ytmp4](#downloads-ytmp4)
|
|
56
|
+
- [play](#downloads-play)
|
|
57
|
+
- [playvideo](#downloads-playvideo)
|
|
58
|
+
- [tiktokdl](#downloads-tiktokdl)
|
|
59
|
+
- [instavideo](#downloads-instavideo)
|
|
60
|
+
- [pinterest](#downloads-pinterest)
|
|
61
|
+
- [pinterestMp3](#downloads-pinterestmp3)
|
|
62
|
+
- [pinterestVideo](#downloads-pinterestvideo)
|
|
63
|
+
|
|
64
|
+
- [IAs](#ias)
|
|
65
|
+
- [gpt](#ias-gpt)
|
|
66
|
+
- [gemini_pro](#ias-gemini_pro)
|
|
67
|
+
- [perplexity_ai](#ias-perplexity_ai)
|
|
68
|
+
- [geminivoz](#ias-geminivoz)
|
|
69
|
+
- [gemini](#ias-gemini)
|
|
70
|
+
|
|
71
|
+
- [Geradores](#geradores)
|
|
72
|
+
- [nick](#geradores-nick)
|
|
73
|
+
- [qrcode](#geradores-qrcode)
|
|
74
|
+
|
|
75
|
+
- [Logos](#logos)
|
|
76
|
+
- [logos](#logos-logos)
|
|
77
|
+
|
|
78
|
+
- [Notícias](#notícias)
|
|
79
|
+
- [cnn](#notícias-cnn)
|
|
80
|
+
- [esportes](#notícias-esportes)
|
|
81
|
+
- [g1](#notícias-g1)
|
|
82
|
+
- [ibge](#notícias-ibge)
|
|
83
|
+
- [noticias_atuais](#notícias-noticias_atuais)
|
|
84
|
+
- [politica](#notícias-politica)
|
|
85
|
+
- [uol](#notícias-uol)
|
|
86
|
+
|
|
87
|
+
- [Plaquinhas](#plaquinhas)
|
|
88
|
+
- [plaquinhas](#plaquinhas-plaquinhas)
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Pesquisas
|
|
93
|
+
|
|
94
|
+
### wiki
|
|
95
|
+
Busca informações/resumo de um termo na Wikipedia.
|
|
96
|
+
```javascript
|
|
97
|
+
const wiki = await api.pesquisas.wiki('Typescript');
|
|
98
|
+
console.log(wiki);
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### ytsearch
|
|
102
|
+
Pesquisa vídeos no YouTube por texto.
|
|
103
|
+
```javascript
|
|
104
|
+
const ytsearch = await api.pesquisas.ytsearch('Baby Shark');
|
|
105
|
+
console.log(ytsearch);
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### gitstalk
|
|
109
|
+
Consulta informações públicas de um usuário GitHub.
|
|
110
|
+
```javascript
|
|
111
|
+
const gitstalk = await api.pesquisas.gitstalk('Lm-Only');
|
|
112
|
+
console.log(gitstalk);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Downloads
|
|
118
|
+
|
|
119
|
+
### ytmp3
|
|
120
|
+
Baixa áudio MP3 de um link do YouTube.
|
|
121
|
+
```javascript
|
|
122
|
+
const ytmp3 = await api.downloads.ytmp3('https://www.youtube.com/watch?v=osPq9Yb8xm8');
|
|
123
|
+
// buffer
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Exemplo salvando em arquivo:
|
|
127
|
+
```javascript
|
|
128
|
+
import { writeFile } from 'node:fs/promises';
|
|
129
|
+
|
|
130
|
+
const ytmp3 = await api.downloads.ytmp3('https://www.youtube.com/watch?v=osPq9Yb8xm8');
|
|
131
|
+
await writeFile('ytmp3.mp3', ytmp3);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### ytmp4
|
|
135
|
+
Baixa vídeo MP4 de um link do YouTube.
|
|
136
|
+
```javascript
|
|
137
|
+
const ytmp4 = await api.downloads.ytmp4('https://www.youtube.com/watch?v=osPq9Yb8xm8');
|
|
138
|
+
// buffer
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Exemplo salvando em arquivo:
|
|
142
|
+
```javascript
|
|
143
|
+
import { writeFile } from 'node:fs/promises';
|
|
144
|
+
|
|
145
|
+
const ytmp4 = await api.downloads.ytmp4('https://www.youtube.com/watch?v=osPq9Yb8xm8');
|
|
146
|
+
await writeFile('ytmp4.mp4', ytmp4);
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### play
|
|
150
|
+
Busca uma música por nome e retorna o resultado em áudio.
|
|
151
|
+
```javascript
|
|
152
|
+
const play = await api.downloads.play('Nuts');
|
|
153
|
+
// buffer
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Exemplo salvando em arquivo:
|
|
157
|
+
```javascript
|
|
158
|
+
import { writeFile } from 'node:fs/promises';
|
|
159
|
+
|
|
160
|
+
const play = await api.downloads.play('Nuts');
|
|
161
|
+
await writeFile('play.mp3', play);
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### playvideo
|
|
165
|
+
Busca um vídeo por nome e retorna o vídeo.
|
|
166
|
+
```javascript
|
|
167
|
+
const playvideo = await api.downloads.playvideo('Hutao Edit');
|
|
168
|
+
// buffer
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Exemplo salvando em arquivo:
|
|
172
|
+
```javascript
|
|
173
|
+
import { writeFile } from 'node:fs/promises';
|
|
174
|
+
|
|
175
|
+
const playvideo = await api.downloads.playvideo('Hutao Edit');
|
|
176
|
+
await writeFile('playvideo.mp4', playvideo);
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### tiktokdl
|
|
180
|
+
Baixa mídia de um link do TikTok.
|
|
181
|
+
```javascript
|
|
182
|
+
const tiktokdl = await api.downloads.tiktokdl('https://vt.tiktok.com/ZSqRRu4Dn/');
|
|
183
|
+
console.log(tiktokdl);
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### instavideo
|
|
187
|
+
Baixa vídeo a partir de link do Instagram.
|
|
188
|
+
```javascript
|
|
189
|
+
const instavideo = await api.downloads.instavideo('https://www.instagram.com/p/Dc1iG74Fkgt/');
|
|
190
|
+
console.log(instavideo);
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### pinterest
|
|
194
|
+
Pesquisa conteúdo no Pinterest por texto.
|
|
195
|
+
```javascript
|
|
196
|
+
const pinterest = await api.downloads.pinterest('Hutao Icon');
|
|
197
|
+
// buffer
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Exemplo salvando em arquivo:
|
|
201
|
+
```javascript
|
|
202
|
+
import { writeFile } from 'node:fs/promises';
|
|
203
|
+
|
|
204
|
+
const pinterest = await api.downloads.pinterest('Hutao Icon');
|
|
205
|
+
await writeFile('pinterest.jpg', pinterest);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### pinterestMp3
|
|
209
|
+
Retorna áudio relacionado a conteúdo do Pinterest (quando suportado).
|
|
210
|
+
```javascript
|
|
211
|
+
const pinterestMp3 = await api.downloads.pinterestMp3('https://pin.it/5decaQP2P');
|
|
212
|
+
// buffer
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Exemplo salvando em arquivo:
|
|
216
|
+
```javascript
|
|
217
|
+
import { writeFile } from 'node:fs/promises';
|
|
218
|
+
|
|
219
|
+
const pinterestMp3 = await api.downloads.pinterestMp3('https://pin.it/5decaQP2P');
|
|
220
|
+
await writeFile('pinterest.mp3', pinterestMp3);
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### pinterestVideo
|
|
224
|
+
Retorna vídeo a partir de link do Pinterest.
|
|
225
|
+
```javascript
|
|
226
|
+
const pinterestVideo = await api.downloads.pinterestVideo('https://pin.it/5decaQP2P');
|
|
227
|
+
console.log(pinterestVideo);
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## IAs
|
|
233
|
+
|
|
234
|
+
### gpt
|
|
235
|
+
Envia um prompt e retorna resposta gerada por IA (modelo GPT).
|
|
236
|
+
```javascript
|
|
237
|
+
const gpt = await api.ias.gpt('Oii tudo bem?');
|
|
238
|
+
console.log(gpt);
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### gemini_pro
|
|
242
|
+
Envia prompt para modelo Gemini Pro.
|
|
243
|
+
```javascript
|
|
244
|
+
const geminiPro = await api.ias.gemini_pro('Oii tudo bem?');
|
|
245
|
+
console.log(geminiPro);
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### perplexity_ai
|
|
249
|
+
Envia prompt para integração Perplexity AI.
|
|
250
|
+
```javascript
|
|
251
|
+
const perplexityAi = await api.ias.perplexity_ai('Oii tudo bem?');
|
|
252
|
+
console.log(perplexityAi);
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### geminivoz
|
|
256
|
+
Endpoint Gemini com foco em recursos de voz (depende da implementação).
|
|
257
|
+
```javascript
|
|
258
|
+
const geminiVoz = await api.ias.geminivoz('Oii tudo bem?');
|
|
259
|
+
// buffer
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Exemplo salvando em arquivo:
|
|
263
|
+
```javascript
|
|
264
|
+
import { writeFile } from 'node:fs/promises';
|
|
265
|
+
|
|
266
|
+
const geminiVoz = await api.ias.geminivoz('Oii tudo bem?');
|
|
267
|
+
await writeFile('geminivoz.mp3', geminiVoz);
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### gemini
|
|
271
|
+
Endpoint padrão do Gemini para respostas por prompt.
|
|
272
|
+
```javascript
|
|
273
|
+
const gemini = await api.ias.gemini('Oii tudo bem?');
|
|
274
|
+
console.log(gemini);
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Geradores
|
|
280
|
+
|
|
281
|
+
### nick
|
|
282
|
+
Gera sugestões de nickname com base no nome informado.
|
|
283
|
+
```javascript
|
|
284
|
+
const nick = await api.geradores.nick('Lm Only');
|
|
285
|
+
console.log(nick);
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### qrcode
|
|
289
|
+
Gera um QR Code com o texto/link enviado.
|
|
290
|
+
```javascript
|
|
291
|
+
const qrcode = await api.geradores.qrcode('https://github.com/Lm-Only/HutaoBot');
|
|
292
|
+
// buffer
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Exemplo salvando em arquivo:
|
|
296
|
+
```javascript
|
|
297
|
+
import { writeFile } from 'node:fs/promises';
|
|
298
|
+
|
|
299
|
+
const qrcode = await api.geradores.qrcode('https://github.com/Lm-Only/HutaoBot');
|
|
300
|
+
await writeFile('qrcode.png', qrcode);
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Logos
|
|
306
|
+
|
|
307
|
+
### logos
|
|
308
|
+
Cria logos com estilo e texto informados.
|
|
309
|
+
```javascript
|
|
310
|
+
const logos = await api.logos('glitch', 'LmOnly');
|
|
311
|
+
// buffer
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Exemplo salvando em arquivo:
|
|
315
|
+
```javascript
|
|
316
|
+
import { writeFile } from 'node:fs/promises';
|
|
317
|
+
|
|
318
|
+
const logos = await api.logos('glitch', 'LmOnly');
|
|
319
|
+
await writeFile('logo.png', logos);
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Notícias
|
|
325
|
+
|
|
326
|
+
### cnn
|
|
327
|
+
Retorna notícias da CNN.
|
|
328
|
+
```javascript
|
|
329
|
+
const cnn = await api.noticias.cnn();
|
|
330
|
+
console.log(cnn);
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### esportes
|
|
334
|
+
Retorna notícias da categoria esportes.
|
|
335
|
+
```javascript
|
|
336
|
+
const esportes = await api.noticias.esportes();
|
|
337
|
+
console.log(esportes);
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### g1
|
|
341
|
+
Retorna notícias do G1.
|
|
342
|
+
```javascript
|
|
343
|
+
const g1 = await api.noticias.g1();
|
|
344
|
+
console.log(g1);
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### ibge
|
|
348
|
+
Retorna notícias/conteúdos relacionados ao IBGE.
|
|
349
|
+
```javascript
|
|
350
|
+
const ibge = await api.noticias.ibge();
|
|
351
|
+
console.log(ibge);
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### noticias_atuais
|
|
355
|
+
Retorna notícias gerais atuais.
|
|
356
|
+
```javascript
|
|
357
|
+
const noticiasAtuais = await api.noticias.noticias_atuais();
|
|
358
|
+
console.log(noticiasAtuais);
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### politica
|
|
362
|
+
Retorna notícias de política.
|
|
363
|
+
```javascript
|
|
364
|
+
const politica = await api.noticias.politica();
|
|
365
|
+
console.log(politica);
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### uol
|
|
369
|
+
Retorna notícias da UOL.
|
|
370
|
+
```javascript
|
|
371
|
+
const uol = await api.noticias.uol();
|
|
372
|
+
console.log(uol);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Plaquinhas
|
|
378
|
+
|
|
379
|
+
### plaquinhas
|
|
380
|
+
Gera uma plaquinha com modelo (`type`) e texto.
|
|
381
|
+
```javascript
|
|
382
|
+
const plaquinha = await api.plaquinhas('plaq1', 'LmOnly');
|
|
383
|
+
// buffer
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Exemplo salvando em arquivo:
|
|
387
|
+
```javascript
|
|
388
|
+
import { writeFile } from 'node:fs/promises';
|
|
389
|
+
|
|
390
|
+
const plaquinha = await api.plaquinhas('plaq1', 'LmOnly');
|
|
391
|
+
await writeFile('plaquinha.png', plaquinha);
|
|
392
|
+
```
|
|
393
|
+
> Também vai até plaq10
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
* By [Yuta Apis](https://yuta-apis.xyz)
|
|
398
|
+
* Criado por: Lm Only
|
|
399
|
+
* Versão: beta
|
|
400
|
+
|
|
401
|
+
License MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yutaapis",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Módulo
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "Módulo SDK TypeScript/JavaScript desenvolvido para consumo do Yuta APIs; em parceria com HutaoBot",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
7
7
|
"nodejs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"lib"
|
|
20
20
|
],
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"author": "
|
|
22
|
+
"author": "lm-only",
|
|
23
23
|
"type": "module",
|
|
24
24
|
"main": "lib/index.js",
|
|
25
25
|
"types": "lib/Types/types.d.ts",
|