This repository was archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Comunicaciones internas
Alejandro González Hevia edited this page Feb 23, 2021
·
8 revisions
| Nombre | Descripcion | Topico | Key | Message | Emisor | Receptor(es) |
|---|---|---|---|---|---|---|
| topics | Topicos detectados por el sistema de topic modeling | topics | <id_post> | ["topic_a", "topic_b"] | topicmodelingservice | PostsService |
| offensive | Respuesta del sistema de detección de texto ofensivo | offensive_text | <id_post> | true|false | offensivetextdetectionservice | PostsService |
| lang_detection | Respuesta del sistema de detección de idioma | lang_detection | <id_post> | "idioma (ISO Code)" | langdetectionservice | PostsService |
| new_post | Notificacion de que se ha creado un nuevo post | post | <id_post> | "texto del post" | PostsService | lang/topics/offensive services |
| logging | Envio de logs | service_logs | <nombre_servicio_emisor> | "el log a enviar" | Todos los Servicios | logstash |
/soap/addPost
idioma: "es"
/soap/addRegisteredUser
TODO: ver después
/soap/addCreatedChat
/soap/addFollow
follower: <id_usuario_follower>, // el que sigue
followee: <id_usuario_followee> // al que le siguen
GET: /api/posts
- Limit (int): Numero de resultados por consulta (default=10)
- Offset (int): A partir de qué post se devuelve resultado (default=0)
- User (long): ID del usuario del que queremos obtener los posts
- Language (string): String del lenguaje de los posts a obtener
{
“links”: {
“self”: “url_actual”,
“first”: “url_primeros_elementos”,
“prev”: “url_pagina_anterior”,
“next”: “url_pagina_siguiente”,
“last”: “url_ultima_pagina”
},
“count”: 10,
“total”: 500,
“posts”: [
{
id: 1,
content: “”,
language: “en”,
topics: [
“topic_a”, “other topic”, “sample”
],
is_offensive: false,
likes: 150,
user: <id_usuario_autor>
},
…
{
id: 10,
…
}
]
}
GET: /api/posts/
{
id: 1,
content: “”,
language: “en”,
topics: [
“topic_a”, “other topic”, “sample”
],
is_offensive: false,
likes: 150,
user: <id_usuario_autor>
}
POST: /api/posts
Los campos de idioma, id, topics, is_offensive y likes los crea automáticamente el servicio, por lo que no hace falta introducir mucha info aquí.
{
content: “”,
user: <id_usuario_autor>
}
202 - Created
DELETE: /api/posts/
Código deleted
GET: /api/statistics
{
"registeredUsers": {
"total": 11,
"learning": {
"en": 6,
"es": 7
},
"native": {
"es": 10,
"ru": 1
}
},
"createdPosts": {
"total": 100,
"en": 5,
"es": 6,
...
},
"createdChats": 7
}
GET: /api/users/<id>/statistics
"createdPosts": {
"total": 100,
"en": 5,
"es": 6,
...
},
"numFollowing": 10,
"numFollowers": 5
"translationsMade": 20,
"textToSpeechMade": 10
POST: /api/translation
{
“from”: “<codigo-idioma>”,
“to”: “<codigo-idioma>”,
“text”: “texto a traducir”
}
{
“from”: “<codigo-idioma>”,
“to”: “<codigo-idioma>”,
“original”: “texto original”,
“translation”: “texto traducido”
}
429 - Too Many Requests: Se nos acabó la plata
POST: /api/tts
{
“language”: “<codigo-idioma>”,
“text”: “texto a ttsear”
}
{
“language”: “”
“text”: “”,
“result” “<audio codificado de alguna manera. Depende de la api…>”
}
429 - Too Many Requests Se nos acabó la plata