FastComments.com

FastComments Rust SDK

Dies ist das offizielle Rust SDK für FastComments.

Offizielles Rust SDK für die FastComments API

Repository

Auf GitHub ansehen


Installation Internal Link

cargo add fastcomments-sdk

Das SDK setzt die Rust-Edition 2021 oder neuer voraus.

Bibliotheksinhalte Internal Link


Das FastComments Rust SDK besteht aus mehreren Modulen:

  • Client Module - Automatisch generierter API-Client für FastComments REST APIs

    • Vollständige Typdefinitionen für alle API-Modelle
    • Sowohl authentifizierte (DefaultApi) als auch öffentliche (PublicApi) Endpunkte
    • Volle async/await-Unterstützung mit tokio
    • Siehe client/README.md für detaillierte API-Dokumentation
  • SSO Module - Serverseitige Single Sign-On-Dienstprogramme

    • Sichere Token-Generierung zur Benutzer-Authentifizierung
    • Unterstützung sowohl für einfache als auch für sichere SSO-Modi
    • HMAC-SHA256-basierte Token-Signierung
  • Core Types - Gemeinsame Typdefinitionen und Dienstprogramme

    • Kommentar-Modelle und Metadatenstrukturen
    • Benutzer- und Mandantenkonfigurationen
    • Hilfsfunktionen für gängige Operationen

Schnellstart Internal Link

Verwendung der öffentlichen API

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

#[tokio::main]
async fn main() {
    // API-Konfiguration erstellen
    let config = Configuration::new();

    // Kommentare für eine Seite abrufen
    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),
    }
}

Verwendung der authentifizierten API

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

#[tokio::main]
async fn main() {
    // Konfiguration mit API-Schlüssel erstellen
    let mut config = Configuration::new();
    config.api_key = Some(ApiKey {
        prefix: None,
        key: "your-api-key".to_string(),
    });

    // Kommentare mit der authentifizierten API abrufen
    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),
    }
}

SSO zur Authentifizierung verwenden

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

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

    // Sichere SSO-Benutzerdaten erstellen (nur serverseitig!)
    let user_data = SecureSSOUserData::new(
        "user-123".to_string(),           // Benutzer-ID
        "user@example.com".to_string(),   // E-Mail
        "John Doe".to_string(),            // Benutzername
        "https://example.com/avatar.jpg".to_string(), // Avatar-URL
    );

    // SSO-Token generieren
    let sso = FastCommentsSSO::new_secure(api_key, &user_data).unwrap();
    let token = sso.create_token().unwrap();

    println!("SSO Token: {}", token);
    // Übergeben Sie dieses Token an Ihr Frontend zur Authentifizierung
}

Häufige Probleme Internal Link

401 Unauthorized-Fehler

Wenn Sie 401-Fehler erhalten, wenn Sie die authentifizierte API verwenden:

  1. Überprüfen Sie Ihren API-Schlüssel: Stellen Sie sicher, dass Sie den richtigen API-Schlüssel aus Ihrem FastComments-Dashboard verwenden
  2. Überprüfen Sie die Tenant-ID: Stellen Sie sicher, dass die Tenant-ID mit Ihrem Konto übereinstimmt
  3. API-Schlüssel-Format: Der API-Schlüssel sollte in der Configuration übergeben werden:
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
    prefix: None,
    key: "YOUR_API_KEY".to_string(),
});

SSO-Token-Probleme

Wenn SSO-Tokens nicht funktionieren:

  1. Sicheren Modus in Produktionsumgebungen verwenden: Verwenden Sie in der Produktion immer FastCommentsSSO::new_secure() mit Ihrem API-Schlüssel
  2. Nur serverseitig: Erzeugen Sie SSO-Tokens auf Ihrem Server, geben Sie Ihren API-Schlüssel niemals an Clients weiter
  3. Überprüfen Sie Benutzerdaten: Stellen Sie sicher, dass alle erforderlichen Felder (id, email, username) vorhanden sind

