### Secret keys - Python example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of using a secret key with Python's requests library to get an avatar. ```python import requests response = requests.get( 'https://unavatar.io/github/kikobeats', headers={'x-api-key': 'sk_YOUR_SECRET_KEY'} ) ``` -------------------------------- ### Publishable keys - HTML example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of using a publishable key directly in HTML markup. ```html Avatar ``` -------------------------------- ### Rate Limit Headers Example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example output of rate limit headers when making a request. ```bash $ curl -I https://unavatar.io/github/kikobeats x-rate-limit-limit: 25 x-rate-limit-remaining: 24 x-rate-limit-reset: 1744243200 ``` -------------------------------- ### Pricing - cURL example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example cURL command to inspect pricing headers for an avatar request. ```bash $ curl -I -H "x-api-key: sk_YOUR_SECRET_KEY" https://unavatar.io/instagram/kikobeats x-pricing-tier: pro x-proxy-tier: origin x-unavatar-cost: 1 ``` -------------------------------- ### HTML Attribution Example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of how to add the attribution link in HTML. ```html [Avatars provided by Unavatar](https://unavatar.io) ``` -------------------------------- ### Secret keys - cURL example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of using a secret key with cURL to fetch an avatar. ```bash curl "https://unavatar.io/github/kikobeats" -H "x-api-key: sk_YOUR_SECRET_KEY" ``` -------------------------------- ### Commit for puppeteer setup Source: https://github.com/microlinkhq/unavatar/blob/master/CHANGELOG.md This snippet shows a commit hash related to puppeteer setup. ```git 2a02c227ad9e6f060a7e7f502e1e73ae72c1f6e0 ``` -------------------------------- ### Example Request and Response Headers Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Demonstrates how to make a request using curl and the expected response headers, including pricing, timestamp, cost, proxy tier, and rate limiting information. ```bash $ curl -I -H "x-api-key: sk_YOUR_SECRET_KEY" https://unavatar.io/github/kikobeats x-pricing-tier: pro x-timestamp: 1744209600 x-unavatar-cost: 1 x-proxy-tier: origin x-rate-limit-limit: 50 x-rate-limit-remaining: 49 x-rate-limit-reset: 1744243200 ``` -------------------------------- ### Get Snapchat Profile Picture Source: https://github.com/microlinkhq/unavatar/blob/master/snapchat.html Example of how to get a Snapchat profile picture using Unavatar. ```javascript import unavatar from "unavatar"; const avatar = unavatar("your_snapchat_username"); console.log(avatar); ``` -------------------------------- ### CLI Examples Source: https://github.com/microlinkhq/unavatar/blob/master/docs/cli/README.md Demonstrates various ways to use the unavatar CLI, including typed input routes, specific provider lookups, and health checks. ```bash # Typed input routes unavatar email/hello@microlink.io unavatar domain/reddit.com # Specific provider unavatar github/kikobeats unavatar x/kikobeats # Health check unavatar ping ``` -------------------------------- ### Get Snapchat Avatar Source: https://github.com/microlinkhq/unavatar/blob/master/snapchat.html Example of how to get a Snapchat avatar image using the unavatar service. ```javascript import unavatar from "@unavatar/node"; const avatar = unavatar("snapchat://user/snapchat_username"); console.log(avatar.url); // => https://unavatar.io/snapchat/snapchat_username ``` -------------------------------- ### Get Snapchat Profile Picture with Options Source: https://github.com/microlinkhq/unavatar/blob/master/snapchat.html Example of how to get a Snapchat profile picture with specific options like size and format. ```javascript import unavatar from "unavatar"; const avatar = unavatar("your_snapchat_username", { size: 256, format: "png" }); console.log(avatar); ``` -------------------------------- ### Get an avatar for a domain Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of retrieving an avatar using a domain name. ```HTTP https://unavatar.io/domain/reddit.com ``` -------------------------------- ### Run the server Source: https://github.com/microlinkhq/unavatar/blob/master/docs/server/README.md Command to start the unavatar HTTP server. ```bash node docs/server/server.js ``` -------------------------------- ### With Options Source: https://github.com/microlinkhq/unavatar/blob/master/test/unit/providers/tiktok.html Example demonstrating how to use the TikTok provider with additional options like size and format. ```javascript import unavatar from "unavatar"; const avatarUrl = await unavatar("tiktok.com/@username", { size: 256, format: "png" }); console.log(avatarUrl); ``` -------------------------------- ### Get an avatar for an email Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of retrieving an avatar using an email address. ```HTTP https://unavatar.io/email/hello@microlink.io ``` -------------------------------- ### Basic Usage Source: https://github.com/microlinkhq/unavatar/blob/master/test/unit/providers/tiktok.html Example of how to use the TikTok provider to get a user's avatar. ```javascript import unavatar from "unavatar"; const avatarUrl = await unavatar("tiktok.com/@username"); console.log(avatarUrl); ``` -------------------------------- ### Get an avatar for a username Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of retrieving an avatar using a username from a specific provider. ```HTTP https://unavatar.io/github/kikobeats ``` -------------------------------- ### Snapchat Avatar URL Source: https://github.com/microlinkhq/unavatar/blob/master/snapchat.html Example of how to get a Snapchat avatar URL. ```javascript import unavatar from "@unavatar/node"; const avatar = unavatar("snapchat:username"); console.log(avatar); ``` -------------------------------- ### Secret keys - Go example Source: https://github.com/microlinkhq/unavatar/blob/master/README.md Example of using a secret key with Go's net/http package to fetch an avatar. ```golang package main import "net/http" func main() { req, _ := http.NewRequest("GET", "https://unavatar.io/github/kikobeats", nil) req.Header.Set("x-api-key", "sk_YOUR_SECRET_KEY") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() } ``` -------------------------------- ### Providers helper example Source: https://github.com/microlinkhq/unavatar/blob/master/docs/library/README.md Example demonstrating how to use the providers helper to list, group, detect, and iterate over providers. ```bash node docs/library/providers.js ``` -------------------------------- ### Snapchat Avatar Source: https://github.com/microlinkhq/unavatar/blob/master/snapchat.html Example of how to get a Snapchat avatar using Unavatar. ```html Bill Gates Snapchat Avatar ```