FastComments.com

FastComments Rust SDK


Ceci est le SDK Rust officiel pour FastComments.

SDK Rust officiel pour l'API FastComments

Dépôt

Voir sur GitHub


Installation Internal Link

cargo add fastcomments-sdk

Le SDK nécessite l'édition Rust 2021 ou une version ultérieure.

Contenu de la bibliothèque Internal Link

Le FastComments Rust SDK se compose de plusieurs modules :

  • Client Module - Client d'API généré automatiquement pour les FastComments REST APIs

    • Définitions complètes des types pour tous les modèles d'API
    • Points de terminaison authentifiés (DefaultApi) et publics (PublicApi)
    • Prise en charge complète d'async/await avec tokio
    • Voir client/README.md pour la documentation détaillée de l'API
  • SSO Module - Utilitaires Single Sign-On côté serveur

    • Génération sécurisée de jetons pour l'authentification des utilisateurs
    • Prise en charge des modes SSO simple et sécurisé
    • Signature de jetons basée sur HMAC-SHA256
  • Core Types - Définitions de types et utilitaires partagés

    • Modèles de commentaires et structures de métadonnées
    • Configurations des utilisateurs et des locataires
    • Fonctions utilitaires pour les opérations courantes

Démarrage rapide Internal Link

Utilisation de l'API publique

use fastcomments_sdk::client::apis::configuration::Configuration;
use fastcomments_sdk::client::apis::public_api;

#[tokio::main]
async fn main() {
    // Crée la configuration de l'API
    let config = Configuration::new();

    // Récupérer les commentaires d'une page
    let result = public_api::get_comments_public(
        &config,
        public_api::GetCommentsPublicParams {
            tenant_id: "your-tenant-id".to_string(),
            urlid: Some("page-url-id".to_string()),
            url: None,
            count_only: None,
            skip: None,
            limit: None,
            sort_dir: None,
            page: None,
            sso_hash: None,
            simple_sso_hash: None,
            has_no_comment: None,
            has_comment: None,
            comment_id_filter: None,
            child_ids: None,
            start_date_time: None,
            starts_with: None,
        },
    )
    .await;

    match result {
        Ok(response) => {
            println!("Found {} comments", response.comments.len());
            for comment in response.comments {
                println!("Comment: {:?}", comment);
            }
        }
        Err(e) => eprintln!("Error fetching comments: {:?}", e),
    }
}

Utilisation de l'API authentifiée

use fastcomments_sdk::client::apis::configuration::{ApiKey, Configuration};
use fastcomments_sdk::client::apis::default_api;

#[tokio::main]
async fn main() {
    // Créer la configuration avec la clé API
    let mut config = Configuration::new();
    config.api_key = Some(ApiKey {
        prefix: None,
        key: "your-api-key".to_string(),
    });

    // Récupérer les commentaires en utilisant l'API authentifiée
    let result = default_api::get_comments(
        &config,
        default_api::GetCommentsParams {
            tenant_id: "your-tenant-id".to_string(),
            skip: None,
            limit: None,
            sort_dir: None,
            urlid: Some("page-url-id".to_string()),
            url: None,
            is_spam: None,
            user_id: None,
            all_comments: None,
            for_moderation: None,
            parent_id: None,
            is_flagged: None,
            is_flagged_tag: None,
            is_by_verified: None,
            is_pinned: None,
            asc: None,
            include_imported: None,
            origin: None,
            tags: None,
        },
    )
    .await;

    match result {
        Ok(response) => {
            println!("Total comments: {}", response.count);
            for comment in response.comments {
                println!("Comment ID: {}, Text: {}", comment.id, comment.comment);
            }
        }
        Err(e) => eprintln!("Error: {:?}", e),
    }
}

Utilisation du SSO pour l'authentification

use fastcomments_sdk::sso::{
    fastcomments_sso::FastCommentsSSO,
    secure_sso_user_data::SecureSSOUserData,
};

fn main() {
    let api_key = "your-api-key".to_string();

    // Créer les données utilisateur SSO sécurisées (côté serveur seulement !)
    let user_data = SecureSSOUserData::new(
        "user-123".to_string(),           // ID de l'utilisateur
        "user@example.com".to_string(),   // Courriel
        "John Doe".to_string(),            // Nom d'utilisateur
        "https://example.com/avatar.jpg".to_string(), // URL de l'avatar
    );

    // Générer le jeton SSO
    let sso = FastCommentsSSO::new_secure(api_key, &user_data).unwrap();
    let token = sso.create_token().unwrap();

    println!("SSO Token: {}", token);
    // Transmettez ce jeton à votre frontend pour l'authentification
}

Problèmes courants Internal Link

401 Unauthorized Errors

If you're getting 401 errors when using the authenticated API:

  1. Vérifiez votre clé API : Assurez-vous d'utiliser la bonne clé API depuis votre FastComments dashboard
  2. Vérifiez l'ID du locataire : Assurez-vous que l'ID du locataire correspond à votre compte
  3. Format de la clé API : La clé API doit être fournie dans la Configuration :
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
    prefix: None,
    key: "YOUR_API_KEY".to_string(),
});

SSO Token Issues

If SSO tokens aren't working:

  1. Utilisez le mode sécurisé en production : Utilisez toujours FastCommentsSSO::new_secure() avec votre clé API en production
  2. Côté serveur uniquement : Générez les jetons SSO sur votre serveur, n'exposez jamais votre clé API aux clients
  3. Vérifiez les données utilisateur : Assurez-vous que tous les champs requis (id, email, username) sont fournis

Async Runtime Errors

The SDK uses tokio for async operations. Make sure to:

  1. Add tokio to your dependencies:

    [dependencies]
    tokio = { version = "1", features = ["full"] }
  2. Use the tokio runtime:

    #[tokio::main]
    async fn main() {
     // Votre code asynchrone ici
    }

Remarques Internal Link

IDs de diffusion

Vous verrez qu'il faut passer un broadcastId dans certains appels d'API. Quand vous recevrez des événements, vous obtiendrez ce même ID en retour, ce qui vous permet d'ignorer l'événement si vous prévoyez d'appliquer les changements de façon optimiste côté client (ce que vous voudrez probablement faire, car cela offre la meilleure expérience). Passez un UUID ici. L'ID doit être suffisamment unique pour ne pas apparaître deux fois lors d'une session de navigateur.

Agréger Internal Link

Aggrège des documents en les regroupant (si groupBy est fourni) et en appliquant plusieurs opérations. Différentes opérations (p. ex. sum, countDistinct, avg, etc.) sont prises en charge.

Paramètres

Nom Type Requis Description
tenant_id String Oui
aggregation_request models::AggregationRequest Oui
parent_tenant_id String Non
include_stats bool Non

Réponse

Renvoie: AggregationResponse


Obtenir les journaux d'audit Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
limit f64 Non
skip f64 Non
order models::SortDir Non
after f64 Non
before f64 Non

Réponse

Renvoie : GetAuditLogs200Response


Bloquer depuis un commentaire (public) Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
comment_id String Oui
public_block_from_comment_params models::PublicBlockFromCommentParams Oui
sso String Non

Réponse

Renvoie : BlockFromCommentPublic200Response


Débloquer un commentaire (public) Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
public_block_from_comment_params models::PublicBlockFromCommentParams Oui
sso String Non

Réponse

Renvoie: UnBlockCommentPublic200Response

Vérifier les commentaires bloqués Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
comment_ids String Oui
sso String Non

Réponse

Renvoie: CheckedCommentsForBlocked200Response


Bloquer un utilisateur depuis un commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
block_from_comment_params models::BlockFromCommentParams Oui
user_id String Non
anon_user_id String Non

Réponse

Renvoie : BlockFromCommentPublic200Response


Créer un commentaire (public) Internal Link

Paramètres

Name Type Obligatoire Description
tenant_id String Oui
url_id String Oui
broadcast_id String Oui
comment_data models::CommentData Oui
session_id String Non
sso String Non

Réponse

Renvoie: CreateCommentPublic200Response


Supprimer un commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
context_user_id String Non
is_live bool Non

Réponse

Renvoie: DeleteComment200Response


Supprimer un commentaire (public) Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
broadcast_id String Oui
edit_key String Non
sso String Non

Réponse

