Followage
Consulta la antigüedad del follow de un viewer. La respuesta es texto plano listo para mostrar en el chat.
GET
AutenticaciónTodos los endpoints requieren el parámetro https://ttv.losperris.dev/api/followageapiKey en la query. Obtén la tuya desde el panel.
Límites
Sección titulada «Límites»Parámetros
Sección titulada «Parámetros»| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
channel | String | Sí | Canal de Twitch donde se ejecuta el comando. |
user | String | Sí | Usuario cuya antigüedad de follow se consulta. |
apiKey | String | Sí | Clave de API de tu cuenta. |
template | String | No | Plantilla personalizada con {user}, {time} y {channel}. |
Ejemplo de petición
Sección titulada «Ejemplo de petición»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_KEYPlantillas personalizadas
Sección titulada «Plantillas personalizadas»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%7DRespuestas
Sección titulada «Respuestas»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
Integración con bots
Sección titulada «Integración con bots»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)!command add !followage ${customapi.https://ttv.losperris.dev/api/followage?channel=${channel}&user=${touser}&apiKey=TU_API_KEY}!addcmd !followage $(customapi https://ttv.losperris.dev/api/followage?channel=$(channel)&user=$(touser)&apiKey=TU_API_KEY)!command add !followage $(urlfetch https://ttv.losperris.dev/api/followage?channel=$(channel)&user=$(arg_touser)&apiKey=TU_API_KEY){readapi.https://ttv.losperris.dev/api/followage?channel=TU_CANAL&user={touser.name}&apiKey=TU_API_KEY}