Async-Runtime-Fehler

Das SDK verwendet tokio für asynchrone Operationen. Stellen Sie sicher, dass Sie:

  1. Fügen Sie tokio zu Ihren Abhängigkeiten hinzu:

    [dependencies]
    tokio = { version = "1", features = ["full"] }
  2. Verwenden Sie die tokio-Runtime:

    #[tokio::main]
    async fn main() {
     // Ihr asynchroner Code hier
    }

Hinweise Internal Link

Broadcast-IDs

Sie werden sehen, dass Sie in einigen API-Aufrufen eine broadcastId übergeben sollen. Wenn Sie Events erhalten, bekommen Sie diese ID zurück, sodass Sie das Event ignorieren können, falls Sie vorhaben, Änderungen auf dem Client optimistisch anzuwenden (was Sie wahrscheinlich tun möchten, da es die beste Erfahrung bietet). Geben Sie hier eine UUID an. Die ID sollte ausreichend einzigartig sein, damit sie in einer Browsersitzung nicht zweimal vorkommt.

Aggregieren Internal Link

Fasst Dokumente zusammen, indem sie gruppiert werden (falls groupBy angegeben ist) und mehrere Operationen angewendet werden. Verschiedene Operationen (z. B. sum, countDistinct, avg usw.) werden unterstützt.

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
aggregation_request models::AggregationRequest Ja
parent_tenant_id String Nein
include_stats bool Nein

Antwort

Gibt zurück: AggregationResponse


Audit-Protokolle abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
limit f64 Nein
skip f64 Nein
order models::SortDir Nein
after f64 Nein
before f64 Nein

Antwort

Rückgabe: GetAuditLogs200Response


Vom Kommentar sperren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
public_block_from_comment_params models::PublicBlockFromCommentParams Ja
sso String Nein

Antwort

Gibt zurück: BlockFromCommentPublic200Response

Sperrung vom Kommentar aufheben (öffentlich) Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
public_block_from_comment_params models::PublicBlockFromCommentParams Ja
sso String Nein

Antwort

Gibt zurück: UnBlockCommentPublic200Response


Geprüfte gesperrte Kommentare Internal Link

Parameter

Name Type Required Description
tenant_id String Ja
comment_ids String Ja
sso String Nein

Antwort

Gibt zurück: CheckedCommentsForBlocked200Response


Benutzer vom Kommentar sperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
block_from_comment_params models::BlockFromCommentParams Ja
user_id String Nein
anon_user_id String Nein

Antwort

Gibt zurück: BlockFromCommentPublic200Response


Kommentar erstellen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
broadcast_id String Ja
comment_data models::CommentData Ja
session_id String Nein
sso String Nein

Antwort

Gibt zurück: CreateCommentPublic200Response


Kommentar löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
context_user_id String Nein
is_live bool Nein

Antwort

Gibt zurück: DeleteComment200Response


Kommentar löschen (öffentlich) Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
broadcast_id String Ja
edit_key String Nein
sso String Nein

Antwort

Gibt zurück: DeleteCommentPublic200Response


Kommentarbewertung löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
vote_id String Ja
url_id String Ja
broadcast_id String Ja
edit_key String Nein
sso String Nein

Antwort

Gibt zurück: DeleteCommentVote200Response


Kommentar melden Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
user_id String Nein
anon_user_id String Nein

Antwort

Gibt zurück: FlagComment200Response


Kommentar abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetComment200Response


Kommentartext abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
edit_key String Nein
sso String Nein

Antwort

Gibt zurück: GetCommentText200Response

Nutzernamen der Kommentar-Bewerter abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
dir i32 Ja
sso String Nein

Antwort

Gibt zurück: GetCommentVoteUserNames200Response


Kommentare abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
page i32 Nein
limit i32 Nein
skip i32 Nein
as_tree bool Nein
skip_children i32 Nein
limit_children i32 Nein
max_tree_depth i32 Nein
url_id String Nein
user_id String Nein
anon_user_id String Nein
context_user_id String Nein
hash_tag String Nein
parent_id String Nein
direction models::SortDirections Nein

