Observed since 20 Oct, 19:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Wrapper Node.JS autour de l'API 2sucres
yarn add 2sucres-api
const apiFactory = require('2sucres-api')
const api = apiFactory(cookies, csrfToken)
const TOPIC_ID = 1
const MESSAGE_ID = 1
/**
* Récupère le nombre de messages d'un topic
* et l'indique dans le message original du topic
*/
async function run () {
const topic = await api.getTopic(TOPIC_ID)
const messageCount = topic.messageCount
await api.editMessage(MESSAGE_ID, `Le topic contient ${messageCount} message(s)`)
}
run().catch(err => {
// global error handling
console.error(err.stack)
process.exit(1)
})
Supprime les notifications
Supprime un topic
Édite un message
messageRécupère les informations d'un message par son id
Array.<message>Retourne la liste des messages d'une page d'un topic
Récupère la liste des notifications
Récupère la fin du topic
topicRécupère les informations d'un topic
Array.<topic>Récupère la liste des topics
Lock un topic
Poste un message
Poste un topic
Délock un topic
Met à jour le titre d'un topic
Supprime les notifications
Supprime un topic
Kind: global function
| Param | Type |
|---|---|
| topicId | number |
Édite un message
Kind: global function
| Param | Type |
|---|---|
| messageId | number |
| content | string |
messageRécupère les informations d'un message par son id
Kind: global function
| Param | Type |
|---|---|
| messageId | number |
Array.<message>Retourne la liste des messages d'une page d'un topic
Kind: global function
| Param | Type | Default |
|---|---|---|
| topicId | number | |
| page | number | 1 |
Récupère la liste des notifications
Kind: global function
| Param | Type | Default | Description |
|---|---|---|---|
| clear | boolean | false | si vrai, supprime les notifications après les avoir récupérées |
Récupère la fin du topic
Kind: global function
| Param | Type |
|---|---|
| topicId | number |
topicRécupère les informations d'un topic
Kind: global function
| Param | Type | Default |
|---|---|---|
| topicId | number | |
| page | number | 1 |
Array.<topic>Récupère la liste des topics
Kind: global function
| Param | Type | Default |
|---|---|---|
| page | number | 1 |
| forumId | number | 1 |
Lock un topic
Kind: global function
| Param | Type |
|---|---|
| topicId | number |
Poste un message
Kind: global function
| Param | Type |
|---|---|
| topicId | number |
| content | string |
Poste un topic
Kind: global function
| Param | Type |
|---|---|
| title | string |
| content | string |
| options | object |
Délock un topic
Kind: global function
| Param | Type |
|---|---|
| topicId | number |
Met à jour le titre d'un topic
Kind: global function
| Param | Type |
|---|---|
| topicId | number |
| title | string |
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:7b8555c94d8f22fda80a4dc0d7ee8dd74864b3ead73a90738dad9ead8d2c9a39