Ir al contenido

Shoutout

Genera un mensaje de promoción con la categoría reciente y el enlace del canal objetivo. Consulta la API de Twitch en cada petición (sin caché KV como followage).

GEThttps://ttv.losperris.dev/api/shoutout
AutenticaciónTodos los endpoints requieren el parámetro apiKey en la query. Obtén la tuya desde el panel.
ParámetroTipoRequeridoDescripción
channelStringCanal donde se ejecuta el comando.
touserStringStreamer a promocionar.
apiKeyStringClave de API de tu cuenta.
templateStringNoPlantilla con {user}, {game} y {url}.
curl --request GET \
  --url 'https://ttv.losperris.dev/api/shoutout?channel=losperris&touser=ninja&apiKey=TU_API_KEY' \
  --header 'Accept: text/plain'
curl -i --request GET \
  --url 'https://ttv.losperris.dev/api/shoutout?channel=losperris&touser=ninja&apiKey=TU_API_KEY' \
  --header 'Accept: text/plain'
https://ttv.losperris.dev/api/shoutout?channel=losperris&touser=ninja&apiKey=TU_API_KEY

Añade template para controlar el mensaje. Placeholders: {user}, {game} y {url}.

curl --request GET \
  --url 'https://ttv.losperris.dev/api/shoutout?channel=losperris&touser=ninja&apiKey=TU_API_KEY&template=Sigue+a+%7Buser%7D%2C+jugaba+%7Bgame%7D%3A+%7Burl%7D' \
  --header 'Accept: text/plain'
curl -i --request GET \
  --url 'https://ttv.losperris.dev/api/shoutout?channel=losperris&touser=ninja&apiKey=TU_API_KEY&template=Sigue+a+%7Buser%7D%2C+jugaba+%7Bgame%7D%3A+%7Burl%7D' \
  --header 'Accept: text/plain'
https://ttv.losperris.dev/api/shoutout?channel=losperris&touser=ninja&apiKey=TU_API_KEY&template=Sigue+a+%7Buser%7D%2C+jugaba+%7Bgame%7D%3A+%7Burl%7D
¡Vayan a seguir a ninja! Estaba jugando Fortnite
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

¡Vayan a seguir a ninja! Estaba jugando Fortnite
Canal no encontrado.
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

Canal no encontrado.
Error de autenticación. Clave API inválida o expirada. Regenerala o pide ayuda a Ponss 🦆
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

Error de autenticación. Clave API inválida o expirada. Regenerala o pide ayuda a Ponss 🦆
(sin contenido)
HTTP/1.1 429 Too Many Requests
Content-Type: text/plain; charset=utf-8
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

Restringe el comando a moderadores o al streamer en la configuración del bot.

!addcom !so $(urlfetch https://ttv.losperris.dev/api/shoutout?channel=$(channel)&touser=$(touser)&apiKey=TU_API_KEY)