Antwort

Gibt zurück: GetComments200Response


Kommentare abrufen (öffentlich) Internal Link

req tenantId urlId

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
page i32 Nein
direction models::SortDirections Nein
sso String Nein
skip i32 Nein
skip_children i32 Nein
limit i32 Nein
limit_children i32 Nein
count_children bool Nein
fetch_page_for_comment_id String Nein
include_config bool Nein
count_all bool Nein
includei10n bool Nein
locale String Nein
modules String Nein
is_crawler bool Nein
include_notification_count bool Nein
as_tree bool Nein
max_tree_depth i32 Nein
use_full_translation_ids bool Nein
parent_id String Nein
search_text String Nein
hash_tags Vec Nein
user_id String Nein
custom_config_str String Nein
after_comment_id String Nein
before_comment_id String Nein

Antwort

Gibt zurück: GetCommentsPublic200Response

Kommentar sperren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
broadcast_id String Ja
sso String Nein

Antwort

Gibt zurück: LockComment200Response


Kommentar anpinnen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
broadcast_id String Ja
sso String Nein

Antwort

Gibt zurück: PinComment200Response


Kommentar speichern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_comment_params models::CreateCommentParams Ja
is_live bool Nein
do_spam_check bool Nein
send_emails bool Nein
populate_notifications bool Nein

Antwort

Gibt zurück: SaveComment200Response


Kommentare im Stapel speichern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_comment_params Vecmodels::CreateCommentParams Ja
is_live bool Nein
do_spam_check bool Nein
send_emails bool Nein
populate_notifications bool Nein

Antwort

Gibt zurück: Vec<models::SaveComment200Response>


Kommentartext setzen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
broadcast_id String Ja
comment_text_update_request models::CommentTextUpdateRequest Ja
edit_key String Nein
sso String Nein

Antwort

Gibt zurück: SetCommentText200Response


Benutzersperre vom Kommentar aufheben Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
un_block_from_comment_params models::UnBlockFromCommentParams Ja
user_id String Nein
anon_user_id String Nein

Antwort

Gibt zurück: UnBlockCommentPublic200Response


Meldung für Kommentar aufheben Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
user_id String Nein
anon_user_id String Nein

Antwort

Gibt zurück: FlagComment200Response


Kommentar entsperren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
broadcast_id String Ja
sso String Nein

Antwort

Rückgabe: LockComment200Response


Kommentar entpinnen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
broadcast_id String Ja
sso String Nein

Antwort

Gibt zurück: PinComment200Response


Kommentar aktualisieren Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
id String Ja
body models::PickApiCommentPeriodUpdatableCommentFields Ja
context_user_id String Nein
do_spam_check bool Nein
is_live bool Nein

Antwort

Gibt zurück: FlagCommentPublic200Response


Kommentar bewerten Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
url_id String Ja
broadcast_id String Ja
vote_body_params models::VoteBodyParams Ja
session_id String Nein
sso String Nein

Antwort

Gibt zurück: VoteComment200Response


Domain-Konfiguration hinzufügen Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
add_domain_config_params models::AddDomainConfigParams Ja

Antwort

Gibt zurück: AddDomainConfig200Response


Domain-Konfiguration löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
domain String Ja

Antwort

Gibt zurück: DeleteDomainConfig200Response


Domain-Konfiguration abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
domain String Ja

Antwort

Gibt zurück: GetDomainConfig200Response


Domain-Konfigurationen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja

Antwort

Gibt zurück: GetDomainConfigs200Response


Domain-Konfiguration ändern (PATCH) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
domain_to_update String Ja
patch_domain_config_params models::PatchDomainConfigParams Ja

Antwort

Gibt zurück: GetDomainConfig200Response


Domain-Konfiguration ersetzen (PUT) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
domain_to_update String Ja
update_domain_config_params models::UpdateDomainConfigParams Ja

