Observed since 20 Oct, 19:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2sucres-api
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.
| Package / target | Requirement | Relationship |
|---|---|---|
lodashEnvironment{
"local_name": "lodash",
"alias": false,
"peer_metadata": null
} | ^4.17.11 | runtime |
owEnvironment{
"local_name": "ow",
"alias": false,
"peer_metadata": null
} | ^0.8.0 | runtime |
chaiEnvironment{
"local_name": "chai",
"alias": false,
"peer_metadata": null
} | ^4.2.0 | development |
eslintEnvironment{
"local_name": "eslint",
"alias": false,
"peer_metadata": null
} | ^5.10.0 | development |
eslint-config-standardEnvironment{
"local_name": "eslint-config-standard",
"alias": false,
"peer_metadata": null
} | ^12.0.0 | development |
eslint-plugin-importEnvironment{
"local_name": "eslint-plugin-import",
"alias": false,
"peer_metadata": null
} | ^2.14.0 | development |
eslint-plugin-nodeEnvironment{
"local_name": "eslint-plugin-node",
"alias": false,
"peer_metadata": null
} | ^8.0.0 | development |
eslint-plugin-promiseEnvironment{
"local_name": "eslint-plugin-promise",
"alias": false,
"peer_metadata": null
} | ^4.0.1 | development |
eslint-plugin-standardEnvironment{
"local_name": "eslint-plugin-standard",
"alias": false,
"peer_metadata": null
} | ^4.0.0 | development |
jsdoc-to-markdownEnvironment{
"local_name": "jsdoc-to-markdown",
"alias": false,
"peer_metadata": null
} | ^4.0.1 | development |
leasotEnvironment{
"local_name": "leasot",
"alias": false,
"peer_metadata": null
} | ^6.6.2 | development |
mochaEnvironment{
"local_name": "mocha",
"alias": false,
"peer_metadata": null
} | ^5.2.0 | development |
pre-commitEnvironment{
"local_name": "pre-commit",
"alias": false,
"peer_metadata": null
} | ^1.2.2 | development |
Source distribution
{
"shasum": "448a37e6111b0bd4e501f40e0c2bb4396654cbc2",
"integrity": "sha512-Nzf4WdFFRoZiIo0NaQvNTqn/jAccVj9UsXz0kzTpMgz73+L71awyrA7wNZ7MxIbm/J7WuQPvBUQrMxVnSFi7IA==",
"tarball": "https://registry.npmjs.org/2sucres-api/-/2sucres-api-1.0.2.tgz",
"fileCount": 34,
"unpackedSize": 263274,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGXMvCRA9TVsSAnZWagAAmH4P/3FsofAaIRl/urRZyZmd\n5kwPGjnSZaAa89J8PFqBRoWLGqzHLymmmoqqzSb3ShzpdKemNlYYHC1rv3wU\n+x+2iKPF+pE0QjLxQKnZbmip4I3Eqo6khA99gWmaHOt99L9Mn8OzKST+7c2S\njYcy/I0cf5M/iiuAaTmFRDrSaTx1gJ4rZ22MiLzv2p3fm3a2SpST1KQdreUr\nA8rWuNyL8lp9DET1Ex8oroCIA6hh97iC4Eice1s6dRaFTq0VceXncOLu0Vm6\n5KrHVRjQY29EM3R4qT6GZq9NijNMsMA7pqlJCPLTrDS7kylpwkLrh1pA2SlD\nwB///NpOmfQI7vp8hGrbQ7orvSmIvs1V7PHzcN6NRjVbrs3tcNWsd2WCwhNs\nKmQplUC/32YEVmN7+XVAhhjUjp5lytFPPo4MB3QNPuSoeulWgwz1FzMu85aH\nFeZg775jYdbWJbPlaqbG5U5R97EuT3nI5RGNApDWBQsZD5ebBJzCvtzF4xcV\nDjIWsae5sBx057hgsws4G4BCT/gdDfBeNJTSbwC+Uoo8QDNv3AIDRtjiEDYD\n8lYw5P/HNVD4aoCSYqivZSBfcL9U+uxCvBDBMuhxFeNI6AXT/Y9E7XDk/FYK\nVyuhP6wT0EZ3B+oQ2yYak1tCpzjy7Ni7OWTDiJco3ppuwyIZ/WnVNSEvLQB6\n7xsm\r\n=Ox76\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQCxZLrz5GfbZV9tT69JjQFF69CRxXAPV6rN/c//+Db7oQIhAMXHLcwsCu7yIUlhyK03HavmXysBVC0a6G5lQlHGR89T"
}
]
}Observed since 20 Oct, 19:19 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:e0485de0ec2330a8d2e716be11b0c77dfd56e97c45cf70c04e8f546f6492282c