Renvoie : DeleteCommentPublic200Response

Supprimer un vote de commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
comment_id String Oui
vote_id String Oui
url_id String Oui
broadcast_id String Oui
edit_key String Non
sso String Non

Réponse

Renvoie : DeleteCommentVote200Response


Signaler un commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
user_id String Non
anon_user_id String Non

Réponse

Renvoie : FlagComment200Response


Obtenir un commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: GetComment200Response


Obtenir le texte du commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
edit_key String Non
sso String Non

Réponse

Retourne : GetCommentText200Response


Obtenir les noms des utilisateurs ayant voté sur le commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
comment_id String Oui
dir i32 Oui
sso String Non

Réponse

Retourne: GetCommentVoteUserNames200Response


Obtenir des commentaires Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
page i32 Non
limit i32 Non
skip i32 Non
as_tree bool Non
skip_children i32 Non
limit_children i32 Non
max_tree_depth i32 Non
url_id String Non
user_id String Non
anon_user_id String Non
context_user_id String Non
hash_tag String Non
parent_id String Non
direction models::SortDirections Non

Réponse

Retourne: GetComments200Response


Obtenir des commentaires (publics) Internal Link

req tenantId urlId

Paramètres

Nom Type Requis Description
tenant_id String Oui
url_id String Oui
page i32 Non
direction models::SortDirections Non
sso String Non
skip i32 Non
skip_children i32 Non
limit i32 Non
limit_children i32 Non
count_children bool Non
fetch_page_for_comment_id String Non
include_config bool Non
count_all bool Non
includei10n bool Non
locale String Non
modules String Non
is_crawler bool Non
include_notification_count bool Non
as_tree bool Non
max_tree_depth i32 Non
use_full_translation_ids bool Non
parent_id String Non
search_text String Non
hash_tags Vec Non
user_id String Non
custom_config_str String Non
after_comment_id String Non
before_comment_id String Non

Réponse

Renvoie: GetCommentsPublic200Response


Verrouiller un commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
comment_id String Oui
broadcast_id String Oui
sso String Non

Réponse

Retourne: LockComment200Response


Épingler un commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
comment_id String Oui
broadcast_id String Oui
sso String Non

Réponse

Retourne: PinComment200Response

Enregistrer un commentaire Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
create_comment_params models::CreateCommentParams Oui
is_live bool Non
do_spam_check bool Non
send_emails bool Non
populate_notifications bool Non

Réponse

Renvoie : SaveComment200Response


Enregistrer plusieurs commentaires Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
create_comment_params Vecmodels::CreateCommentParams Oui
is_live bool Non
do_spam_check bool Non
send_emails bool Non
populate_notifications bool Non

Réponse

Retourne : Vec<models::SaveComment200Response>


Définir le texte du commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
comment_id String Oui
broadcast_id String Oui
comment_text_update_request models::CommentTextUpdateRequest Oui
edit_key String Non
sso String Non

Réponse

Renvoie: SetCommentText200Response


Débloquer un utilisateur depuis un commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
un_block_from_comment_params models::UnBlockFromCommentParams Oui
user_id String Non
anon_user_id String Non

Réponse

Renvoie: UnBlockCommentPublic200Response


Annuler le signalement d'un commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
user_id String Non
anon_user_id String Non

Réponse

Retourne: FlagComment200Response


Déverrouiller un commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
broadcast_id String Oui
sso String Non

Réponse

Renvoie : LockComment200Response


Désépingler un commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
broadcast_id String Oui
sso String Non

Réponse

Retourne: PinComment200Response

Mettre à jour un commentaire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
body models::PickApiCommentPeriodUpdatableCommentFields Oui
context_user_id String Non
do_spam_check bool Non
is_live bool Non

Réponse

Renvoie: FlagCommentPublic200Response

Voter pour un commentaire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
url_id String Oui
broadcast_id String Oui
vote_body_params models::VoteBodyParams Oui
session_id String Non
sso String Non

Réponse

Renvoie : VoteComment200Response


Ajouter une configuration de domaine Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
add_domain_config_params models::AddDomainConfigParams Oui

Réponse

Renvoie: AddDomainConfig200Response


Supprimer une configuration de domaine Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
domain String Oui

Réponse

Renvoie : DeleteDomainConfig200Response


Obtenir une configuration de domaine Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
domain String Oui

Réponse

Renvoie: GetDomainConfig200Response


Obtenir les configurations de domaine Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui

Réponse

Renvoie: GetDomainConfigs200Response


Modifier partiellement une configuration de domaine Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
domain_to_update String Oui
patch_domain_config_params models::PatchDomainConfigParams Oui

Réponse

Renvoie : GetDomainConfig200Response


Remplacer une configuration de domaine Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
domain_to_update String Oui
update_domain_config_params models::UpdateDomainConfigParams Oui

Réponse

Renvoie : GetDomainConfig200Response


Créer un modèle de courriel Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
create_email_template_body models::CreateEmailTemplateBody Oui

Réponse

Renvoie : CreateEmailTemplate200Response

Exemple

Exemple de create_email_template
Copy Copy
1
2let params: CreateEmailTemplateParams = CreateEmailTemplateParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 create_email_template_body: models::CreateEmailTemplateBody {
5 name: "New Comment Notification".to_string(),
6 subject: "New comment on your article".to_string(),
7 html_body: "<p>A new comment was posted on <strong>{article_title}</strong>.</p>".to_string(),
8 text_body: Some("A new comment was posted on {article_title}.".to_string()),
9 from_email: Some("no-reply@acme-news.com".to_string()),
10 enabled: Some(true),
11 },
12};
13let response: CreateEmailTemplate200Response = create_email_template(&configuration, params).await?;
14

Supprimer un modèle de courriel Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_email_template
Copy Copy
1
2async fn run_delete() -> Result<FlagCommentPublic200Response, Error> {
3 let params: DeleteEmailTemplateParams = DeleteEmailTemplateParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "welcome-email-template".to_string(),
6 };
7 let response: FlagCommentPublic200Response = delete_email_template(&configuration, params).await?;
8 Ok(response)
9}
10

Supprimer une erreur de rendu du modèle de courriel Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
error_id String Oui

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_email_template_render_error
Copy Copy
1
2async fn delete_email_template_render_error_example() -> Result<FlagCommentPublic200Response, Error> {
3 let params: DeleteEmailTemplateRenderErrorParams = DeleteEmailTemplateRenderErrorParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "marketing/newsletter/welcome-email".to_string(),
6 error_id: "render-err-2026-01-12-01".to_string(),
7 };
8 let response: FlagCommentPublic200Response = delete_email_template_render_error(configuration, params).await?;
9 Ok(response)
10}
11

Obtenir un modèle de courriel Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Retourne: GetEmailTemplate200Response

Exemple

get_email_template Exemple
Copy Copy
1
2async fn fetch_template() -> Result<GetEmailTemplate200Response, Error> {
3 let params: GetEmailTemplateParams = GetEmailTemplateParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "welcome-email-template".to_string(),
6 };
7 let template: GetEmailTemplate200Response = get_email_template(&configuration, params).await?;
8 Ok(template)
9}
10

Obtenir les définitions des modèles de courriel Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui

Réponse

Renvoie : GetEmailTemplateDefinitions200Response

Exemple

Exemple de get_email_template_definitions
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let config: configuration::Configuration = configuration::Configuration::default();
4 let params: GetEmailTemplateDefinitionsParams = GetEmailTemplateDefinitionsParams {
5 tenant_id: "acme-corp-tenant".to_string(),
6 locale: Some("en-US".to_string()),
7 include_inactive: Some(false),
8 };
9 let resp: GetEmailTemplateDefinitions200Response = get_email_template_definitions(&config, params).await?;
10 let _definitions = resp;
11 Ok(())
12}
13

Obtenir les erreurs de rendu des modèles de courriel Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
skip f64 Non

Réponse

Retourne : GetEmailTemplateRenderErrors200Response

Exemple

Exemple de get_email_template_render_errors
Copy Copy
1
2async fn example_call() -> Result<(), Error> {
3 let params: GetEmailTemplateRenderErrorsParams = GetEmailTemplateRenderErrorsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "welcome-email-template".to_string(),
6 skip: Some(10.0),
7 };
8 let _response: GetEmailTemplateRenderErrors200Response =
9 get_email_template_render_errors(&configuration, params).await?;
10 Ok(())
11}
12