Antwort

Gibt zurück: GetDomainConfig200Response

E-Mail-Vorlage erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Yes
create_email_template_body models::CreateEmailTemplateBody Yes

Antwort

Gibt zurück: CreateEmailTemplate200Response

Beispiel

create_email_template Beispiel
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

E-Mail-Vorlage löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_email_template Beispiel
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

Renderfehler der E-Mail-Vorlage löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
error_id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_email_template_render_error Beispiel
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

E-Mail-Vorlage abrufen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetEmailTemplate200Response

Beispiel

get_email_template Beispiel
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

E-Mail-Vorlagendefinitionen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja

Antwort

Gibt zurück: GetEmailTemplateDefinitions200Response

Beispiel

get_email_template_definitions Beispiel
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

Renderfehler der E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
skip f64 Nein

Antwort

Gibt zurück: GetEmailTemplateRenderErrors200Response

Beispiel

get_email_template_render_errors Beispiel
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

E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
skip f64 Nein

Antwort

Gibt zurück: GetEmailTemplates200Response

Beispiel

get_email_templates Beispiel
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

E-Mail-Vorlage rendern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
render_email_template_body models::RenderEmailTemplateBody Ja
locale String Nein

Antwort

Gibt zurück: RenderEmailTemplate200Response

Beispiel

Beispiel für 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

E-Mail-Vorlage aktualisieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_email_template_body models::UpdateEmailTemplateBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_email_template Beispiel
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

Ereignisprotokoll abrufen Internal Link

req tenantId urlId userIdWS

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
user_id_ws String Ja
start_time i64 Ja
end_time i64 Ja

Antwort

Gibt zurück: GetEventLog200Response

Globales Ereignisprotokoll abrufen Internal Link


req tenantId urlId userIdWS

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
user_id_ws String Ja
start_time i64 Ja
end_time i64 Ja

Antwort

Gibt zurück: GetEventLog200Response


Feed-Beitrag erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_feed_post_params models::CreateFeedPostParams Ja
broadcast_id String Nein
is_live bool Nein
do_spam_check bool Nein
skip_dup_check bool Nein

Antwort

Gibt zurück: CreateFeedPost200Response


Feed-Beitrag erstellen (öffentlich) Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_feed_post_params models::CreateFeedPostParams Ja
broadcast_id String Nein
sso String Nein

Antwort

Gibt zurück: CreateFeedPostPublic200Response


Feed-Beitrag löschen (öffentlich) Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
post_id String Ja
broadcast_id String Nein
sso String Nein

Antwort

Gibt zurück: DeleteFeedPostPublic200Response


Feed-Beiträge abrufen Internal Link

req tenantId afterId

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
after_id String Nein
limit i32 Nein
tags Vec Nein

Antwort

Gibt zurück: GetFeedPosts200Response

Feed-Beiträge abrufen (öffentlich) Internal Link


req tenantId afterId

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
after_id String Nein
limit i32 Nein
tags Vec Nein
sso String Nein
is_crawler bool Nein
include_user_info bool Nein

Antwort

Gibt zurück: GetFeedPostsPublic200Response


Statistiken der Feed-Beiträge abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
post_ids Vec Ja
sso String Nein

Antwort

Gibt zurück: GetFeedPostsStats200Response


Benutzerreaktionen abrufen (öffentlich) Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
post_ids Vec Nein
sso String Nein

Antwort

Gibt zurück: GetUserReactsPublic200Response


Auf Feed-Beitrag reagieren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
post_id String Ja
react_body_params models::ReactBodyParams Ja
is_undo bool Nein
broadcast_id String Nein
sso String Nein

Antwort

Gibt zurück: ReactFeedPostPublic200Response


Feed-Beitrag aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
feed_post models::FeedPost Ja

Antwort

Gibt zurück: FlagCommentPublic200Response


Feed-Beitrag aktualisieren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
post_id String Ja
update_feed_post_params models::UpdateFeedPostParams Ja
broadcast_id String Nein
sso String Nein

