Ir al contenido

Followage

Consulta la antigüedad del follow de un viewer. La respuesta es texto plano listo para mostrar en el chat.

GEThttps://ttv.losperris.dev/api/followage
AutenticaciónTodos los endpoints requieren el parámetro apiKey en la query. Obtén la tuya desde el panel.
ParámetroTipoRequeridoDescripción
channelStringCanal de Twitch donde se ejecuta el comando.
userStringUsuario cuya antigüedad de follow se consulta.
apiKeyStringClave de API de tu cuenta.
templateStringNoPlantilla personalizada con {user}, {time} y {channel}.

Con cURL o URL la respuesta muestra solo el mensaje. Con cURL -i ves cabeceras HTTP + cuerpo.

curl --request GET \
  --url 'https://ttv.losperris.dev/api/followage?channel=losperris&user=viewer123&apiKey=TU_API_KEY' \
  --header 'Accept: text/plain'
curl -i --request GET \
  --url 'https://ttv.losperris.dev/api/followage?channel=losperris&user=viewer123&apiKey=TU_API_KEY' \
  --header 'Accept: text/plain'
https://ttv.losperris.dev/api/followage?channel=losperris&user=viewer123&apiKey=TU_API_KEY

Añade template para controlar el mensaje del bot. Placeholders: {user}, {time} y {channel}.

curl --request GET \
  --url 'https://ttv.losperris.dev/api/followage?channel=losperris&user=viewer123&apiKey=TU_API_KEY&template=%7Buser%7D+lleva+%7Btime%7D+siguiendo+a+%7Bchannel%7D' \
  --header 'Accept: text/plain'
curl -i --request GET \
  --url 'https://ttv.losperris.dev/api/followage?channel=losperris&user=viewer123&apiKey=TU_API_KEY&template=%7Buser%7D+lleva+%7Btime%7D+siguiendo+a+%7Bchannel%7D' \
  --header 'Accept: text/plain'
https://ttv.losperris.dev/api/followage?channel=losperris&user=viewer123&apiKey=TU_API_KEY&template=%7Buser%7D+lleva+%7Btime%7D+siguiendo+a+%7Bchannel%7D
viewer123 ha seguido a losperris por 2 años y 3 meses.
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

viewer123 ha seguido a losperris por 2 años y 3 meses.
viewer123 no sigue a losperris.
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

viewer123 no sigue a losperris.
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

Copia el comando según tu bot y reemplaza TU_API_KEY. Requiere permisos de moderador en el chat de Twitch.

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