Obtenir les modèles de courriel Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
skip f64 Non

Réponse

Renvoie : GetEmailTemplates200Response

Exemple

Exemple de get_email_templates
Copy Copy
1
2async fn fetch_email_templates() -> Result<GetEmailTemplates200Response, Error> {
3 let params: GetEmailTemplatesParams = GetEmailTemplatesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 skip: Some(20.0),
6 };
7 let templates: GetEmailTemplates200Response = get_email_templates(&configuration, params).await?;
8 Ok(templates)
9}
10

Rendre un modèle de courriel Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
render_email_template_body models::RenderEmailTemplateBody Oui
locale String Non

Réponse

Renvoie : RenderEmailTemplate200Response

Exemple

Exemple de render_email_template
Copy Copy
1
2let params: RenderEmailTemplateParams = RenderEmailTemplateParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 render_email_template_body: models::RenderEmailTemplateBody {
5 template_id: "comment-notification".to_string(),
6 subject: Some("New comment on your article".to_string()),
7 placeholders: std::collections::HashMap::from([
8 ("article_title".to_string(), "Rust Gains Momentum in 2026".to_string()),
9 ("comment_author".to_string(), "Jane Doe".to_string()),
10 ("comment_snippet".to_string(), "Great insights — thanks for sharing!".to_string()),
11 ]),
12 },
13 locale: Some("en-US".to_string()),
14};
15let rendered: RenderEmailTemplate200Response = render_email_template(&configuration, params).await?;
16

Mettre à jour un modèle de courriel Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
update_email_template_body models::UpdateEmailTemplateBody Oui

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

Exemple de update_email_template
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: UpdateEmailTemplateParams = UpdateEmailTemplateParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "welcome-template-001".to_string(),
6 update_email_template_body: models::UpdateEmailTemplateBody {
7 name: Some("Welcome Template".to_string()),
8 subject: Some("Welcome to Acme News".to_string()),
9 body_html: Some("<p>Hi , welcome to Acme News!</p>".to_string()),
10 from_address: Some("no-reply@acme-news.com".to_string()),
11 reply_to: Some("support@acme-news.com".to_string()),
12 enabled: Some(true),
13 language: Some("en-US".to_string()),
14 custom_config: Some(models::CustomConfigParameters {
15 tracking_pixel_url: Some("https://acme-news.com/pixel".to_string()),
16 }),
17 },
18 };
19
20 let response: FlagCommentPublic200Response = update_email_template(&configuration, params).await?;
21 let _ = response;
22 Ok(())
23}
24

Obtenir le journal d'événements Internal Link

req tenantId urlId userIdWS

Paramètres

Name Type Requis Description
tenant_id String Oui
url_id String Oui
user_id_ws String Oui
start_time i64 Oui
end_time i64 Oui

Réponse

Retourne: GetEventLog200Response

Obtenir le journal d'événements global Internal Link

req tenantId urlId userIdWS

Paramètres

Nom Type Requis Description
tenant_id String Oui
url_id String Oui
user_id_ws String Oui
start_time i64 Oui
end_time i64 Oui

Réponse

Renvoie: GetEventLog200Response

Créer une publication du fil Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
create_feed_post_params models::CreateFeedPostParams Oui
broadcast_id String Non
is_live bool Non
do_spam_check bool Non
skip_dup_check bool Non

Réponse

Renvoie : CreateFeedPost200Response


Créer une publication du fil (publique) Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
create_feed_post_params models::CreateFeedPostParams Oui
broadcast_id String Non
sso String Non

Réponse

Renvoie : CreateFeedPostPublic200Response

Supprimer une publication du fil (publique) Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
post_id String Oui
broadcast_id String Non
sso String Non

Réponse

Renvoie : DeleteFeedPostPublic200Response


Obtenir les publications du fil Internal Link

req tenantId afterId

Paramètres

Nom Type Requis Description
tenant_id String Oui
after_id String Non
limit i32 Non
tags Vec Non

Réponse

Retourne : GetFeedPosts200Response


Obtenir les publications du fil (publiques) Internal Link

req tenantId afterId

Paramètres

Nom Type Requis Description
tenant_id String Oui
after_id String Non
limit i32 Non
tags Vec Non
sso String Non
is_crawler bool Non
include_user_info bool Non

Réponse

Renvoie : GetFeedPostsPublic200Response


Obtenir les statistiques des publications du fil Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
post_ids Vec Oui
sso String Non

Réponse

Retourne: GetFeedPostsStats200Response


Obtenir les réactions d'utilisateurs (publiques) Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
post_ids Vec Non
sso String Non

Réponse

Renvoie: GetUserReactsPublic200Response


Réagir à une publication du fil (publique) Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
post_id String Oui
react_body_params models::ReactBodyParams Oui
is_undo bool Non
broadcast_id String Non
sso String Non

Réponse

Renvoie : ReactFeedPostPublic200Response


Mettre à jour une publication du fil Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
feed_post models::FeedPost Oui

Réponse

Renvoie : FlagCommentPublic200Response


Mettre à jour une publication du fil (publique) Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
post_id String Oui
update_feed_post_params models::UpdateFeedPostParams Oui
broadcast_id String Non
sso String Non

Réponse

Retourne: CreateFeedPostPublic200Response


Signaler un commentaire (public) Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
is_flagged bool Oui
sso String Non

Réponse

Renvoie: FlagCommentPublic200Response


Ajouter un mot-clic Internal Link

Paramètres

Name Type Required Description
tenant_id String Non
create_hash_tag_body models::CreateHashTagBody Non

Réponse

Retourne: AddHashTag200Response

Exemple

Exemple add_hash_tag
Copy Copy
1
2async fn run_add_hash_tag(configuration: &configuration::Configuration) -> Result<(), Error> {
3 let params: AddHashTagParams = AddHashTagParams {
4 tenant_id: Some("acme-corp-tenant".to_string()),
5 create_hash_tag_body: Some(models::CreateHashTagBody {
6 tag: "breaking-news".to_string(),
7 label: Some("Breaking News".to_string()),
8 visible: Some(true),
9 }),
10 };
11
12 let created: AddHashTag200Response = add_hash_tag(configuration, params).await?;
13 println!("{:#?}", created);
14 Ok(())
15}
16

Ajouter plusieurs mots-clics Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Non
bulk_create_hash_tags_body models::BulkCreateHashTagsBody Non

Réponse

Renvoie : AddHashTagsBulk200Response

Exemple

Exemple add_hash_tags_bulk
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: AddHashTagsBulkParams = AddHashTagsBulkParams {
4 tenant_id: Some("acme-corp-tenant".to_string()),
5 bulk_create_hash_tags_body: Some(models::BulkCreateHashTagsBody {
6 tags: vec![
7 models::BulkCreateHashTagsBodyTagsInner {
8 name: "news/article".to_string(),
9 path: "news/article".to_string(),
10 description: Some("Article tag for front page".to_string()),
11 enabled: Some(true),
12 },
13 ],
14 }),
15 };
16
17 let response: AddHashTagsBulk200Response = add_hash_tags_bulk(&configuration, params).await?;
18 Ok(())
19}
20

Supprimer un mot-clic Internal Link

Paramètres

Nom Type Requis Description
tag String Oui
tenant_id String Non
delete_hash_tag_request models::DeleteHashTagRequest Non

Réponse

Retourne : FlagCommentPublic200Response

Exemple

Exemple de delete_hash_tag
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteHashTagParams = DeleteHashTagParams {
4 tag: "news/politics".to_string(),
5 tenant_id: Some("acme-corp-tenant".to_string()),
6 delete_hash_tag_request: Some(models::DeleteHashTagRequest::default()),
7 };
8 let response: FlagCommentPublic200Response = delete_hash_tag(&configuration, params).await?;
9 Ok(())
10}
11

Obtenir les mots-clics Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
page f64 Non

Réponse

Renvoie: GetHashTags200Response

Exemple

Exemple get_hash_tags
Copy Copy
1
2async fn example_get_hash_tags() -> Result<GetHashTags200Response, Error> {
3 let params: GetHashTagsParams = GetHashTagsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 page: Some(1.0_f64),
6 };
7 let response: GetHashTags200Response = get_hash_tags(&configuration, params).await?;
8 Ok(response)
9}
10

