SimosNap IRC Network

SimosNap API

Le API pubbliche di SimosNap permettono di leggere statistiche IRC, informazioni sui canali, utenti online, attività, client utilizzati, classifiche Trivia e citazioni raccolte dai bot.

Come usare le API

Gli endpoint restituiscono dati in formato JSON. Nei parametri URL, il carattere # dei canali IRC deve essere codificato come %23. Per esempio #italia diventa %23italia.

I dati disponibili dipendono dalla configurazione del canale, dai servizi attivi e dalle eventuali impostazioni privacy degli utenti.

Canali IRC

Endpoint per leggere statistiche e informazioni pubbliche sui canali.

GET

Statistiche di un canale

Restituisce informazioni generali: utenti presenti, picco massimo, topic, modi e kick totali.

https://www.simosnap.org/rest/service.php/channels/%23[channel]
{
  "channel": "#chatitaly",
  "users": "265",
  "users_max": "629",
  "topic": "...",
  "topic_author": "nickname",
  "topic_time": "2013-01-04 02:09:22",
  "kicks": "8607",
  "modes": "CnrSt"
}
channel topic users
GET

Utenti presenti in un canale

Restituisce l’elenco degli utenti attualmente presenti nel canale con dati pubblici disponibili.

https://www.simosnap.org/rest/service.php/channels/%23[channel]/users
[
  {
    "nickname": "Nick",
    "realname": "Realname",
    "hostname": "host.example",
    "server": "irc.simosnap.com",
    "away": false,
    "client": "IRC client",
    "online": true,
    "country_code": "IT",
    "country": "Italy",
    "cmodes": "+aov"
  }
]
users online cmodes
GET

Attività utenti in un canale

Restituisce le statistiche di attività degli utenti nel canale. Il parametro [type] identifica il periodo.

https://www.simosnap.org/rest/service.php/channels/%23[channel]/activity/[type]
[
  {
    "nickname": "Nick",
    "letters": 945128,
    "words": 135163,
    "lines": 31986,
    "actions": 225,
    "smileys": 806,
    "kicks": 0,
    "modes": 3,
    "topics": 0
  }
]
0 totale 1 giorno 2 settimana 3 mese 4 anno
GET

Attività oraria media

Restituisce un array di valori numerici, uno per ogni ora della giornata.

https://www.simosnap.org/rest/service.php/channels/%23[channel]/hourly/activity/[type]
[65925, 58314, 48660, 38311, 34694, 27469, 24825]
GET

Client IRC utilizzati nel canale

Mostra quali client IRC sono utilizzati dagli utenti presenti nel canale.

https://www.simosnap.org/rest/service.php/channels/%23[channel]/clients
[
  {
    "client": "mIRC v7.27",
    "count": "2"
  }
]
GET

Nazionalità degli utenti

Restituisce una distribuzione per nazione degli utenti presenti nel canale.

https://www.simosnap.org/rest/service.php/channels/%23[channel]/countries
[
  {
    "country": "Italy",
    "country_code": "IT",
    "count": "12"
  }
]

Utenti e nickname

Endpoint per leggere informazioni pubbliche e attività relative agli utenti IRC.

GET

Statistiche su un nickname

Restituisce informazioni pubbliche relative a un nickname IRC.

https://www.simosnap.org/rest/service.php/users/nick/[nick]
{
  "nickname": "lnx85",
  "realname": "lnx85",
  "hostname": "host.example",
  "username": "lnx85",
  "server": "irc.simosnap.com",
  "away": true,
  "online": true,
  "country_code": "IT",
  "country": "Italy",
  "operator": false,
  "helper": false,
  "bot": false,
  "aliases": []
}
GET

Statistiche su nickname registrato

Restituisce dati relativi a un nickname registrato. Va usato il display nick principale del gruppo NickServ.

https://www.simosnap.org/rest/service.php/nickserv/[nick]
GET

Canali associati a un nickname

Mostra i canali in cui il nickname risulta presente o ha avuto attività.

https://www.simosnap.org/rest/service.php/users/nick/[nick]/channels
["#lightirc", "#irchelp"]
GET

Attività di un utente in un canale

Restituisce le metriche di attività del nickname in uno specifico canale IRC.

https://www.simosnap.org/rest/service.php/users/nick/[nick]/activity/%23[channel]
[
  {
    "type": 0,
    "letters": 945128,
    "words": 135163,
    "lines": 31986,
    "actions": 225,
    "smileys": 806,
    "kicks": 0,
    "modes": 3,
    "topics": 0
  }
]

Bot, Trivia e Quote

Endpoint collegati ai bot ufficiali o ai moduli attivi nei canali.

GET

Classifica Trivia di un canale

Restituisce la classifica del Trivia game ufficiale per il canale indicato.

https://www.simosnap.org/rest/trivia.php/trivia/users/%23[channel]
[
  {
    "position": "1",
    "nick": "miele",
    "points": "39730.73",
    "rank": "Onniscente"
  }
]
GET

Citazioni di un canale

Restituisce le citazioni salvate dal Bot Quote. Richiede che il bot Quote sia presente e attivo nel canale.

https://www.simosnap.org/rest/service.php/channel/%23[channel]/quotes
[
  {
    "id": "1",
    "value": "Lorem ipsum dolor sit amet...",
    "value_html": "<span>Lorem ipsum</span>",
    "owner": "lnx85",
    "time": "12345678901",
    "date": "11/06/2017 23:15"
  }
]