@unavatar/core 3.45.12 → 3.45.14

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.
Files changed (2) hide show
  1. package/README.md +83 -83
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -151,20 +151,20 @@ Your attribution link:
151
151
  Add this link on any page or surface displaying unavatar.io avatars:
152
152
 
153
153
  ```html
154
- [Avatars provided by Unavatar](https://unavatar.io)
154
+ <ahref="https://unavatar.io">Avatars provided by Unavatar</a>
155
155
  ```
156
156
 
157
157
  **Example**
158
158
 
159
159
  ```html
160
160
 
161
- ![Kiko](https://unavatar.io/github/kikobeats)
161
+ <imgsrc="https://unavatar.io/github/kikobeats"alt="Kiko"/>
162
162
 
163
- ![Joseba](https://unavatar.io/x/josebaseba)
163
+ <imgsrc="https://unavatar.io/x/josebaseba"alt="Joseba"/>
164
164
 
165
- <p class="attribution">
165
+ <pclass="attribution">
166
166
 
167
- [Avatars provided by Unavatar](https://unavatar.io)
167
+ <ahref="https://unavatar.io">Avatars provided by Unavatar</a>
168
168
 
169
169
  </p>
170
170
  ```
@@ -197,85 +197,85 @@ Anonymous requests work without authentication. They are limited to 25 requests/
197
197
  For [PRO](https://unavatar.io/checkout) users, the requests must include the API key as the `x-api-key` request header:
198
198
 
199
199
  ```html
200
- ![](https://unavatar.io/github/kikobeats)
200
+ <imgsrc="https://unavatar.io/github/kikobeats"/>
201
201
  ```
202
202
 
203
203
  ```bash
204
- curl "https://unavatar.io/github/kikobeats" -H "x-api-key: YOUR_API_KEY"
204
+ curl"https://unavatar.io/github/kikobeats"-H"x-api-key: YOUR_API_KEY"
205
205
  ```
206
206
 
207
207
  ```javascript
208
- await fetch('https://unavatar.io/github/kikobeats', {
208
+ awaitfetch('https://unavatar.io/github/kikobeats',{
209
209
 
210
- headers: {
210
+ headers:{
211
211
 
212
- 'x-api-key': 'YOUR_API_KEY'
212
+ 'x-api-key':'YOUR_API_KEY'
213
213
 
214
- }
214
+ }
215
215
 
216
216
  })
217
217
  ```
218
218
 
219
219
  ```python
220
- import requests
220
+ importrequests
221
221
 
222
- response = requests.get(
222
+ response=requests.get(
223
223
 
224
- 'https://unavatar.io/github/kikobeats',
224
+ 'https://unavatar.io/github/kikobeats',
225
225
 
226
- headers={'x-api-key': 'YOUR_API_KEY'}
226
+ headers={'x-api-key':'YOUR_API_KEY'}
227
227
 
228
228
  )
229
229
  ```
230
230
 
231
231
  ```golang
232
- package main
232
+ packagemain
233
233
 
234
- import "net/http"
234
+ import"net/http"
235
235
 
236
- func main() {
236
+ funcmain(){
237
237
 
238
- req, _ := http.NewRequest("GET", "https://unavatar.io/github/kikobeats", nil)
238
+ req,_:=http.NewRequest("GET","https://unavatar.io/github/kikobeats",nil)
239
239
 
240
- req.Header.Set("x-api-key", "YOUR_API_KEY")
240
+ req.Header.Set("x-api-key","YOUR_API_KEY")
241
241
 
242
- resp, _ := http.DefaultClient.Do(req)
242
+ resp,_:=http.DefaultClient.Do(req)
243
243
 
244
- defer resp.Body.Close()
244
+ deferresp.Body.Close()
245
245
 
246
246
  }
247
247
  ```
248
248
 
249
249
  ```ruby
250
- require 'net/http'
250
+ require'net/http'
251
251
 
252
- require 'uri'
252
+ require'uri'
253
253
 
254
- uri = URI('https://unavatar.io/github/kikobeats')
254
+ uri=URI('https://unavatar.io/github/kikobeats')
255
255
 
256
- request = Net::HTTP::Get.new(uri)
256
+ request=Net::HTTP::Get.new(uri)
257
257
 
258
- request['x-api-key'] = 'YOUR_API_KEY'
258
+ request['x-api-key']='YOUR_API_KEY'
259
259
 
260
- response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
260
+ response=Net::HTTP.start(uri.hostname,uri.port,use_ssl:true)do|http|
261
261
 
262
- http.request(request)
262
+ http.request(request)
263
263
 
264
264
  end
265
265
  ```
266
266
 
267
267
  ```php
268
- $ch = curl_init('https://unavatar.io/github/kikobeats');
268
+ $ch=curl_init('https://unavatar.io/github/kikobeats');
269
269
 
270
- curl_setopt($ch, CURLOPT_HTTPHEADER, [
270
+ curl_setopt($ch,CURLOPT_HTTPHEADER,[
271
271
 
272
- 'x-api-key: YOUR_API_KEY',
272
+ 'x-api-key: YOUR_API_KEY',
273
273
 
274
274
  ]);
275
275
 
276
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
276
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
277
277
 
278
- $response = curl_exec($ch);
278
+ $response=curl_exec($ch);
279
279
 
280
280
  curl_close($ch);
281
281
  ```
@@ -291,13 +291,13 @@ Rate limit status can be verified using these response headers:
291
291
  | `x-rate-limit-reset` | UTC epoch seconds when the current window resets |
292
292
 
293
293
  ```bash
294
- $ curl -I https://unavatar.io/github/kikobeats
294
+ $curl-Ihttps://unavatar.io/github/kikobeats
295
295
 
296
- x-rate-limit-limit: 25
296
+ x-rate-limit-limit:25
297
297
 
298
- x-rate-limit-remaining: 24
298
+ x-rate-limit-remaining:24
299
299
 
300
- x-rate-limit-reset: 1744243200
300
+ x-rate-limit-reset:1744243200
301
301
  ```
302
302
 
303
303
  ### Secret keys
@@ -307,85 +307,85 @@ Secret keys (`sk_`) are meant for server-side use only — never expose them pub
307
307
  Pass them via the `x-api-key` header:
308
308
 
309
309
  ```html
310
- ![](https://unavatar.io/github/kikobeats)
310
+ <imgsrc="https://unavatar.io/github/kikobeats"/>
311
311
  ```
312
312
 
313
313
  ```bash
314
- curl "https://unavatar.io/github/kikobeats" -H "x-api-key: sk_YOUR_SECRET_KEY"
314
+ curl"https://unavatar.io/github/kikobeats"-H"x-api-key: sk_YOUR_SECRET_KEY"
315
315
  ```
316
316
 
317
317
  ```javascript
318
- await fetch('https://unavatar.io/github/kikobeats', {
318
+ awaitfetch('https://unavatar.io/github/kikobeats',{
319
319
 
320
- headers: {
320
+ headers:{
321
321
 
322
- 'x-api-key': 'sk_YOUR_SECRET_KEY'
322
+ 'x-api-key':'sk_YOUR_SECRET_KEY'
323
323
 
324
- }
324
+ }
325
325
 
326
326
  })
327
327
  ```
328
328
 
329
329
  ```python
330
- import requests
330
+ importrequests
331
331
 
332
- response = requests.get(
332
+ response=requests.get(
333
333
 
334
- 'https://unavatar.io/github/kikobeats',
334
+ 'https://unavatar.io/github/kikobeats',
335
335
 
336
- headers={'x-api-key': 'sk_YOUR_SECRET_KEY'}
336
+ headers={'x-api-key':'sk_YOUR_SECRET_KEY'}
337
337
 
338
338
  )
339
339
  ```
340
340
 
341
341
  ```golang
342
- package main
342
+ packagemain
343
343
 
344
- import "net/http"
344
+ import"net/http"
345
345
 
346
- func main() {
346
+ funcmain(){
347
347
 
348
- req, _ := http.NewRequest("GET", "https://unavatar.io/github/kikobeats", nil)
348
+ req,_:=http.NewRequest("GET","https://unavatar.io/github/kikobeats",nil)
349
349
 
350
- req.Header.Set("x-api-key", "sk_YOUR_SECRET_KEY")
350
+ req.Header.Set("x-api-key","sk_YOUR_SECRET_KEY")
351
351
 
352
- resp, _ := http.DefaultClient.Do(req)
352
+ resp,_:=http.DefaultClient.Do(req)
353
353
 
354
- defer resp.Body.Close()
354
+ deferresp.Body.Close()
355
355
 
356
356
  }
357
357
  ```
358
358
 
359
359
  ```ruby
360
- require 'net/http'
360
+ require'net/http'
361
361
 
362
- require 'uri'
362
+ require'uri'
363
363
 
364
- uri = URI('https://unavatar.io/github/kikobeats')
364
+ uri=URI('https://unavatar.io/github/kikobeats')
365
365
 
366
- request = Net::HTTP::Get.new(uri)
366
+ request=Net::HTTP::Get.new(uri)
367
367
 
368
- request['x-api-key'] = 'sk_YOUR_SECRET_KEY'
368
+ request['x-api-key']='sk_YOUR_SECRET_KEY'
369
369
 
370
- response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
370
+ response=Net::HTTP.start(uri.hostname,uri.port,use_ssl:true)do|http|
371
371
 
372
- http.request(request)
372
+ http.request(request)
373
373
 
374
374
  end
375
375
  ```
376
376
 
377
377
  ```php
378
- $ch = curl_init('https://unavatar.io/github/kikobeats');
378
+ $ch=curl_init('https://unavatar.io/github/kikobeats');
379
379
 
380
- curl_setopt($ch, CURLOPT_HTTPHEADER, [
380
+ curl_setopt($ch,CURLOPT_HTTPHEADER,[
381
381
 
382
- 'x-api-key: sk_YOUR_SECRET_KEY',
382
+ 'x-api-key: sk_YOUR_SECRET_KEY',
383
383
 
384
384
  ]);
385
385
 
386
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
386
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
387
387
 
388
- $response = curl_exec($ch);
388
+ $response=curl_exec($ch);
389
389
 
390
390
  curl_close($ch);
391
391
  ```
@@ -397,7 +397,7 @@ Publishable keys (`pk_`) are safe to use in client-side code. They can **only**
397
397
  Pass them as a `token` query parameter, which makes them easy to use directly in HTML markup:
398
398
 
399
399
  ```html
400
- ![](https://unavatar.io/github/kikobeats?token=pk_YOUR_PUBLISHABLE_KEY)
400
+ <imgsrc="https://unavatar.io/github/kikobeats?token=pk_YOUR_PUBLISHABLE_KEY"/>
401
401
  ```
402
402
 
403
403
  ### Domain restrictions
@@ -433,13 +433,13 @@ Every request has a cost in tokens (**\$0.010 per token**) based on the proxy ti
433
433
  The proxy tier used is returned in the `x-proxy-tier` response header, and the total cost in the `x-unavatar-cost` header.
434
434
 
435
435
  ```bash
436
- $ curl -I -H "x-api-key: sk_YOUR_SECRET_KEY" https://unavatar.io/instagram/kikobeats
436
+ $curl-I-H"x-api-key: sk_YOUR_SECRET_KEY"https://unavatar.io/instagram/kikobeats
437
437
 
438
- x-pricing-tier: pro
438
+ x-pricing-tier:pro
439
439
 
440
- x-proxy-tier: origin
440
+ x-proxy-tier:origin
441
441
 
442
- x-unavatar-cost: 1
442
+ x-unavatar-cost:1
443
443
  ```
444
444
 
445
445
  To upgrade, visit [unavatar.io/checkout](https://unavatar.io/checkout). After completing the payment, you'll receive an API key.
@@ -469,11 +469,11 @@ To check the cache status in real requests, inspect these response headers:
469
469
  | `cache-control` | Shows cache policy and effective TTL (for example `public, max-age=3600` for `ttl=1h`). |
470
470
 
471
471
  ```bash
472
- $ curl -I -H "x-api-key: sk_YOUR_SECRET_KEY" "https://unavatar.io/github/kikobeats?ttl=1h"
472
+ $curl-I-H"x-api-key: sk_YOUR_SECRET_KEY""https://unavatar.io/github/kikobeats?ttl=1h"
473
473
 
474
- cache-control: public, max-age=3600
474
+ cache-control:public,max-age=3600
475
475
 
476
- x-cache-status: HIT
476
+ x-cache-status:HIT
477
477
  ```
478
478
 
479
479
  The same rule applies to anonymous requests: cache hits are free and do not consume the `25 requests/day` limit.
@@ -1170,21 +1170,21 @@ These headers help you understand pricing, limits, and request diagnostics.
1170
1170
  | `retry-after` | Seconds until rate limit resets (only on 429 responses) |
1171
1171
 
1172
1172
  ```bash
1173
- $ curl -I -H "x-api-key: sk_YOUR_SECRET_KEY" https://unavatar.io/github/kikobeats
1173
+ $curl-I-H"x-api-key: sk_YOUR_SECRET_KEY"https://unavatar.io/github/kikobeats
1174
1174
 
1175
- x-pricing-tier: pro
1175
+ x-pricing-tier:pro
1176
1176
 
1177
- x-timestamp: 1744209600
1177
+ x-timestamp:1744209600
1178
1178
 
1179
- x-unavatar-cost: 1
1179
+ x-unavatar-cost:1
1180
1180
 
1181
- x-proxy-tier: origin
1181
+ x-proxy-tier:origin
1182
1182
 
1183
- x-rate-limit-limit: 50
1183
+ x-rate-limit-limit:50
1184
1184
 
1185
- x-rate-limit-remaining: 49
1185
+ x-rate-limit-remaining:49
1186
1186
 
1187
- x-rate-limit-reset: 1744243200
1187
+ x-rate-limit-reset:1744243200
1188
1188
  ```
1189
1189
 
1190
1190
  ## Response Errors
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@unavatar/core",
3
3
  "description": "Get unified user avatar from social networks, including Instagram, SoundCloud, Telegram, Twitter, YouTube & more.",
4
4
  "homepage": "https://unavatar.io",
5
- "version": "3.45.12",
5
+ "version": "3.45.14",
6
6
  "main": "src/index.js",
7
7
  "exports": {
8
8
  ".": "./src/index.js",
@@ -143,7 +143,7 @@
143
143
  "ms": "~2.1.3",
144
144
  "p-any": "~3.0.0",
145
145
  "p-timeout": "~4.1.0",
146
- "puppeteer": "~25.2.0",
146
+ "puppeteer": "~25.3.0",
147
147
  "re2": "~1.25.0",
148
148
  "srcset": "~4.0.0",
149
149
  "stable-regex": "~1.0.1",