Modifier partiellement un mot-clic Internal Link

Paramètres

Nom Type Requis Description
tag String Oui
tenant_id String Non
update_hash_tag_body models::UpdateHashTagBody Non

Réponse

Renvoie : PatchHashTag200Response

Exemple

Exemple de patch_hash_tag
Copy Copy
1
2async fn run_patch_hash_tag() -> Result<PatchHashTag200Response, Error> {
3 let params: PatchHashTagParams = PatchHashTagParams {
4 tag: "breaking-news".to_string(),
5 tenant_id: Some("acme-corp-tenant".to_string()),
6 update_hash_tag_body: Some(models::UpdateHashTagBody {
7 name: "Breaking News".to_string(),
8 description: "Posts about breaking news and urgent updates".to_string(),
9 synonyms: vec!["breaking".to_string(), "urgent".to_string()],
10 is_active: true,
11 }),
12 };
13 let response: PatchHashTag200Response = patch_hash_tag(&configuration, params).await?;
14 Ok(response)
15}
16

Créer un modérateur Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
create_moderator_body models::CreateModeratorBody Oui

Réponse

Renvoie: CreateModerator200Response

Exemple

Exemple de create_moderator
Copy Copy
1
2async fn run_create_moderator() -> Result<(), Error> {
3 let params: CreateModeratorParams = CreateModeratorParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 create_moderator_body: models::CreateModeratorBody {
6 email: "jane.doe@acme.com".to_owned(),
7 display_name: "Jane Doe".to_owned(),
8 role: Some("moderator".to_owned()),
9 active: Some(true),
10 notes: Some("Handles product and support forums".to_owned()),
11 permissions: Some(vec!["approve_comment".to_owned(), "delete_comment".to_owned()]),
12 },
13 };
14
15 let _response: CreateModerator200Response = create_moderator(&configuration, params).await?;
16 Ok(())
17}
18

Supprimer un modérateur Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
send_email String Non

Réponse

Retourne: FlagCommentPublic200Response

Exemple

Exemple de delete_moderator
Copy Copy
1
2async fn run(configuration: &configuration::Configuration) -> Result<FlagCommentPublic200Response, Error> {
3 let params: DeleteModeratorParams = DeleteModeratorParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "moderator-1234".to_string(),
6 send_email: Some("true".to_string()),
7 };
8 let response: FlagCommentPublic200Response = delete_moderator(configuration, params).await?;
9 Ok(response)
10}
11

Obtenir un modérateur Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: GetModerator200Response

Exemple

Exemple de get_moderator
Copy Copy
1
2async fn example() -> Result<(), Error> {
3 let params: GetModeratorParams = GetModeratorParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "moderator-42".to_string(),
6 include: Some(vec!["roles".to_string(), "recent_comments".to_string()]),
7 };
8 let moderator: GetModerator200Response = get_moderator(&configuration, params).await?;
9 println!("{:#?}", moderator);
10 Ok(())
11}
12

Obtenir les modérateurs Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
skip f64 Non

Réponse

Retourne: GetModerators200Response

Exemple

Exemple de get_moderators
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetModeratorsParams = GetModeratorsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 skip: Some(10.0),
6 };
7 let moderators: GetModerators200Response = get_moderators(&configuration, params).await?;
8 let _moderators = moderators;
9 Ok(())
10}
11

Envoyer une invitation Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui
from_name String Oui

Réponse

Retourne : FlagCommentPublic200Response

Exemple

Exemple de send_invite
Copy Copy
1
2let params: SendInviteParams = SendInviteParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 id: "articles/2026/01/ai-news-12345".to_string(),
5 from_name: "Acme Newsroom".to_string(),
6 reply_to: Some("editorial@acme.com".to_string()),
7 message: Some("You have been invited to moderate comments on this article.".to_string()),
8};
9
10let invite_response: FlagCommentPublic200Response = send_invite(&configuration, params).await?;
11

Mettre à jour un modérateur Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
id String Oui
update_moderator_body models::UpdateModeratorBody Oui

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de update_moderator
Copy Copy
1
2let params: UpdateModeratorParams = UpdateModeratorParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 id: "moderator-12345".to_string(),
5 update_moderator_body: models::UpdateModeratorBody {
6 username: "jane.doe".to_string(),
7 display_name: Some("Jane Doe".to_string()),
8 email: Some("jane.doe@acme.com".to_string()),
9 is_active: Some(true),
10 permissions: Some(vec!["moderate_comments".to_string(), "view_reports".to_string()]),
11 },
12};
13let response: FlagCommentPublic200Response = update_moderator(&configuration, params).await?;
14

Supprimer le nombre de notifications Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

Exemple de delete_notification_count
Copy Copy
1
2async fn run_delete_notification_count(configuration: &configuration::Configuration) -> Result<FlagCommentPublic200Response, Error> {
3 let params: DeleteNotificationCountParams = DeleteNotificationCountParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "notification-9f8b7a6".to_string(),
6 };
7 let response: FlagCommentPublic200Response = delete_notification_count(configuration, params).await?;
8 Ok(response)
9}
10

Obtenir le nombre de notifications en cache Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui

Réponse

Renvoie : GetCachedNotificationCount200Response

Exemple

get_cached_notification_count Exemple
Copy Copy
1
2async fn run_get_cached_notification_count() -> Result<(), Error> {
3 let params: GetCachedNotificationCountParams = GetCachedNotificationCountParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-12345".to_string(),
6 };
7 let preferred_channel: Option<String> = Some("email".to_string());
8 let response: GetCachedNotificationCount200Response =
9 get_cached_notification_count(&configuration, params).await?;
10 Ok(())
11}
12

Obtenir le nombre de notifications Internal Link

Paramètres

Name Type Obligatoire Description
tenant_id String Oui
user_id String Non
url_id String Non
from_comment_id String Non
viewed bool Non

Réponse

Renvoie : GetNotificationCount200Response

Exemple

Exemple de get_notification_count
Copy Copy
1
2async fn example_get_notification_count() -> Result<GetNotificationCount200Response, Error> {
3 let params: GetNotificationCountParams = GetNotificationCountParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 user_id: Some(String::from("user-12345")),
6 url_id: Some(String::from("news/article/2026/product-launch")),
7 from_comment_id: Some(String::from("cmt-000987")),
8 viewed: Some(false),
9 };
10 let response: GetNotificationCount200Response = get_notification_count(&configuration, params).await?;
11 Ok(response)
12}
13

Obtenir les notifications Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
user_id String Non
url_id String Non
from_comment_id String Non
viewed bool Non
skip f64 Non

Réponse

Renvoie: GetNotifications200Response

Exemple

Exemple de get_notifications
Copy Copy
1
2async fn fetch_notifications() -> Result<(), Error> {
3 let params: GetNotificationsParams = GetNotificationsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 user_id: Some("user-1234".to_string()),
6 url_id: Some("news/politics/article-2026-01-12".to_string()),
7 from_comment_id: Some("cmt-98765".to_string()),
8 viewed: Some(false),
9 skip: Some(0.0),
10 };
11 let notifications: GetNotifications200Response = get_notifications(&configuration, params).await?;
12 let _ = notifications;
13 Ok(())
14}
15

Mettre à jour une notification Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui
update_notification_body models::UpdateNotificationBody Oui
user_id String Non

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

Exemple de update_notification
Copy Copy
1
2pub async fn run_update_notification(configuration: &configuration::Configuration) -> Result<FlagCommentPublic200Response, Error> {
3 let params: UpdateNotificationParams = UpdateNotificationParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "notification-67890".to_string(),
6 update_notification_body: models::UpdateNotificationBody {
7 title: Some("Flag Review Complete".to_string()),
8 message: Some("A moderator reviewed the flagged comment and marked it resolved.".to_string()),
9 resolved: Some(true),
10 channels: Some(vec!["email".to_string(), "in_app".to_string()]),
11 },
12 user_id: Some("moderator-007".to_string()),
13 };
14 let response: FlagCommentPublic200Response = update_notification(configuration, params).await?;
15 Ok(response)
16}
17

Ajouter une page Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
create_api_page_data models::CreateApiPageData Oui

Réponse

Retourne: AddPageApiResponse