Antwort

Gibt zurück: CreateFeedPostPublic200Response


Kommentar melden (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
is_flagged bool Ja
sso String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response


Hashtag hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String No
create_hash_tag_body models::CreateHashTagBody No

Antwort

Gibt zurück: AddHashTag200Response

Beispiel

add_hash_tag Beispiel
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

Hashtags im Stapel hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Nein
bulk_create_hash_tags_body models::BulkCreateHashTagsBody Nein

Antwort

Gibt zurück: AddHashTagsBulk200Response

Beispiel

add_hash_tags_bulk Beispiel
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

Hashtag löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tag String Ja
tenant_id String Nein
delete_hash_tag_request models::DeleteHashTagRequest Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_hash_tag Beispiel
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

Hashtags abrufen Internal Link

Parameter

Name Type Required Description
tenant_id String Ja
page f64 Nein

Antwort

Gibt zurück: GetHashTags200Response

Beispiel

get_hash_tags Beispiel
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

Hashtag ändern (PATCH) Internal Link

Parameter

Name Type Erforderlich Beschreibung
tag String Ja
tenant_id String Nein
update_hash_tag_body models::UpdateHashTagBody Nein

Antwort

Gibt zurück: PatchHashTag200Response

Beispiel

patch_hash_tag Beispiel
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

Moderator erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_moderator_body models::CreateModeratorBody Ja

Antwort

Gibt zurück: CreateModerator200Response

Beispiel

create_moderator Beispiel
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

Moderator löschen Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
id String Ja
send_email String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_moderator Beispiel
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

Moderator abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Yes
id String Yes

Antwort

Gibt zurück: GetModerator200Response

Beispiel

get_moderator Beispiel
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

Moderatoren abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
skip f64 Nein

Antwort

Gibt zurück: GetModerators200Response

Beispiel

get_moderators Beispiel
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

Einladung senden Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
from_name String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

send_invite Beispiel
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

Moderator aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Yes
id String Yes
update_moderator_body models::UpdateModeratorBody Yes

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_moderator Beispiel
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

Benachrichtigungsanzahl löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_notification_count Beispiel
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

Zwischengespeicherte Benachrichtigungsanzahl abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetCachedNotificationCount200Response

Beispiel

get_cached_notification_count Beispiel
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

Benachrichtigungsanzahl abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
user_id String Nein
url_id String Nein
from_comment_id String Nein
viewed bool Nein

Antwort

Gibt zurück: GetNotificationCount200Response

Beispiel

get_notification_count Beispiel
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

Benachrichtigungen abrufen Internal Link

Parameter

Name Type Required Description
tenant_id String Ja
user_id String Nein
url_id String Nein
from_comment_id String Nein
viewed bool Nein
skip f64 Nein

Antwort

Gibt zurück: GetNotifications200Response

Beispiel

get_notifications Beispiel
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

Benachrichtigung aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_notification_body models::UpdateNotificationBody Ja
user_id String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_notification Beispiel
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

Seite hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_api_page_data models::CreateApiPageData Ja

Antwort

Gibt zurück: AddPageApiResponse


Seite löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: DeletePageApiResponse


Seite nach URL-ID abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja

Antwort

Gibt zurück: GetPageByUrlidApiResponse


Seiten abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja

Antwort

Gibt zurück: GetPagesApiResponse


Seite ändern (PATCH) Internal Link

Parameters

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_api_page_data models::UpdateApiPageData Ja

Antwort

Gibt zurück: PatchPageApiResponse

Ausstehendes Webhook-Ereignis löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_pending_webhook_event Beispiel
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

Anzahl ausstehender Webhook-Ereignisse abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Nein
external_id String Nein
event_type String Nein
domain String Nein
attempt_count_gt f64 Nein

Antwort

Gibt zurück: GetPendingWebhookEventCount200Response

Beispiel

get_pending_webhook_event_count Beispiel
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

Ausstehende Webhook-Ereignisse abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Nein
external_id String Nein
event_type String Nein
domain String Nein
attempt_count_gt f64 Nein
skip f64 Nein

Antwort

Gibt zurück: GetPendingWebhookEvents200Response

Beispiel

get_pending_webhook_events Beispiel
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

Fragekonfiguration erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_question_config_body models::CreateQuestionConfigBody Ja

Antwort

Gibt zurück: CreateQuestionConfig200Response

Beispiel

create_question_config Beispiel
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

Fragekonfiguration löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für 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

Fragekonfiguration abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetQuestionConfig200Response

Beispiel

get_question_config Beispiel
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

Fragekonfigurationen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
skip f64 Nein

Antwort

Gibt zurück: GetQuestionConfigs200Response

Beispiel

get_question_configs Beispiel
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

Fragekonfiguration aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_question_config_body models::UpdateQuestionConfigBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_question_config Beispiel
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

Frageergebnis erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_question_result_body models::CreateQuestionResultBody Ja

Antwort

Gibt zurück: CreateQuestionResult200Response

Beispiel

create_question_result Beispiel
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

Frageergebnis löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_question_result Beispiel
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

Frageergebnis abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetQuestionResult200Response

Beispiel

get_question_result Beispiel
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

Frageergebnisse abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Nein
user_id String Nein
start_date String Nein
question_id String Nein
question_ids String Nein
skip f64 Nein

Antwort

Gibt zurück: GetQuestionResults200Response

Beispiel

get_question_results Beispiel
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

Frageergebnis aktualisieren Internal Link


Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_question_result_body models::UpdateQuestionResultBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_question_result Beispiel
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

Frageergebnisse aggregieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
question_id String Nein
question_ids Vec Nein
url_id String Nein
time_bucket models::AggregateTimeBucket Nein
start_date String Nein
force_recalculate bool Nein

Antwort

Rückgabe: AggregateQuestionResults200Response


Frageergebnisse im Stapel aggregieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
bulk_aggregate_question_results_request models::BulkAggregateQuestionResultsRequest Ja
force_recalculate bool Nein

Antwort

Gibt zurück: BulkAggregateQuestionResults200Response


Kommentare mit Frageergebnissen kombinieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
question_id String Nein
question_ids Vec Nein
url_id String Nein
start_date String Nein
force_recalculate bool Nein
min_value f64 Nein
max_value f64 Nein
limit f64 Nein

Antwort

Gibt zurück: CombineCommentsWithQuestionResults200Response


SSO-Benutzer hinzufügen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_apisso_user_data models::CreateApissoUserData Ja

Antwort

Gibt zurück: AddSsoUserApiResponse


SSO-Benutzer löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
delete_comments bool Nein
comment_delete_mode String Nein

Antwort

Gibt zurück: DeleteSsoUserApiResponse


SSO-Benutzer nach E-Mail abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
email String Ja

Antwort

Gibt zurück: GetSsoUserByEmailApiResponse


SSO-Benutzer nach ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetSsoUserByIdApiResponse


SSO-Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
skip i32 Nein

Antwort

Gibt zurück: GetSsoUsers200Response


SSO-Benutzer ändern (PATCH) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_apisso_user_data models::UpdateApissoUserData Ja
update_comments bool Nein

Antwort

Gibt zurück: PatchSsoUserApiResponse


SSO-Benutzer ersetzen (PUT) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_apisso_user_data models::UpdateApissoUserData Ja
update_comments bool Nein

Antwort

Gibt zurück: PutSsoUserApiResponse


Abonnement erstellen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_api_user_subscription_data models::CreateApiUserSubscriptionData Ja

Antwort

Gibt zurück: CreateSubscriptionApiResponse


Abonnement löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
user_id String Nein

Antwort

Gibt zurück: DeleteSubscriptionApiResponse


Abonnements abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
user_id String Nein

Antwort

Gibt zurück: GetSubscriptionsApiResponse


Tägliche Nutzung des Mandanten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
year_number f64 Nein
month_number f64 Nein
day_number f64 Nein
skip f64 Nein

Antwort

Gibt zurück: GetTenantDailyUsages200Response

Beispiel

get_tenant_daily_usages Beispiel
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

Mandantenpaket erstellen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_tenant_package_body models::CreateTenantPackageBody Ja

Antwort

Gibt zurück: CreateTenantPackage200Response

Beispiel

create_tenant_package Beispiel
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

Mandantenpaket löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_tenant_package Beispiel
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

Mandantenpaket abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Rückgabe: GetTenantPackage200Response

Beispiel

get_tenant_package Beispiel
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

Mandantenpakete abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
skip f64 Nein

Antwort

Gibt zurück: GetTenantPackages200Response

Beispiel

get_tenant_packages Beispiel
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

Mandantenpaket ersetzen Internal Link

Parameter

Name Type Required Description
tenant_id String Ja
id String Ja
replace_tenant_package_body models::ReplaceTenantPackageBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

replace_tenant_package Beispiel
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

Mandantenpaket aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_tenant_package_body models::UpdateTenantPackageBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_tenant_package Beispiel
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

Mandantenbenutzer erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_tenant_user_body models::CreateTenantUserBody Ja

Antwort

Gibt zurück: CreateTenantUser200Response

Beispiel

create_tenant_user Beispiel
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

Mandantenbenutzer löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
delete_comments String Nein
comment_delete_mode String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_tenant_user Beispiel
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

Mandantenbenutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Yes
id String Yes

Antwort

Gibt zurück: GetTenantUser200Response

Beispiel

get_tenant_user Beispiel
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

Mandantenbenutzer abrufen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
skip f64 Nein

Antwort

Gibt zurück: GetTenantUsers200Response

Beispiel

get_tenant_users Beispiel
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

Mandantenbenutzer ersetzen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenant_id String Ja
id String Ja
replace_tenant_user_body models::ReplaceTenantUserBody Ja
update_comments String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

replace_tenant_user Beispiel
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

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
redirect_url String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

send_login_link Beispiel
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

Mandantenbenutzer aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_tenant_user_body models::UpdateTenantUserBody Ja
update_comments String Nein

Response

Gibt zurück: FlagCommentPublic200Response

Beispiel

Beispiel für 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

Mandant erstellen Internal Link

Parameters

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_tenant_body models::CreateTenantBody Ja

Antwort

Gibt zurück: CreateTenant200Response

Beispiel

create_tenant Beispiel
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

Mandant löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
sure String Nein

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

delete_tenant Beispiel
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

Mandant abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetTenant200Response

Beispiel

get_tenant Beispiel
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

Mandanten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
meta String Nein
skip f64 Nein

Antwort

Gibt zurück: GetTenants200Response

Beispiel

get_tenants Beispiel
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

Mandant aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_tenant_body models::UpdateTenantBody Ja

Antwort

Gibt zurück: FlagCommentPublic200Response

Beispiel

update_tenant Beispiel
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

Bild hochladen Internal Link


Bild hochladen und skalieren

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
file std::path::PathBuf Ja
size_preset models::SizePreset Nein
url_id String Nein

Antwort

Gibt zurück: UploadImageResponse


Fortschritt des Benutzerabzeichens nach ID abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetUserBadgeProgressById200Response


Fortschritt des Benutzerabzeichens nach Benutzer-ID abrufen Internal Link


Parameters

Name Typ Erforderlich Beschreibung
tenant_id String Ja
user_id String Ja

Antwort

Gibt zurück: GetUserBadgeProgressById200Response


Liste des Fortschritts der Benutzerabzeichen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
user_id String Nein
limit f64 Nein
skip f64 Nein

Antwort

Gibt zurück: GetUserBadgeProgressList200Response


Benutzerabzeichen erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
create_user_badge_params models::CreateUserBadgeParams Ja

Antwort

Gibt zurück: CreateUserBadge200Response


Benutzerabzeichen löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: UpdateUserBadge200Response


Benutzerabzeichen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetUserBadge200Response


Benutzerabzeichen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
user_id String Nein
badge_id String Nein
displayed_on_comments bool Nein
limit f64 Nein
skip f64 Nein

Antwort

Gibt zurück: GetUserBadges200Response


Benutzerabzeichen aktualisieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
update_user_badge_params models::UpdateUserBadgeParams Ja

Antwort

Gibt zurück: UpdateUserBadge200Response


Benachrichtigungsanzahl des Benutzers abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
sso String Nein

Antwort

Gibt zurück: GetUserNotificationCount200Response


Benachrichtigungen des Benutzers abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
page_size i32 Nein
after_id String Nein
include_context bool Nein
after_created_at i64 Nein
unread_only bool Nein
dm_only bool Nein
no_dm bool Nein
include_translations bool Nein
sso String Nein

Antwort

Gibt zurück: GetUserNotifications200Response


Benachrichtigungsanzahl des Benutzers zurücksetzen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
sso String Nein

Antwort

Gibt zurück: ResetUserNotifications200Response


Benachrichtigungen des Benutzers zurücksetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
after_id String Nein
after_created_at i64 Nein
unread_only bool Nein
dm_only bool Nein
no_dm bool Nein
sso String Nein

Antwort

Gibt zurück: ResetUserNotifications200Response


Kommentar-Abonnementstatus des Benutzers aktualisieren Internal Link

Benachrichtigungen für einen bestimmten Kommentar aktivieren oder deaktivieren.

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
notification_id String Ja
opted_in_or_out String Ja
comment_id String Ja
sso String Nein

Antwort

Gibt zurück: UpdateUserNotificationStatus200Response


Seiten-Abonnementstatus des Benutzers aktualisieren Internal Link

Benachrichtigungen für eine Seite aktivieren oder deaktivieren. Wenn Benutzer eine Seite abonniert haben, werden Benachrichtigungen für neue Root-Kommentare erstellt, und auch

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
url String Ja
page_title String Ja
subscribed_or_unsubscribed String Ja
sso String Nein

Antwort

Gibt zurück: UpdateUserNotificationStatus200Response

Benachrichtigungsstatus des Benutzers aktualisieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
notification_id String Ja
new_status String Ja
sso String Nein

Antwort

Gibt zurück: UpdateUserNotificationStatus200Response


Präsenzstatus der Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id_ws String Ja
user_ids String Ja

Antwort

Gibt zurück: GetUserPresenceStatuses200Response


Benutzer suchen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
username_starts_with String Ja
mention_group_ids Vec Nein
sso String Nein

Antwort

Gibt zurück: SearchUsers200Response


Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja

Antwort

Gibt zurück: GetUser200Response

Beispiel

get_user Beispiel
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

Abstimmung erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
comment_id String Ja
direction String Ja
user_id String Nein
anon_user_id String Nein

Antwort

Gibt zurück: VoteComment200Response

Beispiel

create_vote Beispiel
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

Stimme löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
id String Ja
edit_key String Nein

Antwort

Gibt zurück: DeleteCommentVote200Response

Beispiel

delete_vote Beispiel
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

Stimmen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja

Antwort

Gibt zurück: GetVotes200Response

Beispiel

get_votes Beispiel
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

Stimmen für Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenant_id String Ja
url_id String Ja
user_id String Nein
anon_user_id String Nein

Antwort

Gibt zurück: GetVotesForUser200Response

Beispiel

get_votes_for_user Beispiel
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

Brauchen Sie Hilfe?

Wenn Sie auf Probleme stoßen oder Fragen zum Rust-SDK haben, tun Sie bitte Folgendes:

Mitwirken

Beiträge sind willkommen! Bitte besuchen Sie das GitHub-Repository für Richtlinien zur Mitwirkung.