Supprimer une page Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Retourne : DeletePageApiResponse


Obtenir la page par URLid Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
url_id String Oui

Réponse

Retourne: GetPageByUrlidApiResponse


Obtenir les pages Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui

Réponse

Renvoie: GetPagesApiResponse


Modifier partiellement une page Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
update_api_page_data models::UpdateApiPageData Oui

Réponse

Renvoie: PatchPageApiResponse

Supprimer un événement webhook en attente Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_pending_webhook_event
Copy Copy
1
2async fn run() -> Result<FlagCommentPublic200Response, Error> {
3 let event_id_opt: Option<String> = Some("webhook-event/news-article-2026-01-10-1234".to_string());
4 let event_id: String = event_id_opt.unwrap();
5 let params: DeletePendingWebhookEventParams = DeletePendingWebhookEventParams {
6 tenant_id: "acme-corp-tenant".to_string(),
7 id: event_id,
8 };
9 let response: FlagCommentPublic200Response = delete_pending_webhook_event(&configuration, params).await?;
10 Ok(response)
11}
12

Obtenir le nombre d'événements webhook en attente Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Yes
comment_id String No
external_id String No
event_type String No
domain String No
attempt_count_gt f64 No

Réponse

Renvoie : GetPendingWebhookEventCount200Response

Exemple

Exemple de get_pending_webhook_event_count
Copy Copy
1
2async fn example() -> Result<GetPendingWebhookEventCount200Response, Error> {
3 let params: GetPendingWebhookEventCountParams = GetPendingWebhookEventCountParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: Some("cmt-12345".to_string()),
6 external_id: Some("news/article-98765".to_string()),
7 event_type: Some("comment.created".to_string()),
8 domain: Some("news.example.com".to_string()),
9 attempt_count_gt: Some(2.0),
10 };
11 let response: GetPendingWebhookEventCount200Response =
12 get_pending_webhook_event_count(&configuration, params).await?;
13 Ok(response)
14}
15

Obtenir les événements webhook en attente Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Non
external_id String Non
event_type String Non
domain String Non
attempt_count_gt f64 Non
skip f64 Non

Réponse

Renvoie: GetPendingWebhookEvents200Response

Exemple

Exemple de get_pending_webhook_events
Copy Copy
1
2let params: GetPendingWebhookEventsParams = GetPendingWebhookEventsParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 comment_id: Some("cmt-12345".to_string()),
5 external_id: Some("article-98765".to_string()),
6 event_type: Some("comment.create".to_string()),
7 domain: Some("news.example.com".to_string()),
8 attempt_count_gt: Some(1.0),
9 skip: Some(0.0),
10};
11
12let pending: GetPendingWebhookEvents200Response = get_pending_webhook_events(&configuration, params).await?;
13

Créer une configuration de question Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
create_question_config_body models::CreateQuestionConfigBody Oui

Réponse

Renvoie : CreateQuestionConfig200Response

Exemple

Exemple de create_question_config
Copy Copy
1
2let params: CreateQuestionConfigParams = CreateQuestionConfigParams {
3 tenant_id: String::from("acme-corp-tenant"),
4 create_question_config_body: models::CreateQuestionConfigBody {
5 key: String::from("article-usefulness"),
6 label: Some(String::from("Was this article useful?")),
7 description: Some(String::from("Help us improve by rating this article.")),
8 required: Some(true),
9 rendering_type: Some(models::QuestionRenderingType::MultipleChoice),
10 custom_options: Some(vec![
11 models::QuestionConfigCustomOptionsInner { value: String::from("1"), label: Some(String::from("Not useful")) },
12 models::QuestionConfigCustomOptionsInner { value: String::from("3"), label: Some(String::from("Somewhat useful")) },
13 models::QuestionConfigCustomOptionsInner { value: String::from("5"), label: Some(String::from("Very useful")) },
14 ]),
15 enabled: Some(true),
16 },
17};
18let response: CreateQuestionConfig200Response = create_question_config(configuration, params).await?;
19

Supprimer une configuration de question Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
id String Oui

Réponse

Retourne: FlagCommentPublic200Response

Exemple

Exemple de delete_question_config
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteQuestionConfigParams = DeleteQuestionConfigParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-comments-config-2025".to_string(),
6 force: Some(true),
7 };
8 let response: FlagCommentPublic200Response = delete_question_config(&configuration, params).await?;
9 Ok(())
10}
11

Obtenir une configuration de question Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie : GetQuestionConfig200Response

Exemple

Exemple de get_question_config
Copy Copy
1
2async fn fetch_question_config() -> Result<(), Error> {
3 let tenant_env: Option<&str> = Some("prod");
4 let tenant_id: String = match tenant_env {
5 Some(env) => format!("acme-corp-tenant-{}", env),
6 None => "acme-corp-tenant".to_string(),
7 };
8 let params: GetQuestionConfigParams = GetQuestionConfigParams {
9 tenant_id,
10 id: "news/article/2026/01/12-politics".to_string(),
11 };
12 let response: GetQuestionConfig200Response = get_question_config(&configuration, params).await?;
13 let _status: ApiStatus = response.0;
14 Ok(())
15}
16

Obtenir les configurations de questions Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
skip f64 Non

Réponse

Renvoie: GetQuestionConfigs200Response

Exemple

Exemple de get_question_configs
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetQuestionConfigsParams = GetQuestionConfigsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 skip: Some(10.0),
6 };
7 let response: GetQuestionConfigs200Response = get_question_configs(&configuration, params).await?;
8 let _cfgs: GetQuestionConfigs200Response = response;
9 Ok(())
10}
11

Mettre à jour une configuration de question Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
update_question_config_body models::UpdateQuestionConfigBody Oui

Réponse

Retourne : FlagCommentPublic200Response

Exemple

Exemple de update_question_config
Copy Copy
1
2async fn run_update() -> Result<(), Error> {
3 let params: UpdateQuestionConfigParams = UpdateQuestionConfigParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 id: String::from("news/article-2026-01-12"),
6 update_question_config_body: models::UpdateQuestionConfigBody {
7 question_text: String::from("Did you find this reporting accurate?"),
8 required: Some(true),
9 rendering_type: Some(models::QuestionRenderingType::Inline),
10 options: Some(vec![
11 models::QuestionConfigCustomOptionsInner { id: String::from("opt-yes"), label: String::from("Yes"), value: String::from("yes") },
12 models::QuestionConfigCustomOptionsInner { id: String::from("opt-no"), label: String::from("No"), value: String::from("no") },
13 ]),
14 when_save: Some(models::QuestionWhenSave::OnSubmit),
15 },
16 };
17 let response: FlagCommentPublic200Response = update_question_config(&configuration, params).await?;
18 Ok(())
19}
20

Créer un résultat de question Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
create_question_result_body models::CreateQuestionResultBody Oui

Réponse

Retourne : CreateQuestionResult200Response

Exemple

Exemple de create_question_result
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: CreateQuestionResultParams = CreateQuestionResultParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 create_question_result_body: models::CreateQuestionResultBody {
6 question_id: "feedback-article-2026".to_string(),
7 comment_id: Some("cmt-2026-001".to_string()),
8 user_id: Some("reader-007".to_string()),
9 answer: "yes".to_string(),
10 score: Some(4),
11 metadata: Some(std::collections::HashMap::from([(
12 "path".to_string(),
13 "news/politics/2026-election".to_string(),
14 )])),
15 anonymous: Some(false),
16 submitted_at: Some("2026-01-12T09:15:00Z".to_string()),
17 },
18 };
19
20 let created: CreateQuestionResult200Response = create_question_result(&configuration, params).await?;
21 Ok(())
22}
23

Supprimer un résultat de question Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_question_result
Copy Copy
1
2async fn run_delete() -> Result<(), Error> {
3 let params: DeleteQuestionResultParams = DeleteQuestionResultParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article/12345/question/67890".to_string(),
6 dry_run: Some(false),
7 request_id: Some("req-20260112-7a3b".to_string()),
8 };
9 let response: FlagCommentPublic200Response = delete_question_result(&configuration, params).await?;
10 Ok(())
11}
12

Obtenir un résultat de question Internal Link

Paramètres

Name Type Required Description
tenant_id String Yes
id String Yes

Réponse

Retourne : GetQuestionResult200Response

Exemple

Exemple de get_question_result
Copy Copy
1
2async fn run() -> Result<GetQuestionResult200Response, Error> {
3 let include_metadata: Option<bool> = Some(true);
4 let params: GetQuestionResultParams = GetQuestionResultParams {
5 tenant_id: "acme-corp-tenant".to_string(),
6 id: "news/article/2026/12345".to_string(),
7 };
8 let response: GetQuestionResult200Response = get_question_result(&configuration, params).await?;
9 Ok(response)
10}
11

Obtenir les résultats de questions Internal Link

Paramètres

Name Type Obligatoire Description
tenant_id String Oui
url_id String Non
user_id String Non
start_date String Non
question_id String Non
question_ids String Non
skip f64 Non

Réponse

Renvoie : GetQuestionResults200Response

Exemple

get_question_results Exemple
Copy Copy
1
2async fn example_get_question_results() -> Result<(), Error> {
3 let params = GetQuestionResultsParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 url_id: Some(String::from("news/article/2026/01/12/breaking")),
6 user_id: Some(String::from("user-98765")),
7 start_date: Some(String::from("2025-12-01")),
8 question_id: Some(String::from("q-42")),
9 question_ids: Some(String::from("q-42,q-43")),
10 skip: Some(10.0),
11 };
12 let results: GetQuestionResults200Response = get_question_results(&configuration, params).await?;
13 Ok(())
14}
15

Mettre à jour un résultat de question Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
update_question_result_body models::UpdateQuestionResultBody Oui

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

Exemple de update_question_result
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let body: models::UpdateQuestionResultBody = models::UpdateQuestionResultBody {
4 question_id: "q-12345".to_string(),
5 result: true,
6 comment: Some("Marked by moderator after review".to_string()),
7 };
8
9 let params: UpdateQuestionResultParams = UpdateQuestionResultParams {
10 tenant_id: "acme-corp-tenant".to_string(),
11 id: "news/article/98765".to_string(),
12 update_question_result_body: body,
13 };
14
15 let response: FlagCommentPublic200Response = update_question_result(&configuration, params).await?;
16 println!("{:#?}", response);
17 Ok(())
18}
19

Agréger les résultats de questions Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
question_id String Non
question_ids Vec Non
url_id String Non
time_bucket models::AggregateTimeBucket Non
start_date String Non
force_recalculate bool Non

Réponse

Renvoie: AggregateQuestionResults200Response


Agréger en masse les résultats de questions Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
bulk_aggregate_question_results_request models::BulkAggregateQuestionResultsRequest Oui
force_recalculate bool Non

Réponse

Renvoie : BulkAggregateQuestionResults200Response


Combiner les commentaires avec les résultats de questions Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
question_id String Non
question_ids Vec Non
url_id String Non
start_date String Non
force_recalculate bool Non
min_value f64 Non
max_value f64 Non
limit f64 Non

Réponse

Retourne: CombineCommentsWithQuestionResults200Response


Ajouter un utilisateur SSO Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
create_apisso_user_data models::CreateApissoUserData Oui

Réponse

Retourne : AddSsoUserApiResponse


Supprimer un utilisateur SSO Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
delete_comments bool Non
comment_delete_mode String Non

Réponse

Renvoie : DeleteSsoUserApiResponse


Obtenir un utilisateur SSO par courriel Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
email String Oui

Réponse

Renvoie : GetSsoUserByEmailApiResponse


Obtenir un utilisateur SSO par identifiant Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Retourne : GetSsoUserByIdApiResponse


Obtenir les utilisateurs SSO Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
skip i32 Non

Réponse

Renvoie : GetSsoUsers200Response

Modifier partiellement un utilisateur SSO Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui
update_apisso_user_data models::UpdateApissoUserData Oui
update_comments bool Non

Réponse

Renvoie: PatchSsoUserApiResponse


Remplacer un utilisateur SSO Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
update_apisso_user_data models::UpdateApissoUserData Oui
update_comments bool Non

Réponse

Renvoie : PutSsoUserApiResponse


Créer un abonnement Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
create_api_user_subscription_data models::CreateApiUserSubscriptionData Oui

Réponse

Renvoie: CreateSubscriptionApiResponse

Supprimer un abonnement Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
user_id String Non

Réponse

Renvoie: DeleteSubscriptionApiResponse


Obtenir les abonnements Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
user_id String Non

Réponse

Retourne: GetSubscriptionsApiResponse

Obtenir l'utilisation quotidienne du locataire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
year_number f64 Non
month_number f64 Non
day_number f64 Non
skip f64 Non

Réponse

Retourne: GetTenantDailyUsages200Response

Exemple

Exemple de get_tenant_daily_usages
Copy Copy
1
2async fn example() -> Result<GetTenantDailyUsages200Response, Error> {
3 let params: GetTenantDailyUsagesParams = GetTenantDailyUsagesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 year_number: Some(2024.0),
6 month_number: Some(9.0),
7 day_number: Some(15.0),
8 skip: Some(0.0),
9 };
10 let response: GetTenantDailyUsages200Response = get_tenant_daily_usages(&configuration, params).await?;
11 Ok(response)
12}
13

Créer un forfait du locataire Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Yes
create_tenant_package_body models::CreateTenantPackageBody Yes

Réponse

Retourne: CreateTenantPackage200Response

Exemple

Exemple de create_tenant_package
Copy Copy
1
2async fn run_create_package() -> Result<(), Error> {
3 let params: CreateTenantPackageParams = CreateTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 create_tenant_package_body: models::CreateTenantPackageBody {
6 name: "Acme News Package".to_string(),
7 description: Some("Moderated comments for Acme News articles".to_string()),
8 plan: Some("standard".to_string()),
9 allow_gifs: Some(true),
10 gif_rating: Some(GifRating::GeneralAudience),
11 image_content_profanity_level: Some(ImageContentProfanityLevel::Moderate),
12 sso_security_level: Some(SsoSecurityLevel::Strict),
13 custom_config: Some(CustomConfigParameters {
14 max_comment_length: Some(1000),
15 require_moderation: Some(true),
16 }),
17 },
18 };
19 let response: CreateTenantPackage200Response = create_tenant_package(&configuration, params).await?;
20 let _package: TenantPackage = response.0;
21 Ok(())
22}
23

Supprimer un forfait du locataire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_tenant_package
Copy Copy
1
2let params: DeleteTenantPackageParams = DeleteTenantPackageParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 id: "pkg-news-comments-2025-01".to_string(),
5 cascade: Some(true),
6};
7let response: FlagCommentPublic200Response = delete_tenant_package(&configuration, params).await?;
8

Obtenir un forfait du locataire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui

Réponse

Renvoie : GetTenantPackage200Response

Exemple

Exemple de get_tenant_package
Copy Copy
1
2async fn example_get_tenant_package(configuration: &configuration::Configuration) -> Result<GetTenantPackage200Response, Error> {
3 let params: GetTenantPackageParams = GetTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "premium-plan".to_string(),
6 include_details: Some(true),
7 };
8 let package: GetTenantPackage200Response = get_tenant_package(configuration, params).await?;
9 Ok(package)
10}
11

Obtenir les forfaits du locataire Internal Link

Paramètres

Name Type Required Description
tenant_id String Yes
skip f64 No

Réponse

Renvoie : GetTenantPackages200Response

Exemple

Exemple de get_tenant_packages
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetTenantPackagesParams = GetTenantPackagesParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 skip: Some(20.0),
6 };
7 let _packages: GetTenantPackages200Response = get_tenant_packages(&configuration, params).await?;
8 Ok(())
9}
10

Remplacer un forfait du locataire Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui
replace_tenant_package_body models::ReplaceTenantPackageBody Oui

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

replace_tenant_package Exemple
Copy Copy
1
2async fn run_replace_package() -> Result<FlagCommentPublic200Response, Error> {
3 let params: ReplaceTenantPackageParams = ReplaceTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "package-basic-2026".to_string(),
6 replace_tenant_package_body: models::ReplaceTenantPackageBody {
7 name: "Moderation Basic".to_string(),
8 description: Some("Standard moderation package for news sites".to_string()),
9 enabled: Some(true),
10 plan: Some("standard".to_string()),
11 custom_config_parameters: Some(models::CustomConfigParameters {
12 max_comment_length: Some(1000),
13 allow_images: Some(true),
14 }),
15 vote_style: Some(models::VoteStyle::Thumbs),
16 },
17 };
18 let response = replace_tenant_package(&configuration, params).await?;
19 Ok(response)
20}
21

Mettre à jour un forfait du locataire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
update_tenant_package_body models::UpdateTenantPackageBody Oui

Réponse

Retourne : FlagCommentPublic200Response

Exemple

Exemple de update_tenant_package
Copy Copy
1
2async fn example_update_tenant_package() -> Result<FlagCommentPublic200Response, Error> {
3 let params: UpdateTenantPackageParams = UpdateTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "pro-plan-2026".to_string(),
6 update_tenant_package_body: models::UpdateTenantPackageBody {
7 name: Some("Pro Plan".to_string()),
8 description: Some("Priority support, custom branding, and advanced moderation tools".to_string()),
9 enabled: Some(true),
10 monthly_price_cents: Some(1999),
11 features: Some(vec![
12 "priority_support".to_string(),
13 "custom_branding".to_string(),
14 "advanced_moderation".to_string(),
15 ]),
16 },
17 };
18
19 let response: FlagCommentPublic200Response = update_tenant_package(&configuration, params).await?;
20 Ok(response)
21}
22

Créer un utilisateur du locataire Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
create_tenant_user_body models::CreateTenantUserBody Oui

Réponse

Renvoie : CreateTenantUser200Response

Exemple

Exemple de create_tenant_user
Copy Copy
1
2let create_tenant_user_body: models::CreateTenantUserBody = models::CreateTenantUserBody {
3 email: "jane.doe@acme.com".to_string(),
4 display_name: Some("Jane Doe".to_string()),
5 role: Some("moderator".to_string()),
6 external_id: Some("acme-12345".to_string()),
7 subscribed_to_digest: Some(false),
8};
9let params: CreateTenantUserParams = CreateTenantUserParams {
10 tenant_id: "acme-corp-tenant".to_string(),
11 create_tenant_user_body,
12};
13let response: CreateTenantUser200Response = create_tenant_user(&configuration, params).await?;
14

Supprimer un utilisateur du locataire Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
id String Oui
delete_comments String Non
comment_delete_mode String Non

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_tenant_user
Copy Copy
1
2async fn run() -> Result<FlagCommentPublic200Response, Error> {
3 let params: DeleteTenantUserParams = DeleteTenantUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-12345".to_string(),
6 delete_comments: Some("true".to_string()),
7 comment_delete_mode: Some("cascade".to_string()),
8 };
9 let resp: FlagCommentPublic200Response = delete_tenant_user(&configuration, params).await?;
10 Ok(resp)
11}
12

Obtenir un utilisateur du locataire Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: GetTenantUser200Response

Exemple

Exemple de get_tenant_user
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetTenantUserParams = GetTenantUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-7a3f2b".to_string(),
6 };
7 let include_related: Option<String> = Some("roles,preferences".to_string());
8 let response: GetTenantUser200Response = get_tenant_user(&configuration, params).await?;
9 Ok(())
10}
11

Obtenir les utilisateurs du locataire Internal Link

Paramètres

Name Type Obligatoire Description
tenant_id String Oui
skip f64 Non

Réponse

Renvoie : GetTenantUsers200Response

Exemple

Exemple de get_tenant_users
Copy Copy
1
2async fn fetch_tenant_users() -> Result<GetTenantUsers200Response, Error> {
3 let params: GetTenantUsersParams = GetTenantUsersParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 skip: Some(10.0),
6 };
7 let response: GetTenantUsers200Response = get_tenant_users(&configuration, params).await?;
8 Ok(response)
9}
10

Remplacer un utilisateur du locataire Internal Link

Paramètres

Name Type Requis Description
tenant_id String Oui
id String Oui
replace_tenant_user_body models::ReplaceTenantUserBody Oui
update_comments String Non

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de replace_tenant_user
Copy Copy
1
2let cfg: &configuration::Configuration = &configuration;
3let replace_tenant_user_body: models::ReplaceTenantUserBody = models::ReplaceTenantUserBody {
4 external_id: Some("acct-834".to_string()),
5 email: Some("jane.doe@acme-news.com".to_string()),
6 display_name: Some("Jane Doe".to_string()),
7 role: Some("moderator".to_string()),
8};
9let params: ReplaceTenantUserParams = ReplaceTenantUserParams {
10 tenant_id: "acme-corp-tenant".to_string(),
11 id: "user-834".to_string(),
12 replace_tenant_user_body,
13 update_comments: Some("true".to_string()),
14};
15let resp: FlagCommentPublic200Response = replace_tenant_user(cfg, params).await?;
16

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
redirect_url String Non

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de send_login_link
Copy Copy
1
2async fn example_send_login_link() -> Result<FlagCommentPublic200Response, Error> {
3 let params: SendLoginLinkParams = SendLoginLinkParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "jane.doe@acme.com".to_string(),
6 redirect_url: Some("https://acme.example.com/dashboard".to_string()),
7 };
8 let response: FlagCommentPublic200Response = send_login_link(&configuration, params).await?;
9 Ok(response)
10}
11

Mettre à jour un utilisateur du locataire Internal Link

Paramètres

Name Type Obligatoire Description
tenant_id String Oui
id String Oui
update_tenant_user_body models::UpdateTenantUserBody Oui
update_comments String Non

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

Exemple de update_tenant_user
Copy Copy
1
2async fn update_user_example(configuration: &configuration::Configuration) -> Result<(), Error> {
3 let params: UpdateTenantUserParams = UpdateTenantUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-78b2".to_string(),
6 update_tenant_user_body: models::UpdateTenantUserBody {
7 username: "jdoe".to_string(),
8 display_name: "John Doe".to_string(),
9 email: "john.doe@acme.com".to_string(),
10 roles: vec!["moderator".to_string()],
11 suspended: false,
12 },
13 update_comments: Some("Promoted to moderator for community moderation".to_string()),
14 };
15 let response: FlagCommentPublic200Response = update_tenant_user(configuration, params).await?;
16 println!("updated user response status: {:?}", response);
17 Ok(())
18}
19

Créer un locataire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
create_tenant_body models::CreateTenantBody Oui

Réponse

Retourne : CreateTenant200Response

Exemple

Exemple de create_tenant
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: CreateTenantParams = CreateTenantParams {
4 tenant_id: "acme-news-tenant".to_string(),
5 create_tenant_body: models::CreateTenantBody {
6 name: "Acme News".to_string(),
7 domain: Some("news.acme.com".to_string()),
8 api_domain_configuration: Some(models::ApiDomainConfiguration {
9 domain: "api.news.acme.com".to_string(),
10 enforce_https: true,
11 }),
12 billing_info: Some(models::BillingInfo {
13 contact_email: "billing@acme.com".to_string(),
14 plan_id: "pro_monthly".to_string(),
15 }),
16 imported_site_type: Some(models::ImportedSiteType::Articles),
17 ..Default::default()
18 },
19 };
20
21 let created: CreateTenant200Response = create_tenant(&configuration, params).await?;
22 Ok(())
23}
24

Supprimer un locataire Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
sure String Non

Réponse

Renvoie: FlagCommentPublic200Response

Exemple

Exemple de delete_tenant
Copy Copy
1
2async fn example_delete_tenant() -> Result<FlagCommentPublic200Response, Error> {
3 let params: DeleteTenantParams = DeleteTenantParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-12345".to_string(),
6 sure: Some("confirm".to_string()),
7 };
8 let response: FlagCommentPublic200Response = delete_tenant(&configuration, params).await?;
9 Ok(response)
10}
11

Obtenir un locataire Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Retourne : GetTenant200Response

Exemple

Exemple de get_tenant
Copy Copy
1
2async fn run_get_tenant() -> Result<(), Error> {
3 let params: GetTenantParams = GetTenantParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 id: String::from("news/article"),
6 };
7 let include_metadata: Option<bool> = Some(true);
8 let tenant_response: GetTenant200Response = get_tenant(&configuration, params).await?;
9 Ok(())
10}
11

Obtenir les locataires Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
meta String Non
skip f64 Non

Réponse

Renvoie : GetTenants200Response

Exemple

Exemple de get_tenants
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetTenantsParams = GetTenantsParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 meta: Some(String::from("include=domains,settings")),
6 skip: Some(10.0),
7 };
8 let response: GetTenants200Response = get_tenants(&configuration, params).await?;
9 Ok(())
10}
11

Mettre à jour un locataire Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui
update_tenant_body models::UpdateTenantBody Oui

Réponse

Renvoie : FlagCommentPublic200Response

Exemple

Exemple de update_tenant
Copy Copy
1
2async fn run_update_tenant() -> Result<FlagCommentPublic200Response, Error> {
3 let params: UpdateTenantParams = UpdateTenantParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 id: "site-42".to_owned(),
6 update_tenant_body: models::UpdateTenantBody {
7 name: Some("Acme Corporation".to_string()),
8 default_site: Some("news/article".to_string()),
9 allowed_origins: Some(vec![
10 "https://www.acme.com".to_string(),
11 "https://blog.acme.com".to_string(),
12 ]),
13 invite_only: Some(false),
14 api_domain_configuration: Some(ApiDomainConfiguration {
15 domain: "comments.acme.com".to_string(),
16 secure: Some(true),
17 ..Default::default()
18 }),
19 ..Default::default()
20 },
21 };
22 let response: FlagCommentPublic200Response = update_tenant(&configuration, params).await?;
23 Ok(response)
24}
25

Téléverser une image Internal Link


Téléverser et redimensionner une image

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
file std::path::PathBuf Oui
size_preset models::SizePreset Non
url_id String Non

Réponse

Renvoie: UploadImageResponse


Obtenir la progression du badge utilisateur par identifiant Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: GetUserBadgeProgressById200Response


Obtenir la progression du badge utilisateur par identifiant d'utilisateur Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
user_id String Oui

Réponse

Retourne: GetUserBadgeProgressById200Response


Obtenir la liste de progression des badges utilisateur Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
user_id String Non
limit f64 Non
skip f64 Non

Réponse

Renvoie: GetUserBadgeProgressList200Response


Créer un badge utilisateur Internal Link

Paramètres

Name Type Required Description
tenant_id String Oui
create_user_badge_params models::CreateUserBadgeParams Oui

Réponse

Renvoie: CreateUserBadge200Response


Supprimer un badge utilisateur Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie: UpdateUserBadge200Response


Obtenir un badge utilisateur Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
id String Oui

Réponse

Retourne : GetUserBadge200Response


Obtenir les badges utilisateur Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
user_id String Non
badge_id String Non
displayed_on_comments bool Non
limit f64 Non
skip f64 Non

Réponse

Renvoie : GetUserBadges200Response


Mettre à jour un badge utilisateur Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
update_user_badge_params models::UpdateUserBadgeParams Oui

Réponse

Renvoie: UpdateUserBadge200Response


Obtenir le nombre de notifications de l'utilisateur Internal Link

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
sso String Non

Réponse

Renvoie: GetUserNotificationCount200Response


Obtenir les notifications de l'utilisateur Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
page_size i32 Non
after_id String Non
include_context bool Non
after_created_at i64 Non
unread_only bool Non
dm_only bool Non
no_dm bool Non
include_translations bool Non
sso String Non

Réponse

Renvoie : GetUserNotifications200Response


Réinitialiser le nombre de notifications de l'utilisateur Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
sso String Non

Réponse

Renvoie: ResetUserNotifications200Response


Réinitialiser les notifications de l'utilisateur Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
after_id String Non
after_created_at i64 Non
unread_only bool Non
dm_only bool Non
no_dm bool Non
sso String Non

Réponse

Renvoie : ResetUserNotifications200Response


Mettre à jour le statut d'abonnement aux commentaires de notification de l'utilisateur Internal Link

Activer ou désactiver les notifications pour un commentaire spécifique.

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
notification_id String Oui
opted_in_or_out String Oui
comment_id String Oui
sso String Non

Réponse

Retourne : UpdateUserNotificationStatus200Response


Mettre à jour le statut d'abonnement aux pages de notification de l'utilisateur Internal Link

Activer ou désactiver les notifications pour une page. Lorsque des utilisateurs sont abonnés à une page, des notifications sont créées pour les nouveaux commentaires racines, et aussi

Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
url_id String Oui
url String Oui
page_title String Oui
subscribed_or_unsubscribed String Oui
sso String Non

Réponse

Renvoie : UpdateUserNotificationStatus200Response


Mettre à jour le statut de notification de l'utilisateur Internal Link


Paramètres

Name Type Requis Description
tenant_id String Oui
notification_id String Oui
new_status String Oui
sso String Non

Réponse

Renvoie: UpdateUserNotificationStatus200Response


Obtenir les statuts de présence utilisateur Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
url_id_ws String Oui
user_ids String Oui

Réponse

Renvoie: GetUserPresenceStatuses200Response


Rechercher des utilisateurs Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
url_id String Oui
username_starts_with String Oui
mention_group_ids Vec Non
sso String Non

Réponse

Retourne: SearchUsers200Response


Obtenir un utilisateur Internal Link


Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui

Réponse

Renvoie : GetUser200Response

Exemple

Exemple de get_user
Copy Copy
1
2async fn run_get_user() -> Result<(), Error> {
3 let maybe_id: Option<String> = Some("user-6412".to_owned());
4 let params: GetUserParams = GetUserParams {
5 tenant_id: "acme-corp-tenant".to_owned(),
6 id: maybe_id.unwrap(),
7 };
8 let user_response: GetUser200Response = get_user(&configuration, params).await?;
9 println!("{:#?}", user_response);
10 Ok(())
11}
12

Créer un vote Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
comment_id String Oui
direction String Oui
user_id String Non
anon_user_id String Non

Réponse

Retourne: VoteComment200Response

Exemple

Exemple de create_vote
Copy Copy
1
2async fn run_vote() -> Result<VoteComment200Response, Error> {
3 let params: CreateVoteParams = CreateVoteParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "news/2026/01/12/local-election-12345".to_string(),
6 direction: "up".to_string(),
7 user_id: Some("user_9876".to_string()),
8 anon_user_id: None,
9 };
10 let response: VoteComment200Response = create_vote(&configuration, params).await?;
11 Ok(response)
12}
13

Supprimer un vote Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
id String Oui
edit_key String Non

Réponse

Retourne : DeleteCommentVote200Response

Exemple

Exemple delete_vote
Copy Copy
1
2async fn run_delete_vote() -> Result<(), Error> {
3 let params: DeleteVoteParams = DeleteVoteParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article/67890/comment/12345".to_string(),
6 edit_key: Some("user-editkey-7f3b".to_string()),
7 };
8 let response: DeleteCommentVote200Response = delete_vote(&configuration, params).await?;
9 Ok(())
10}
11

Obtenir les votes Internal Link

Paramètres

Nom Type Requis Description
tenant_id String Oui
url_id String Oui

Réponse

Renvoie: GetVotes200Response

Exemple

Exemple de get_votes
Copy Copy
1
2async fn fetch_votes_example() -> Result<(), Error> {
3 let params: GetVotesParams = GetVotesParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 url_id: String::from("news/article/2026-01-12/housing-market"),
6 };
7 let votes: GetVotes200Response = get_votes(&configuration, params).await?;
8 let _ = votes;
9 Ok(())
10}
11

Obtenir les votes pour un utilisateur Internal Link


Paramètres

Nom Type Obligatoire Description
tenant_id String Oui
url_id String Oui
user_id String Non
anon_user_id String Non

Réponse

Renvoie: GetVotesForUser200Response

Exemple

Exemple de get_votes_for_user
Copy Copy
1
2async fn fetch_votes() -> Result<GetVotesForUser200Response, Error> {
3 let params = GetVotesForUserParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 url_id: String::from("news/2026/01/12/breaking-tech"),
6 user_id: Some(String::from("user-78a3")),
7 anon_user_id: Some(String::from("anon-4f2b")),
8 };
9 let response: GetVotesForUser200Response = get_votes_for_user(&configuration, params).await?;
10 Ok(response)
11}
12

Besoin d'aide ?

Si vous rencontrez des problèmes ou avez des questions concernant le SDK Rust, veuillez :

Contribuer

Les contributions sont les bienvenues ! Veuillez consulter le dépôt GitHub pour les consignes de contribution.