FastComments.com

FastComments Rust SDK

Ovo je zvanični Rust SDK za FastComments.

Zvanični Rust SDK za FastComments API

Repozitorijum

Prikaži na GitHub-u


Instalacija Internal Link

cargo add fastcomments-sdk

SDK zahteva Rust izdanje 2021. ili novije.

Sadržaj biblioteke Internal Link

FastComments Rust SDK se sastoji iz nekoliko modula:

  • Klijentski modul - API klijent za FastComments REST API-je

    • Potpune definicije tipova za sve API modele
    • Tri API klijenta koja pokrivaju sve FastComments metode:
      • default_api (DefaultApi) - metode autentifikovane API ključem za upotrebu na serverskoj strani
      • public_api (PublicApi) - javne, bez API-ključa, bezbedne metode za pozivanje iz pregledača i mobilnih aplikacija
      • moderation_api (ModerationApi) - metode koje stoje iza moderator table (dashboard), uključujući moderaciju komentara (lista, broj, pretraga, zapisi, izvoz), moderacione akcije (ukloni/vrati, prijavi, postavi status za pregled/spam/odobrenje, glasovi, ponovo otvori/zatvori nit), zabrane (zabrana na osnovu komentara, poništi, predrasprave zabrana, status/preferencije zabrane, brojevi zabranjenih korisnika), i značke & poverenje (dodeli/ukloni značke, manuelne značke, dohvati/postavi faktor poverenja, interni profil korisnika). Svaka Moderation metoda prihvata sso parametar tako da poziv može biti napravljen u ime moderatora autentifikovanog putem SSO.
    • Potpuna podrška za async/await uz tokio
    • Pogledajte client/README.md za detaljnu API dokumentaciju
  • SSO modul - Serverske utilitije za Single Sign-On

    • Sigurna generacija tokena za autentifikaciju korisnika
    • Podrška za jednostavan i siguran SSO režim
    • Potpisivanje tokena zasnovano na HMAC-SHA256
  • Osnovni tipovi - Zajedničke definicije tipova i pomoćni alati

    • Modeli komentara i strukture metapodataka
    • Konfiguracije korisnika i tenant-a
    • Pomoćne funkcije za uobičajene operacije

Quick Start Internal Link

Korišćenje javnog API-ja

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

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

    // Preuzmite komentare za stranicu
    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),
    }
}

Korišćenje autentifikovanog API-ja

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

#[tokio::main]
async fn main() {
    // Kreirajte konfiguraciju sa API ključem
    let mut config = Configuration::new();
    config.api_key = Some(ApiKey {
        prefix: None,
        key: "your-api-key".to_string(),
    });

    // Preuzmite komentare koristeći autentifikovani API
    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),
    }
}

Korišćenje API-ja za moderaciju

Metode za moderaciju podržavaju kontrolnu tablu moderatora. One koriste API-key Configuration isto kao i autentifikovani API, a svaka metoda prihvata opcioni sso token tako da se poziv može izvršiti u ime moderatora autentifikovanog preko SSO.

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

#[tokio::main]
async fn main() {
    // Kreirajte konfiguraciju sa API ključem
    let mut config = Configuration::new();
    config.api_key = Some(ApiKey {
        prefix: None,
        key: "your-api-key".to_string(),
    });

    // Prebroj komentare koji čekaju u redu za moderaciju
    let result = moderation_api::get_count(
        &config,
        moderation_api::GetCountParams {
            text_search: None,
            by_ip_from_comment: None,
            filter: None,
            search_filters: None,
            demo: None,
            sso: None, // prosledite SSO token da biste delovali kao moderator autentifikovan preko SSO
        },
    )
    .await;

    match result {
        Ok(response) => println!("Comments to moderate: {}", response.count),
        Err(e) => eprintln!("Error: {:?}", e),
    }
}

Korišćenje SSO za autentifikaciju

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

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

    // Kreirajte sigurne SSO korisničke podatke (samo na serverskoj strani!)
    let user_data = SecureSSOUserData::new(
        "user-123".to_string(),           // ID korisnika
        "user@example.com".to_string(),   // Email
        "John Doe".to_string(),            // Korisničko ime
        "https://example.com/avatar.jpg".to_string(), // URL avatara
    );

    // Generišite SSO token
    let sso = FastCommentsSSO::new_secure(api_key, &user_data).unwrap();
    let token = sso.create_token().unwrap();

    println!("SSO Token: {}", token);
    // Prosledite ovaj token frontendu za autentifikaciju
}

Česti problemi Internal Link

401 Neautorizovane greške

Ako dobijate 401 greške pri korišćenju autentifikovanog API-ja:

  1. Proverite svoj API ključ: Uverite se da koristite ispravan API ključ sa vaše FastComments kontrolne table
  2. Proverite tenant ID: Uverite se da tenant ID odgovara vašem nalogu
  3. Format API ključa: API ključ treba biti prosleđen u Configuration:
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
    prefix: None,
    key: "YOUR_API_KEY".to_string(),
});

Problemi sa SSO tokenima

Ako SSO tokeni ne funkcionišu:

  1. Koristite sigurni režim za produkciju: Uvek koristite FastCommentsSSO::new_secure() sa vašim API ključem za produkciju
  2. Samo na serverskoj strani: Generišite SSO tokene na svom serveru, nikada ne izlažite svoj API ključ klijentima
  3. Proverite korisničke podatke: Uverite se da su svi obavezni podaci (id, email, username) obezbeđeni

Greške asinhronog runtime-a

SDK koristi tokio za asinhrone operacije. Uverite se da:

  1. Add tokio to your dependencies:
[dependencies]
tokio = { version = "1", features = ["full"] }
  1. Use the tokio runtime:
#[tokio::main]
async fn main() {
    // Vaš asinhroni kod ovde
}

Beleške Internal Link

Broadcast ID-ovi

Videćete da treba da prosledite broadcastId u nekim API pozivima. Kada primite događaje, dobićete ovaj ID nazad, tako da znate da zanemarite događaj ako planirate da optimistično primenite promene na klijentu (što ćete verovatno želeti da uradite, jer pruža najbolje iskustvo). Ovde prosledite UUID. ID bi trebalo da bude dovoljno jedinstven da se ne pojavi dva puta u toku jedne sesije pregledača.

aggregate Internal Link


Agregira dokumente grupišući ih (ako je groupBy prosleđen) i primenjujući više operacija. Podržane su različite operacije (npr. sum, countDistinct, avg, itd.).

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
aggregation_requestmodels::AggregationRequestDa
parent_tenant_idStringNe
include_statsboolNe

Odgovor

Vraća: AggregateResponse

Primer

Primer agregacije
Copy Copy
1
2let params = AggregateParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 aggregation_request: models::AggregationRequest {
5 predicates: Some(vec![
6 models::QueryPredicate {
7 field: "path".to_string(),
8 operator: "EQUALS".to_string(),
9 values: Some(vec![
10 models::QueryPredicateValue { value: "news/article".to_string() }
11 ]),
12 }
13 ]),
14 operations: vec![
15 models::AggregationOperation {
16 op_type: models::AggregationOpType::COUNT,
17 field: Some("comment_id".to_string()),
18 alias: Some("total_comments".to_string()),
19 }
20 ],
21 sort: Some(vec![
22 models::AggregationRequestSort { field: "total_comments".to_string(), direction: "DESC".to_string() }
23 ]),
24 },
25 parent_tenant_id: Some("acme-parent-tenant".to_string()),
26 include_stats: Some(true),
27};
28let aggregate_response: AggregateResponse = aggregate(&configuration, params).await?;
29

get_api_comments Internal Link

Parametri

NazivTipObaveznoOpis
pagef64Ne
countf64Ne
text_searchStringNe
by_ip_from_commentStringNe
filtersStringNe
search_filtersStringNe
sortsStringNe
demoboolNe
ssoStringNe

Odgovor

Vraća: ModerationApiGetCommentsResponse

Primer

Primer get_api_comments
Copy Copy
1
2async fn run(configuration: &configuration::Configuration) -> Result<(), Error> {
3 let params: GetApiCommentsParams = GetApiCommentsParams {
4 page: Some(1.0),
5 count: Some(20.0),
6 text_search: Some(String::from("breaking election results")),
7 by_ip_from_comment: Some(String::from("203.0.113.45")),
8 filters: Some(String::from("status:approved,thread:news/article")),
9 search_filters: Some(String::from("author:john.doe@example.com")),
10 sorts: Some(String::from("-created_at")),
11 demo: Some(false),
12 sso: Some(String::from("acme-corp-tenant")),
13 };
14 let response: ModerationApiGetCommentsResponse = get_api_comments(configuration, params).await?;
15 Ok(())
16}
17

get_api_export_status Internal Link

Parametri

NazivTipObaveznoOpis
batch_job_idStringNe
ssoStringNe

Odgovor

Vraća: ModerationExportStatusResponse

Primer

get_api_export_status Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetApiExportStatusParams = GetApiExportStatusParams {
4 batch_job_id: Some("export-job-2026-06-19-001".to_string()),
5 sso: Some("acme-corp-tenant".to_string()),
6 };
7 let status: ModerationExportStatusResponse = get_api_export_status(&configuration, params).await?;
8 println!("{:#?}", status);
9 Ok(())
10}
11

get_api_ids Internal Link

Parametri

NameTipObaveznoOpis
text_searchStringNe
by_ip_from_commentStringNe
filtersStringNe
search_filtersStringNe
after_idStringNe
demoboolNe
ssoStringNe

Odgovor

Vraća: ModerationApiGetCommentIdsResponse

Primer

Primer get_api_ids
Copy Copy
1
2async fn run_example() -> Result<ModerationApiGetCommentIdsResponse, Error> {
3 let params: GetApiIdsParams = GetApiIdsParams {
4 text_search: Some("climate policy debate".to_string()),
5 by_ip_from_comment: Some("198.51.100.23".to_string()),
6 filters: Some("status:approved,section:opinion".to_string()),
7 search_filters: Some("author:guest".to_string()),
8 after_id: Some("cmt_000123abc".to_string()),
9 demo: Some(false),
10 sso: Some("acme-corp-tenant".to_string()),
11 };
12 let response: ModerationApiGetCommentIdsResponse = get_api_ids(&configuration, params).await?;
13 Ok(response)
14}
15

post_api_export Internal Link

Parametri

NameTypeRequiredDescription
text_searchStringNe
by_ip_from_commentStringNe
filtersStringNe
search_filtersStringNe
sortsStringNe
ssoStringNe

Odgovor

Vraća: ModerationExportResponse

Primer

post_api_export Primer
Copy Copy
1
2async fn run_export() -> Result<ModerationExportResponse, Error> {
3 let params: PostApiExportParams = PostApiExportParams {
4 text_search: Some("climate policy debate".to_string()),
5 by_ip_from_comment: Some("203.0.113.5".to_string()),
6 filters: Some(r#"{"status":"approved","channel":"news/article"}"#.to_string()),
7 search_filters: Some("created_after:2024-01-01".to_string()),
8 sorts: Some("created_at:desc".to_string()),
9 sso: Some("acme-corp-tenant".to_string()),
10 };
11 let export_response: ModerationExportResponse = post_api_export(&configuration, params).await?;
12 Ok(export_response)
13}
14

get_audit_logs Internal Link

Parametri

NameTipObaveznoOpis
tenant_idStringDa
limitf64Ne
skipf64Ne
ordermodels::SortDirNe
afterf64Ne
beforef64Ne

Odgovor

Vraća: GetAuditLogsResponse

Primer

Primer get_audit_logs
Copy Copy
1
2async fn run(configuration: &configuration::Configuration) -> Result<(), Error> {
3 let params: GetAuditLogsParams = GetAuditLogsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 limit: Some(100.0),
6 skip: Some(0.0),
7 order: Some(models::SortDir::Desc),
8 after: Some(1622505600.0),
9 before: Some(1625097600.0),
10 };
11 let response: GetAuditLogsResponse = get_audit_logs(configuration, params).await?;
12 Ok(())
13}
14

block_from_comment_public Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
comment_idStringDa
public_block_from_comment_paramsmodels::PublicBlockFromCommentParamsDa
ssoStringNe

Odgovor

Vraća: BlockSuccess

Primer

block_from_comment_public Primer
Copy Copy
1
2async fn example_block_comment() -> Result<(), Error> {
3 let params: BlockFromCommentPublicParams = BlockFromCommentPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "cmt-news-20250615-9876".to_string(),
6 public_block_from_comment_params: models::PublicBlockFromCommentParams {
7 reason: "Repeated harassment and targeted insults".to_string(),
8 duration_hours: Some(24),
9 },
10 sso: Some("sso:eyJhbGciOiJIUzI1Ni...".to_string()),
11 };
12 let block_result: BlockSuccess = block_from_comment_public(&configuration, params).await?;
13 Ok(())
14}
15

un_block_comment_public Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
public_block_from_comment_paramsmodels::PublicBlockFromCommentParamsDa
ssoStringNe

Odgovor

Vraća: UnblockSuccess

Primer

un_block_comment_public Primer
Copy Copy
1
2let params: UnBlockCommentPublicParams = UnBlockCommentPublicParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 comment_id: "news/article/2026/06/19/cmt-987654".to_string(),
5 public_block_from_comment_params: models::PublicBlockFromCommentParams {
6 reason: "harassment".to_string(),
7 duration_minutes: Some(1440),
8 notify_author: Some(true),
9 },
10 sso: Some("sso-token-7f3b9a".to_string()),
11};
12
13let unblock_success: UnblockSuccess = un_block_comment_public(&configuration, params).await?;
14

checked_comments_for_blocked Internal Link


Parametri

NameTypeRequiredDescription
tenant_idStringDa
comment_idsStringDa
ssoStringNe

Odgovor

Vraća: CheckBlockedCommentsResponse

Primer

checked_comments_for_blocked Primer
Copy Copy
1
2async fn example_checked_comments_for_blocked() -> Result<CheckBlockedCommentsResponse, Error> {
3 let params: CheckedCommentsForBlockedParams = CheckedCommentsForBlockedParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_ids: "cmt-1023,cmt-2048".to_string(),
6 sso: Some("sso:user:john.doe:eyJhbGciOiJIUzI1Ni".to_string()),
7 };
8 let response: CheckBlockedCommentsResponse = checked_comments_for_blocked(&configuration, params).await?;
9 Ok(response)
10}
11

block_user_from_comment Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
block_from_comment_paramsmodels::BlockFromCommentParamsDa
user_idStringNe
anon_user_idStringNe

Odgovor

Vraća: BlockSuccess

Primer

Primer za block_user_from_comment
Copy Copy
1
2async fn block_example() -> Result<BlockSuccess, Error> {
3 let params: BlockUserFromCommentParams = BlockUserFromCommentParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "comments/98765".to_string(),
6 block_from_comment_params: models::BlockFromCommentParams {
7 reason: "Repeated harassment".to_string(),
8 duration_minutes: Some(60 * 24),
9 notify_user: Some(true),
10 },
11 user_id: Some("user_42".to_string()),
12 anon_user_id: Some("anon-7a3f".to_string()),
13 };
14 let success: BlockSuccess = block_user_from_comment(&configuration, params).await?;
15 Ok(success)
16}
17

create_comment_public Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa
broadcast_idStringDa
comment_datamodels::CommentDataDa
session_idStringNe
ssoStringNe

Odgovor

Vraća: SaveCommentsResponseWithPresence

Primer

create_comment_public Primer
Copy Copy
1
2async fn post_public_comment(configuration: &configuration::Configuration) -> Result<SaveCommentsResponseWithPresence, Error> {
3 let params: CreateCommentPublicParams = CreateCommentPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/world/economic-update-2026".to_string(),
6 broadcast_id: "broadcast-2026-06-19-001".to_string(),
7 comment_data: models::CommentData {
8 content: "Great analysis — this clarified a lot of the market dynamics.".to_string(),
9 ..Default::default()
10 },
11 session_id: Some("sess-9f8e7d6c".to_string()),
12 sso: Some("sso-jwt-eyJhbGciOi...".to_string()),
13 };
14 let response: SaveCommentsResponseWithPresence = create_comment_public(configuration, params).await?;
15 Ok(response)
16}
17

delete_comment Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
context_user_idStringNe
is_liveboolNe

Odgovor

Vraća: DeleteCommentResult

Primer

delete_comment Primer
Copy Copy
1
2async fn run_delete() -> Result<DeleteCommentResult, Error> {
3 let params: DeleteCommentParams = DeleteCommentParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "comment-6f8a21b4".to_string(),
6 context_user_id: Some("editor-42".to_string()),
7 is_live: Some(true),
8 };
9 let deleted: DeleteCommentResult = delete_comment(&configuration, params).await?;
10 Ok(deleted)
11}
12

delete_comment_public Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
broadcast_idStringDa
edit_keyStringNe
ssoStringNe

Odgovor

Vraća: PublicApiDeleteCommentResponse

Primer

delete_comment_public Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteCommentPublicParams = DeleteCommentPublicParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 comment_id: String::from("cmt-7f3a2b9"),
6 broadcast_id: String::from("news/article/2026/06/19/article-12345"),
7 edit_key: Some(String::from("editkey-9d2f")),
8 sso: Some(String::from("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")),
9 };
10 let response: PublicApiDeleteCommentResponse = delete_comment_public(&configuration, params).await?;
11 Ok(())
12}
13

delete_comment_vote Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
vote_idStringDa
url_idStringDa
broadcast_idStringDa
edit_keyStringNe
ssoStringNe

Odgovor

Vraća: VoteDeleteResponse

Primer

Primer delete_comment_vote
Copy Copy
1
2async fn example_delete_vote() -> Result<VoteDeleteResponse, Error> {
3 let params: DeleteCommentVoteParams = DeleteCommentVoteParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "cmt-8f3a2b9e".to_string(),
6 vote_id: "vote-7d124f".to_string(),
7 url_id: "news/politics/2026-election".to_string(),
8 broadcast_id: "web-1234".to_string(),
9 edit_key: Some("edit-abc123".to_string()),
10 sso: Some("sso-token-xyz".to_string()),
11 };
12
13 let response: VoteDeleteResponse = delete_comment_vote(&configuration, params).await?;
14 Ok(response)
15}
16

flag_comment Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
user_idStringNe
anon_user_idStringNe

Odgovor

Vraća: FlagCommentResponse

Primer

flag_comment Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: FlagCommentParams = FlagCommentParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-2026-06-19/comment-98765".to_string(),
6 user_id: Some("user-42".to_string()),
7 anon_user_id: None,
8 };
9 let response: FlagCommentResponse = flag_comment(&configuration, params).await?;
10 Ok(())
11}
12

get_comment Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiGetCommentResponse

Primer

Primer get_comment
Copy Copy
1
2async fn example_get_comment() -> Result<(), Error> {
3 let params: GetCommentParams = GetCommentParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-2026-06-19/comment-742".to_string(),
6 include_replies: Some(true),
7 };
8 let comment: ApiGetCommentResponse = get_comment(&configuration, params).await?;
9 println!("{:#?}", comment);
10 Ok(())
11}
12

get_comment_text Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringYes
comment_idStringYes
edit_keyStringNo
ssoStringNo

Odgovor

Vraća: PublicApiGetCommentTextResponse

Primer

Primer get_comment_text
Copy Copy
1
2async fn fetch_comment_text() -> Result<PublicApiGetCommentTextResponse, Error> {
3 let params = GetCommentTextParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "news/article-2026-06-19#cmt-8421".to_string(),
6 edit_key: Some("editkey-73a1b2c".to_string()),
7 sso: Some("sso.jwt.token.eyJhbGci".to_string()),
8 };
9 let response: PublicApiGetCommentTextResponse = get_comment_text(&configuration, params).await?;
10 Ok(response)
11}
12

get_comment_vote_user_names Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
diri32Da
ssoStringNe

Odgovor

Vraća: GetCommentVoteUserNamesSuccessResponse

Primer

get_comment_vote_user_names Primer
Copy Copy
1
2async fn run_get_vote_names(configuration: &configuration::Configuration) -> Result<GetCommentVoteUserNamesSuccessResponse, Error> {
3 let params: GetCommentVoteUserNamesParams = GetCommentVoteUserNamesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "news/2026/10/05/article-12345#comment-678".to_string(),
6 dir: 1i32,
7 sso: Some("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.payload.signature".to_string()),
8 };
9 let response: GetCommentVoteUserNamesSuccessResponse = get_comment_vote_user_names(configuration, params).await?;
10 Ok(response)
11}
12

get_comments Internal Link

Parametri

NameTipObaveznoOpis
tenant_idStringDa
pagei32Ne
limiti32Ne
skipi32Ne
as_treeboolNe
skip_childreni32Ne
limit_childreni32Ne
max_tree_depthi32Ne
url_idStringNe
user_idStringNe
anon_user_idStringNe
context_user_idStringNe
hash_tagStringNe
parent_idStringNe
directionmodels::SortDirectionsNe
from_datei64Ne
to_datei64Ne

Odgovor

Vraća: ApiGetCommentsResponse

Primer

Primer get_comments
Copy Copy
1
2async fn example() -> Result<(), Error> {
3 let params: GetCommentsParams = GetCommentsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 page: Some(1),
6 limit: Some(25),
7 skip: Some(0),
8 as_tree: Some(true),
9 skip_children: Some(0),
10 limit_children: Some(5),
11 max_tree_depth: Some(3),
12 url_id: Some("news/article/2026/06/fast-rust".to_string()),
13 user_id: Some("user-1234".to_string()),
14 anon_user_id: Some("anon-5678".to_string()),
15 context_user_id: Some("context-999".to_string()),
16 hash_tag: Some("release".to_string()),
17 parent_id: Some("comment-9876".to_string()),
18 direction: Some(models::SortDirections::Desc),
19 from_date: Some(1_689_000_000_i64),
20 to_date: Some(1_689_086_400_i64),
21 };
22
23 let response: ApiGetCommentsResponse = get_comments(configuration, params).await?;
24 Ok(())
25}
26

get_comments_public Internal Link

req tenantId urlId

Parametri

NameTypeRequiredDescription
tenant_idStringDa
url_idStringDa
pagei32Ne
directionmodels::SortDirectionsNe
ssoStringNe
skipi32Ne
skip_childreni32Ne
limiti32Ne
limit_childreni32Ne
count_childrenboolNe
fetch_page_for_comment_idStringNe
include_configboolNe
count_allboolNe
includei10nboolNe
localeStringNe
modulesStringNe
is_crawlerboolNe
include_notification_countboolNe
as_treeboolNe
max_tree_depthi32Ne
use_full_translation_idsboolNe
parent_idStringNe
search_textStringNe
hash_tagsVecNe
user_idStringNe
custom_config_strStringNe
after_comment_idStringNe
before_comment_idStringNe

Odgovor

Vraća: GetCommentsResponseWithPresencePublicComment

Primer

get_comments_public Primer
Copy Copy
1
2let params: GetCommentsPublicParams = GetCommentsPublicParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 url_id: "news/article/climate-policy-2026".to_string(),
5 page: Some(1),
6 direction: Some(models::SortDirections::Desc),
7 sso: Some("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9".to_string()),
8 skip: Some(0),
9 skip_children: Some(0),
10 limit: Some(25),
11 limit_children: Some(5),
12 count_children: Some(true),
13 fetch_page_for_comment_id: Some("cmt-7890".to_string()),
14 include_config: Some(true),
15 count_all: Some(false),
16 includei10n: Some(true),
17 locale: Some("en-US".to_string()),
18 modules: Some("reactions,tags".to_string()),
19 is_crawler: Some(false),
20 include_notification_count: Some(false),
21 as_tree: Some(true),
22 max_tree_depth: Some(3),
23 use_full_translation_ids: Some(false),
24 parent_id: None,
25 search_text: Some("climate policy".to_string()),
26 hash_tags: Some(vec!["environment".to_string(), "policy".to_string()]),
27 user_id: Some("user-1234".to_string()),
28 custom_config_str: None,
29 after_comment_id: None,
30 before_comment_id: None,
31};
32let response: GetCommentsResponseWithPresencePublicComment = get_comments_public(&configuration, params).await?;
33

lock_comment Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
broadcast_idStringDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer lock_comment
Copy Copy
1
2async fn example_lock_comment() -> Result<ApiEmptyResponse, Error> {
3 let params: LockCommentParams = LockCommentParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 comment_id: "cmt-20240618-42".to_owned(),
6 broadcast_id: "news/article/2024-06-18".to_owned(),
7 sso: Some("user-12345-sso-token".to_owned()),
8 };
9 let response: ApiEmptyResponse = lock_comment(&configuration, params).await?;
10 Ok(response)
11}
12

pin_comment Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
broadcast_idStringDa
ssoStringNe

Odgovor

Vraća: ChangeCommentPinStatusResponse

Primer

pin_comment Primer
Copy Copy
1
2async fn run_pin() -> Result<ChangeCommentPinStatusResponse, Error> {
3 let params: PinCommentParams = PinCommentParams {
4 tenant_id: "acme-news".to_string(),
5 comment_id: "cmt-9f8b7d6".to_string(),
6 broadcast_id: "news/article/2026/06/19/article-12345".to_string(),
7 sso: Some("user-ssotoken-abc123".to_string()),
8 };
9 let response: ChangeCommentPinStatusResponse = pin_comment(configuration, params).await?;
10 Ok(response)
11}
12

save_comment Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_comment_paramsmodels::CreateCommentParamsDa
is_liveboolNe
do_spam_checkboolNe
send_emailsboolNe
populate_notificationsboolNe

Odgovor

Vraća: ApiSaveCommentResponse

Primer

Primer save_comment
Copy Copy
1
2async fn run() -> Result<ApiSaveCommentResponse, Error> {
3 let create_comment_params: models::CreateCommentParams = models::CreateCommentParams {
4 content: "Great in-depth coverage of the Rust 2026 release!".to_string(),
5 author_id: Some("user-4821".to_string()),
6 author_name: Some("Jamie Morgan".to_string()),
7 permalink: Some("https://news.example.com/articles/2026/rust-release".to_string()),
8 parent_id: None,
9 metadata: None,
10 };
11 let params: SaveCommentParams = SaveCommentParams {
12 tenant_id: "acme-corp-tenant".to_string(),
13 create_comment_params,
14 is_live: Some(true),
15 do_spam_check: Some(true),
16 send_emails: Some(false),
17 populate_notifications: Some(true),
18 };
19 let response: ApiSaveCommentResponse = save_comment(configuration, params).await?;
20 Ok(response)
21}
22

save_comments_bulk Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
create_comment_paramsVecmodels::CreateCommentParamsDa
is_liveboolNe
do_spam_checkboolNe
send_emailsboolNe
populate_notificationsboolNe

Odgovor

Vraća: Vec<models::SaveCommentsBulkResponse>

Primer

save_comments_bulk Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let comment1: models::CreateCommentParams = models::CreateCommentParams {
4 thread_id: "news/article/2026-06-19".to_string(),
5 comment_text: "Great reporting — very informative.".to_string(),
6 user_id: "user-12345".to_string(),
7 parent_id: None,
8 mentions: Some(vec![
9 models::CommentUserMentionInfo { user_id: "user-678".to_string(), display_name: "Jane Doe".to_string() }
10 ]),
11 hashtags: Some(vec![
12 models::CommentUserHashTagInfo { tag: "analysis".to_string() }
13 ]),
14 ..Default::default()
15 };
16
17 let params: SaveCommentsBulkParams = SaveCommentsBulkParams {
18 tenant_id: "acme-corp-tenant".to_string(),
19 create_comment_params: vec![comment1],
20 is_live: Some(true),
21 do_spam_check: Some(true),
22 send_emails: Some(false),
23 populate_notifications: Some(true),
24 };
25
26 let responses: Vec<models::SaveCommentsBulkResponse> = save_comments_bulk(configuration, params).await?;
27 Ok(())
28}
29

set_comment_text Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
broadcast_idStringDa
comment_text_update_requestmodels::CommentTextUpdateRequestDa
edit_keyStringNe
ssoStringNe

Odgovor

Vraća: PublicApiSetCommentTextResponse

Primer

set_comment_text Primer
Copy Copy
1
2async fn update_comment() -> Result<PublicApiSetCommentTextResponse, Error> {
3 let params: SetCommentTextParams = SetCommentTextParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "cmt-72f3a9".to_string(),
6 broadcast_id: "news/article/2026/06/19/product-launch".to_string(),
7 comment_text_update_request: models::CommentTextUpdateRequest {
8 text: "Updated: Congratulations on the launch! Clarified a few points.".to_string(),
9 },
10 edit_key: Some("edit-key-9f8b".to_string()),
11 sso: Some("sso-token-user-abc123".to_string()),
12 };
13 let response = set_comment_text(&configuration, params).await?;
14 Ok(response)
15}
16

un_block_user_from_comment Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
un_block_from_comment_paramsmodels::UnBlockFromCommentParamsDa
user_idStringNe
anon_user_idStringNe

Odgovor

Vraća: UnblockSuccess

Primer

Primer un_block_user_from_comment
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: UnBlockUserFromCommentParams = UnBlockUserFromCommentParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article/comments/42".to_string(),
6 un_block_from_comment_params: models::UnBlockFromCommentParams {
7 reason: Some("mistaken moderation".to_string()),
8 unblock_children: Some(true),
9 },
10 user_id: Some("user-12345".to_string()),
11 anon_user_id: None,
12 };
13 let success: UnblockSuccess = un_block_user_from_comment(&configuration, params).await?;
14 Ok(())
15}
16

un_flag_comment Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
user_idStringNe
anon_user_idStringNe

Odgovor

Vraća: FlagCommentResponse

Primer

Primer un_flag_comment
Copy Copy
1
2async fn unflag_example() -> Result<FlagCommentResponse, Error> {
3 let params: UnFlagCommentParams = UnFlagCommentParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "comment-98765".to_string(),
6 user_id: Some("user-42".to_string()),
7 anon_user_id: None,
8 };
9 let response: FlagCommentResponse = un_flag_comment(configuration, params).await?;
10 Ok(response)
11}
12

un_lock_comment Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
comment_idStringDa
broadcast_idStringDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

un_lock_comment Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: UnLockCommentParams = UnLockCommentParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 comment_id: String::from("news/article-123#comment-4829"),
6 broadcast_id: String::from("broadcast-2025-06-19"),
7 sso: Some(String::from("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")),
8 };
9 let response: ApiEmptyResponse = un_lock_comment(configuration, params).await?;
10 Ok(())
11}
12

un_pin_comment Internal Link

Parametri

NameTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
broadcast_idStringDa
ssoStringNe

Odgovor

Vraća: ChangeCommentPinStatusResponse

Primer

un_pin_comment Primer
Copy Copy
1
2async fn example() -> Result<ChangeCommentPinStatusResponse, Error> {
3 let params: UnPinCommentParams = UnPinCommentParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 comment_id: String::from("cmt-8f3b2a1e"),
6 broadcast_id: String::from("news/2024/product-launch"),
7 sso: Some(String::from("sso-user-abcdef123456")),
8 };
9 let response: ChangeCommentPinStatusResponse = un_pin_comment(&configuration, params).await?;
10 Ok(response)
11}
12

update_comment Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa
updatable_comment_paramsmodels::UpdatableCommentParamsDa
context_user_idStringNe
do_spam_checkboolNe
is_liveboolNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_comment
Copy Copy
1
2let params: UpdateCommentParams = UpdateCommentParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 id: "news/article-2026/comments/12345".to_string(),
5 updatable_comment_params: models::UpdatableCommentParams {
6 content: "Thanks for the update — I corrected the typo and clarified the timeline.".to_string(),
7 ..Default::default()
8 },
9 context_user_id: Some("editor-42".to_string()),
10 do_spam_check: Some(true),
11 is_live: Some(true),
12};
13
14let response: ApiEmptyResponse = update_comment(&configuration, params).await?;
15

vote_comment Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
url_idStringDa
broadcast_idStringDa
vote_body_paramsmodels::VoteBodyParamsDa
session_idStringNe
ssoStringNe

Odgovor

Vraća: VoteResponse

Primer

vote_comment Primer
Copy Copy
1
2let params: VoteCommentParams = VoteCommentParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 comment_id: "cmt_8392a1".to_string(),
5 url_id: "news/article-2026-06-19-rust-release".to_string(),
6 broadcast_id: "broadcast_2026_06".to_string(),
7 vote_body_params: models::VoteBodyParams { value: 1 },
8 session_id: Some("sess_4f9b2c".to_string()),
9 sso: Some("sso_token_abcd1234".to_string()),
10};
11let response: VoteResponse = vote_comment(&configuration, params).await?;
12

get_comments_for_user Internal Link

Parametri

NameTypeRequiredDescription
user_idStringNe
directionmodels::SortDirectionsNe
replies_to_user_idStringNe
pagef64Ne
includei10nboolNe
localeStringNe
is_crawlerboolNe

Odgovor

Vraća: GetCommentsForUserResponse

Primer

Primer get_comments_for_user
Copy Copy
1
2async fn example() -> Result<(), Error> {
3 let params: GetCommentsForUserParams = GetCommentsForUserParams {
4 user_id: Some("alice@acme-corp".to_string()),
5 direction: Some(models::SortDirections::Descending),
6 replies_to_user_id: Some("editor-202".to_string()),
7 page: Some(1.0),
8 includei10n: Some(true),
9 locale: Some("en-US".to_string()),
10 is_crawler: Some(false),
11 };
12 let response: GetCommentsForUserResponse = get_comments_for_user(configuration, params).await?;
13 let _ = response;
14 Ok(())
15}
16

add_domain_config Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringYes
add_domain_config_paramsmodels::AddDomainConfigParamsYes

Odgovor

Vraća: AddDomainConfigResponse

Primer

Primer add_domain_config
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: AddDomainConfigParams = AddDomainConfigParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 add_domain_config_params: models::AddDomainConfigParams {
6 domain: "news.example.com".to_string(),
7 path_prefix: Some("news/article".to_string()),
8 allow_subdomains: Some(true),
9 allowed_origins: Some(vec![
10 "https://www.example.com".to_string(),
11 "https://editor.example.com".to_string()
12 ]),
13 default_moderation: Some("pre-moderation".to_string()),
14 enabled: Some(true),
15 },
16 };
17
18 let response: AddDomainConfigResponse = add_domain_config(&configuration, params).await?;
19 Ok(())
20}
21

delete_domain_config Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
domainStringDa

Odgovor

Vraća: DeleteDomainConfigResponse

Primer

Primer delete_domain_config
Copy Copy
1
2async fn run_delete_domain_config() -> Result<DeleteDomainConfigResponse, Error> {
3 let params = DeleteDomainConfigParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 domain: "news/acme-corp".to_owned(),
6 force: Some(true),
7 };
8 let response: DeleteDomainConfigResponse = delete_domain_config(&configuration, params).await?;
9 Ok(response)
10}
11

get_domain_config Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
domainStringDa

Odgovor

Vraća: GetDomainConfigResponse

Primer

get_domain_config Primer
Copy Copy
1
2async fn fetch_domain_config() -> Result<GetDomainConfigResponse, Error> {
3 let tenant_id: String = "acme-corp-tenant".to_string();
4 let domain_override: Option<String> = Some("news.example.com".to_string());
5 let domain: String = domain_override.unwrap_or_else(|| "blog.example.com".to_string());
6 let params: GetDomainConfigParams = GetDomainConfigParams { tenant_id, domain };
7 let cfg: &configuration::Configuration = &configuration;
8 let response: GetDomainConfigResponse = get_domain_config(cfg, params).await?;
9 Ok(response)
10}
11

get_domain_configs Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa

Odgovor

Vraća: GetDomainConfigsResponse

Primer

get_domain_configs Primer
Copy Copy
1
2async fn run_get_domain_configs_example() -> Result<GetDomainConfigsResponse, Error> {
3 let params: GetDomainConfigsParams = GetDomainConfigsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 domain_filter: Some("news.example.com".to_string()),
6 };
7 let response: GetDomainConfigsResponse = get_domain_configs(&configuration, params).await?;
8 Ok(response)
9}
10

patch_domain_config Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
domain_to_updateStringDa
patch_domain_config_paramsmodels::PatchDomainConfigParamsDa

Odgovor

Vraća: PatchDomainConfigResponse

Primer

patch_domain_config Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: PatchDomainConfigParams = PatchDomainConfigParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 domain_to_update: "news/article".to_string(),
6 patch_domain_config_params: models::PatchDomainConfigParams {
7 allowed_origins: Some(vec![
8 "https://www.acme.com".to_string(),
9 "https://blog.acme.com".to_string(),
10 ]),
11 enable_moderation: Some(true),
12 moderation_mode: Some("pre".to_string()),
13 webhook_url: Some("https://hooks.acme.com/comments".to_string()),
14 max_comment_length: Some(1000),
15 },
16 };
17 let response: PatchDomainConfigResponse = patch_domain_config(&configuration, params).await?;
18 Ok(())
19}
20

put_domain_config Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
domain_to_updateStringDa
update_domain_config_paramsmodels::UpdateDomainConfigParamsDa

Odgovor

Vraća: PutDomainConfigResponse

Primer

put_domain_config Primer
Copy Copy
1
2async fn update_domain_config_example() -> Result<(), Error> {
3 let update_params: models::UpdateDomainConfigParams = models::UpdateDomainConfigParams {
4 enable_comments: Some(true),
5 moderation_mode: Some("pre_moderation".to_string()),
6 allowed_origins: Some(vec![
7 "https://news.example.com".to_string(),
8 "https://www.news.example.com".to_string(),
9 ]),
10 require_https: Some(true),
11 max_comment_length: Some(1000),
12 };
13
14 let params: PutDomainConfigParams = PutDomainConfigParams {
15 tenant_id: "acme-corp-tenant".to_string(),
16 domain_to_update: "news.example.com".to_string(),
17 update_domain_config_params: update_params,
18 };
19
20 let response: PutDomainConfigResponse = put_domain_config(&configuration, params).await?;
21 Ok(())
22}
23

create_email_template Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_email_template_bodymodels::CreateEmailTemplateBodyDa

Odgovor

Vraća: CreateEmailTemplateResponse

Primer

create_email_template Primer
Copy Copy
1
2let params = CreateEmailTemplateParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 create_email_template_body: models::CreateEmailTemplateBody {
5 name: "Weekly Newsletter".to_string(),
6 slug: Some("news/weekly".to_string()),
7 subject: Some("Acme Corp — Weekly Updates".to_string()),
8 html_body: Some("<h1>Acme Weekly</h1><p>Top stories this week...</p>".to_string()),
9 text_body: Some("Acme Weekly — Top stories this week...".to_string()),
10 from_email: Some("newsletter@acme.com".to_string()),
11 reply_to: Some("support@acme.com".to_string()),
12 description: Some("Template used for the weekly customer newsletter".to_string()),
13 is_active: Some(true),
14 },
15};
16let created: CreateEmailTemplateResponse = create_email_template(&configuration, params).await?;
17

delete_email_template Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

delete_email_template Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let version: Option<&str> = Some("2025");
4 let template_id: String = if let Some(ver) = version {
5 format!("welcome-email-{}", ver)
6 } else {
7 "welcome-email".to_owned()
8 };
9 let params: DeleteEmailTemplateParams = DeleteEmailTemplateParams {
10 tenant_id: "acme-corp-tenant".to_owned(),
11 id: template_id,
12 };
13 let _response: ApiEmptyResponse = delete_email_template(&configuration, params).await?;
14 Ok(())
15}
16

delete_email_template_render_error Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa
error_idStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

delete_email_template_render_error Primer
Copy Copy
1
2let params: DeleteEmailTemplateRenderErrorParams = DeleteEmailTemplateRenderErrorParams {
3 tenant_id: String::from("acme-corp-tenant"),
4 id: String::from("marketing/newsletter/welcome"),
5 error_id: String::from("render_err_2026-06-15-7a3f"),
6 request_id: Some(String::from("req-83b2f9a1")),
7};
8
9let response: ApiEmptyResponse = delete_email_template_render_error(&configuration, params).await?;
10

get_email_template Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetEmailTemplateResponse

Primer

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

get_email_template_definitions Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa

Odgovor

Vraća: GetEmailTemplateDefinitionsResponse

Primer

Primer za get_email_template_definitions
Copy Copy
1
2async fn fetch_templates() -> Result<(), Error> {
3 let params: GetEmailTemplateDefinitionsParams = GetEmailTemplateDefinitionsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 locale: Some("en-US".to_string()),
6 };
7 let response: GetEmailTemplateDefinitionsResponse =
8 get_email_template_definitions(&configuration, params).await?;
9 println!("{:#?}", response);
10 Ok(())
11}
12

get_email_template_render_errors Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
skipf64Ne

Odgovor

Vraća: GetEmailTemplateRenderErrorsResponse

Primer

Primer get_email_template_render_errors
Copy Copy
1
2let params: GetEmailTemplateRenderErrorsParams = GetEmailTemplateRenderErrorsParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 id: "welcome-email-v2".to_string(),
5 skip: Some(10.0),
6};
7let response: GetEmailTemplateRenderErrorsResponse = get_email_template_render_errors(&configuration, params).await?;
8

get_email_templates Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringYes
skipf64No

Odgovor

Vraća: GetEmailTemplatesResponse

Primer

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

render_email_template Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
render_email_template_bodymodels::RenderEmailTemplateBodyDa
localeStringNe

Odgovor

Vraća: RenderEmailTemplateResponse

Primer

Primer render_email_template
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let render_body: models::RenderEmailTemplateBody = models::RenderEmailTemplateBody {
4 template_id: "notifications/comment_reply".to_string(),
5 subject: "Someone replied to your comment".to_string(),
6 recipient: "jane.doe@example.com".to_string(),
7 variables: std::collections::HashMap::from([
8 ("commenter".to_string(), "Alice".to_string()),
9 ("post_title".to_string(), "How to Rust".to_string()),
10 ]),
11 };
12
13 let params: RenderEmailTemplateParams = RenderEmailTemplateParams {
14 tenant_id: "acme-corp-tenant".to_string(),
15 render_email_template_body: render_body,
16 locale: Some("en-US".to_string()),
17 };
18
19 let response: RenderEmailTemplateResponse = render_email_template(&configuration, params).await?;
20 Ok(())
21}
22

update_email_template Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
update_email_template_bodymodels::UpdateEmailTemplateBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

update_email_template Primer
Copy Copy
1
2async fn run_update() -> Result<(), Error> {
3 let params: UpdateEmailTemplateParams = UpdateEmailTemplateParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "weekly-newsletter".to_string(),
6 update_email_template_body: models::UpdateEmailTemplateBody {
7 name: Some("Weekly Newsletter".to_string()),
8 subject: Some("Your Weekly Acme Updates".to_string()),
9 html: Some("<h1>Acme News</h1><p>Latest product and engineering updates.</p>".to_string()),
10 plain_text: Some("Acme News - Latest product and engineering updates.".to_string()),
11 enabled: Some(true),
12 sender_name: Some("Acme Team".to_string()),
13 sender_email: Some("newsletter@acme.com".to_string()),
14 locale: Some("en-US".to_string()),
15 },
16 };
17 update_email_template(&configuration, params).await?;
18 Ok(())
19}
20

get_event_log Internal Link

req tenantId urlId userIdWS

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa
user_id_wsStringDa
start_timei64Da
end_timei64Ne

Odgovor

Vraća: GetEventLogResponse

Primer

get_event_log Primer
Copy Copy
1
2async fn fetch_event_log() -> Result<(), Error> {
3 let params = GetEventLogParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article/2024-product-launch".to_string(),
6 user_id_ws: "user_98765_ws".to_string(),
7 start_time: 1710700800i64,
8 end_time: Some(1710787200i64),
9 };
10 let response: GetEventLogResponse = get_event_log(&configuration, params).await?;
11 println!("{:#?}", response);
12 Ok(())
13}
14

get_global_event_log Internal Link

req tenantId urlId userIdWS

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa
user_id_wsStringDa
start_timei64Da
end_timei64Ne

Odgovor

Vraća: GetEventLogResponse

Primer

Primer get_global_event_log
Copy Copy
1
2async fn fetch_events() -> Result<GetEventLogResponse, Error> {
3 let params: GetGlobalEventLogParams = GetGlobalEventLogParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article".to_string(),
6 user_id_ws: "user-42-ws".to_string(),
7 start_time: 1688208000i64,
8 end_time: Some(1688294400i64),
9 };
10 let response: GetEventLogResponse = get_global_event_log(&configuration, params).await?;
11 Ok(response)
12}
13

create_feed_post Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_feed_post_paramsmodels::CreateFeedPostParamsDa
broadcast_idStringNe
is_liveboolNe
do_spam_checkboolNe
skip_dup_checkboolNe

Odgovor

Vraća: CreateFeedPostsResponse

Primer

Primer create_feed_post
Copy Copy
1
2async fn run(configuration: &configuration::Configuration) -> Result<CreateFeedPostsResponse, Error> {
3 let create_feed: models::CreateFeedPostParams = models::CreateFeedPostParams {
4 title: "Acme Product Launch".to_string(),
5 body: "Acme Corp today launched the next-generation WidgetPro, offering improved performance and battery life.".to_string(),
6 ..Default::default()
7 };
8 let params: CreateFeedPostParams = CreateFeedPostParams {
9 tenant_id: "acme-corp-tenant".to_string(),
10 create_feed_post_params: create_feed,
11 broadcast_id: Some("launch-broadcast-2026".to_string()),
12 is_live: Some(true),
13 do_spam_check: Some(true),
14 skip_dup_check: Some(false),
15 };
16 let response: CreateFeedPostsResponse = create_feed_post(configuration, params).await?;
17 Ok(response)
18}
19

create_feed_post_public Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
create_feed_post_paramsmodels::CreateFeedPostParamsDa
broadcast_idStringNe
ssoStringNe

Odgovor

Vraća: CreateFeedPostResponse

Primer

create_feed_post_public Primer
Copy Copy
1
2async fn run() -> Result<CreateFeedPostResponse, Error> {
3 let params: CreateFeedPostPublicParams = CreateFeedPostPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 create_feed_post_params: models::CreateFeedPostParams {
6 title: "Acme Product Launch".to_string(),
7 content: "We're excited to launch our new product line today.".to_string(),
8 path: "news/product-launch".to_string(),
9 media: vec![models::FeedPostMediaItem {
10 asset: models::FeedPostMediaItemAsset {
11 url: "https://cdn.acme.com/images/launch.jpg".to_string(),
12 mime_type: Some("image/jpeg".to_string()),
13 },
14 caption: Some("Launch hero image".to_string()),
15 }],
16 ..Default::default()
17 },
18 broadcast_id: Some("broadcast-2026-06".to_string()),
19 sso: Some("sso-user-jane-xyz".to_string()),
20 };
21 let response: CreateFeedPostResponse = create_feed_post_public(&configuration, params).await?;
22 Ok(response)
23}
24

delete_feed_post_public Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
post_idStringDa
broadcast_idStringNe
ssoStringNe

Odgovor

Vraća: DeleteFeedPostPublicResponse

Primer

delete_feed_post_public Primer
Copy Copy
1
2async fn run(configuration: &configuration::Configuration) -> Result<DeleteFeedPostPublicResponse, Error> {
3 let params: DeleteFeedPostPublicParams = DeleteFeedPostPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 post_id: "news/article-2026-06-19".to_string(),
6 broadcast_id: Some("broadcast-789".to_string()),
7 sso: Some("sso-token-abc123".to_string()),
8 };
9 let response: DeleteFeedPostPublicResponse = delete_feed_post_public(configuration, params).await?;
10 Ok(response)
11}
12

get_feed_posts Internal Link


req tenantId afterId

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
after_idStringNe
limiti32Ne
tagsVecNe

Odgovor

Vraća: GetFeedPostsResponse

Primer

Primer get_feed_posts
Copy Copy
1
2async fn run() -> Result<GetFeedPostsResponse, Error> {
3 let cfg: &configuration::Configuration = &configuration;
4 let params: GetFeedPostsParams = GetFeedPostsParams {
5 tenant_id: String::from("acme-corp-tenant"),
6 after_id: Some(String::from("post_987654321")),
7 limit: Some(25),
8 tags: Some(vec![String::from("product-updates"), String::from("release")]),
9 };
10 let response: GetFeedPostsResponse = get_feed_posts(cfg, params).await?;
11 Ok(response)
12}
13

get_feed_posts_public Internal Link

req tenantId afterId

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
after_idStringNe
limiti32Ne
tagsVecNe
ssoStringNe
is_crawlerboolNe
include_user_infoboolNe

Odgovor

Vraća: PublicFeedPostsResponse

Primer

get_feed_posts_public Primer
Copy Copy
1
2async fn run_example() -> Result<(), Error> {
3 let params: GetFeedPostsPublicParams = GetFeedPostsPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 after_id: Some("post_9f8d7c".to_string()),
6 limit: Some(20),
7 tags: Some(vec!["news".to_string(), "product-updates".to_string()]),
8 sso: Some("sso-token-9a8b7c".to_string()),
9 is_crawler: Some(false),
10 include_user_info: Some(true),
11 };
12 let response: PublicFeedPostsResponse = get_feed_posts_public(&configuration, params).await?;
13 Ok(())
14}
15

get_feed_posts_stats Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
post_idsVecDa
ssoStringNe

Odgovor

Vraća: FeedPostsStatsResponse

Primer

Primer get_feed_posts_stats
Copy Copy
1
2async fn example_main(configuration: &configuration::Configuration) -> Result<(), Error> {
3 let params: GetFeedPostsStatsParams = GetFeedPostsStatsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 post_ids: vec![
6 "news/2026-product-launch".to_string(),
7 "blog/engineering-architecture".to_string()
8 ],
9 sso: Some("sso.jwt.token.eyJhbGci...".to_string()),
10 };
11 let stats: FeedPostsStatsResponse = get_feed_posts_stats(configuration, params).await?;
12 let _api_status: ApiStatus = /* use stats as needed */ stats.into();
13 Ok(())
14}
15

get_user_reacts_public Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
post_idsVecNe
ssoStringNe

Odgovor

Vraća: UserReactsResponse

Primer

get_user_reacts_public Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetUserReactsPublicParams = GetUserReactsPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 post_ids: Some(vec![
6 "news/article-123".to_string(),
7 "blog/post-456".to_string(),
8 ]),
9 sso: Some("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9".to_string()),
10 };
11 let response: UserReactsResponse = get_user_reacts_public(&configuration, params).await?;
12 Ok(())
13}
14

react_feed_post_public Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
post_idStringDa
react_body_paramsmodels::ReactBodyParamsDa
is_undoboolNe
broadcast_idStringNe
ssoStringNe

Odgovor

Vraća: ReactFeedPostResponse

Primer

react_feed_post_public Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: ReactFeedPostPublicParams = ReactFeedPostPublicParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 post_id: "news/article-2026-06-19".to_string(),
6 react_body_params: models::ReactBodyParams {
7 reaction: "like".to_string(),
8 user_id: "user-9876".to_string(),
9 metadata: None,
10 },
11 is_undo: Some(false),
12 broadcast_id: Some("broadcast-42".to_string()),
13 sso: Some("sso-token-abc123".to_string()),
14 };
15 let response: ReactFeedPostResponse = react_feed_post_public(&configuration, params).await?;
16 Ok(())
17}
18

update_feed_post Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
feed_postmodels::FeedPostDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer za update_feed_post
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let _response: ApiEmptyResponse = update_feed_post(&configuration, UpdateFeedPostParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 id: String::from("news/quarterly-product-update"),
6 feed_post: models::FeedPost {
7 title: Some(String::from("Quarterly Product Update")),
8 content: Some(String::from("We shipped new features and improvements across the platform.")),
9 tags: Some(vec![String::from("product"), String::from("release")]),
10 media: Some(vec![models::FeedPostMediaItem {
11 asset: Some(models::FeedPostMediaItemAsset {
12 url: String::from("https://cdn.acme.com/images/update.jpg"),
13 mime_type: Some(String::from("image/jpeg")),
14 }),
15 caption: Some(String::from("New dashboard view")),
16 order: Some(0),
17 }]),
18 links: Some(vec![models::FeedPostLink {
19 url: String::from("https://acme.com/blog/product-update"),
20 title: Some(String::from("Read the full post")),
21 }]),
22 },
23 }).await?;
24 Ok(())
25}
26

update_feed_post_public Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
post_idStringDa
update_feed_post_paramsmodels::UpdateFeedPostParamsDa
broadcast_idStringNe
ssoStringNe

Odgovor

Vraća: CreateFeedPostResponse

Primer

update_feed_post_public Primer
Copy Copy
1
2let params: UpdateFeedPostPublicParams = UpdateFeedPostPublicParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 post_id: "news/product-launch-2026".to_string(),
5 update_feed_post_params: models::UpdateFeedPostParams {
6 title: "Acme Product Launch".to_string(),
7 content: "Acme releases version 2.0 with major performance and security improvements.".to_string(),
8 media: Some(vec![
9 models::FeedPostMediaItem {
10 asset: models::FeedPostMediaItemAsset {
11 url: "https://cdn.acme.com/images/product-v2.jpg".to_string(),
12 mime_type: Some("image/jpeg".to_string())
13 }
14 }
15 ]),
16 links: Some(vec![
17 models::FeedPostLink {
18 url: "https://acme.com/blog/product-v2".to_string(),
19 title: Some("Product v2 announcement".to_string())
20 }
21 ]),
22 ..Default::default()
23 },
24 broadcast_id: Some("broadcast-789".to_string()),
25 sso: Some("sso-token-eyJhbGciOiJIUzI1Ni".to_string()),
26};
27let response: CreateFeedPostResponse = update_feed_post_public(&configuration, params).await?;
28

flag_comment_public Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
is_flaggedboolDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

flag_comment_public Primer
Copy Copy
1
2async fn run_flag_comment() -> Result<(), Error> {
3 let params: FlagCommentPublicParams = FlagCommentPublicParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 comment_id: String::from("comment-89b3"),
6 is_flagged: true,
7 sso: Some(String::from("sso-uid-7a2f")),
8 };
9
10 let _response: ApiEmptyResponse = flag_comment_public(&configuration, params).await?;
11 Ok(())
12}
13

get_gif_large Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
large_internal_url_sanitizedStringDa

Odgovor

Vraća: GifGetLargeResponse

Primer

Primer get_gif_large
Copy Copy
1
2async fn example() -> Result<GifGetLargeResponse, Error> {
3 let params: GetGifLargeParams = GetGifLargeParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 large_internal_url_sanitized: "gifs/news/article/welcome-gif".to_string(),
6 referrer: Some("https://news.example.com/article/123".to_string()),
7 };
8 let response: GifGetLargeResponse = get_gif_large(&configuration, params).await?;
9 Ok(response)
10}
11

get_gifs_search Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
searchStringDa
localeStringNe
ratingStringNe
pagef64Ne

Odgovor

Vraća: GetGifsSearchResponse

Primer

Primer get_gifs_search
Copy Copy
1
2async fn run_gif_search() -> Result<(), Error> {
3 let params: GetGifsSearchParams = GetGifsSearchParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 search: "breaking news".to_string(),
6 locale: Some("en-US".to_string()),
7 rating: Some("pg-13".to_string()),
8 page: Some(1.0),
9 };
10 let response: GetGifsSearchResponse = get_gifs_search(&configuration, params).await?;
11 println!("{:#?}", response);
12 Ok(())
13}
14

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
localeStringNe
ratingStringNe
pagef64Ne

Odgovor

Vraća: GetGifsTrendingResponse

Primer

get_gifs_trending Primer
Copy Copy
1
2async fn fetch_trending_gifs() -> Result<GetGifsTrendingResponse, Error> {
3 let params: GetGifsTrendingParams = GetGifsTrendingParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 locale: Some(String::from("en-US")),
6 rating: Some(String::from("pg-13")),
7 page: Some(1.0),
8 };
9 let trending: GetGifsTrendingResponse = get_gifs_trending(&configuration, params).await?;
10 Ok(trending)
11}
12

add_hash_tag Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringNe
create_hash_tag_bodymodels::CreateHashTagBodyNe

Odgovor

Vraća: CreateHashTagResponse

Primer

add_hash_tag Primer
Copy Copy
1
2async fn run() -> 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 name: "breaking-news".to_string(),
7 slug: "news/breaking".to_string(),
8 }),
9 };
10 let response: CreateHashTagResponse = add_hash_tag(&configuration, params).await?;
11 let _created_tag = response;
12 Ok(())
13}
14

add_hash_tags_bulk Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringNe
bulk_create_hash_tags_bodymodels::BulkCreateHashTagsBodyNe

Odgovor

Vraća: BulkCreateHashTagsResponse

Primer

Primer za 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: "breaking-news".to_string(),
9 path: "news/breaking".to_string(),
10 custom_config: Some(models::CustomConfigParameters {
11 visibility: Some("public".to_string())
12 })
13 },
14 models::BulkCreateHashTagsBodyTagsInner {
15 name: "product-launch".to_string(),
16 path: "company/product/launch".to_string(),
17 custom_config: Some(models::CustomConfigParameters {
18 visibility: Some("private".to_string())
19 })
20 }
21 ]
22 })
23 };
24
25 let response: BulkCreateHashTagsResponse = add_hash_tags_bulk(&configuration, params).await?;
26 println!("{:#?}", response);
27 Ok(())
28}
29

delete_hash_tag Internal Link

Parametri

NazivTipObaveznoOpis
tagStringDa
tenant_idStringNe
delete_hash_tag_request_bodymodels::DeleteHashTagRequestBodyNe

Odgovor

Vraća: ApiEmptyResponse

Primer

delete_hash_tag Primer
Copy Copy
1
2let params: DeleteHashTagParams = DeleteHashTagParams {
3 tag: "news/article".to_string(),
4 tenant_id: Some("acme-corp-tenant".to_string()),
5 delete_hash_tag_request_body: Some(DeleteHashTagRequestBody {}),
6};
7let response: ApiEmptyResponse = delete_hash_tag(&configuration, params).await?;
8

get_hash_tags Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
pagef64Ne

Odgovor

Vraća: GetHashTagsResponse

Primer

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

patch_hash_tag Internal Link

Parametri

NazivTypeObaveznoOpis
tagStringDa
tenant_idStringNe
update_hash_tag_bodymodels::UpdateHashTagBodyNe

Odgovor

Vraća: UpdateHashTagResponse

Primer

patch_hash_tag Primer
Copy Copy
1
2let cfg: &configuration::Configuration = &configuration;
3let body: models::UpdateHashTagBody = Default::default();
4let params: PatchHashTagParams = PatchHashTagParams {
5 tag: "news/article".to_string(),
6 tenant_id: Some("acme-corp-tenant".to_string()),
7 update_hash_tag_body: Some(body),
8};
9let response: UpdateHashTagResponse = patch_hash_tag(cfg, params).await?;
10

delete_moderation_vote Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
vote_idStringDa
ssoStringNe

Odgovor

Vraća: VoteDeleteResponse

Primer

Primer delete_moderation_vote
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteModerationVoteParams = DeleteModerationVoteParams {
4 comment_id: "news/article-2026-06-19-12345".to_string(),
5 vote_id: "vote-9a7c3b1d".to_string(),
6 sso: Some("user-9876@acme-corp".to_string()),
7 };
8 let response: VoteDeleteResponse = delete_moderation_vote(&configuration, params).await?;
9 Ok(())
10}
11

get_ban_users_from_comment Internal Link

Parametri

ImeTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: GetBannedUsersFromCommentResponse

Primer

Primer get_ban_users_from_comment
Copy Copy
1
2async fn fetch_banned_users_from_comment() -> Result<GetBannedUsersFromCommentResponse, Error> {
3 let params: GetBanUsersFromCommentParams = GetBanUsersFromCommentParams {
4 comment_id: String::from("news/tech/acme-launch/comment-42"),
5 sso: Some(String::from("acme-corp-sso-token-2026-06")),
6 };
7 let response: GetBannedUsersFromCommentResponse =
8 get_ban_users_from_comment(&configuration, params).await?;
9 Ok(response)
10}
11

get_comment_ban_status Internal Link

Parametri

NameTypeRequiredDescription
comment_idStringDa
ssoStringNe

Odgovor

Vraća: GetCommentBanStatusResponse

Primer

get_comment_ban_status Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetCommentBanStatusParams = GetCommentBanStatusParams {
4 comment_id: String::from("cmt-9f8b7a6e-4d3c-11ee-8c99-0242ac120002"),
5 sso: Some(String::from("acme-corp-tenant")),
6 };
7 let response: GetCommentBanStatusResponse = get_comment_ban_status(&configuration, params).await?;
8 Ok(())
9}
10

get_comment_children Internal Link

Parametri

ImeTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: ModerationApiChildCommentsResponse

Primer

Primer get_comment_children
Copy Copy
1
2async fn fetch_children() -> Result<ModerationApiChildCommentsResponse, Error> {
3 let params: GetCommentChildrenParams = GetCommentChildrenParams {
4 comment_id: "news/article-2026-06-19-cmt-42".to_string(),
5 sso: Some("sso-token-user-8f3d2a".to_string()),
6 };
7 let children: ModerationApiChildCommentsResponse = get_comment_children(&configuration, params).await?;
8 Ok(children)
9}
10

get_count Internal Link

Parametri

NazivTipObaveznoOpis
text_searchStringNe
by_ip_from_commentStringNe
filterStringNe
search_filtersStringNe
demoboolNe
ssoStringNe

Odgovor

Vraća: ModerationApiCountCommentsResponse

Primer

get_count Primer
Copy Copy
1
2async fn example_get_count() -> Result<ModerationApiCountCommentsResponse, Error> {
3 let params: GetCountParams = GetCountParams {
4 text_search: Some("breaking election coverage".to_string()),
5 by_ip_from_comment: Some("203.0.113.45".to_string()),
6 filter: Some("status:approved".to_string()),
7 search_filters: Some("section:politics tag:analysis".to_string()),
8 demo: Some(false),
9 sso: Some("acme-corp-tenant".to_string()),
10 };
11 let response: ModerationApiCountCommentsResponse = get_count(&configuration, params).await?;
12 Ok(response)
13}
14

get_counts Internal Link

Parametri

ImeTipObaveznoOpis
ssoStringNe

Odgovor

Vraća: GetBannedUsersCountResponse

Primer

get_counts Primer
Copy Copy
1
2async fn example_get_counts() -> Result<(), Error> {
3 let params: GetCountsParams = GetCountsParams {
4 sso: Some("acme-corp-tenant".to_string()),
5 };
6 let counts: GetBannedUsersCountResponse = get_counts(&configuration, params).await?;
7 println!("{:?}", counts);
8 Ok(())
9}
10

get_logs Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: ModerationApiGetLogsResponse

Primer

get_logs Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetLogsParams = GetLogsParams {
4 comment_id: "news/article/2026/06/fastcomments-thread-12345".to_string(),
5 sso: Some("acme-corp|user:john.doe@example.com".to_string()),
6 };
7 let logs: ModerationApiGetLogsResponse = get_logs(&configuration, params).await?;
8 Ok(())
9}
10

get_manual_badges Internal Link

Parametri

ImeTipObaveznoOpis
ssoStringNe

Odgovor

Vraća: GetTenantManualBadgesResponse

Primer

Primer get_manual_badges
Copy Copy
1
2async fn example_get_manual_badges() -> Result<(), Error> {
3 let params: GetManualBadgesParams = GetManualBadgesParams {
4 sso: Some(String::from("https://sso.acme-corp.com/authorize?tenant=acme-corp-tenant")),
5 };
6 let response: GetTenantManualBadgesResponse = get_manual_badges(&configuration, params).await?;
7 Ok(())
8}
9

get_manual_badges_for_user Internal Link

Parametri

NameTypeRequiredDescription
badges_user_idStringNe
comment_idStringNe
ssoStringNe

Odgovor

Vraća: GetUserManualBadgesResponse

Primer

Primer za get_manual_badges_for_user
Copy Copy
1
2async fn example_get_manual_badges() -> Result<GetUserManualBadgesResponse, Error> {
3 let params: GetManualBadgesForUserParams = GetManualBadgesForUserParams {
4 badges_user_id: Some(String::from("acme-user-42")),
5 comment_id: Some(String::from("news/article-5678")),
6 sso: Some(String::from("sso-token-abc123")),
7 };
8 let response: GetUserManualBadgesResponse = get_manual_badges_for_user(&configuration, params).await?;
9 Ok(response)
10}
11

get_moderation_comment Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
include_emailboolNe
include_ipboolNe
ssoStringNe

Odgovor

Vraća: ModerationApiCommentResponse

Primer

Primer get_moderation_comment
Copy Copy
1
2async fn fetch_comment() -> Result<ModerationApiCommentResponse, Error> {
3 let params: GetModerationCommentParams = GetModerationCommentParams {
4 comment_id: String::from("cmt-48291"),
5 include_email: Some(true),
6 include_ip: Some(false),
7 sso: Some(String::from("sso-acme-corp-2026-token")),
8 };
9 let response: ModerationApiCommentResponse = get_moderation_comment(&configuration, params).await?;
10 Ok(response)
11}
12

get_moderation_comment_text Internal Link

Parametri

ImeTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: GetCommentTextResponse

Primer

Primer get_moderation_comment_text
Copy Copy
1
2async fn fetch_comment_text() -> Result<(), Error> {
3 let params: GetModerationCommentTextParams = GetModerationCommentTextParams {
4 comment_id: String::from("news/technology/2026/06/19/ai-ethics-12345"),
5 sso: Some(String::from("sso-token-7f3a9b2c")),
6 };
7 let _response: GetCommentTextResponse = get_moderation_comment_text(&configuration, params).await?;
8 Ok(())
9}
10

get_pre_ban_summary Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
include_by_user_id_and_emailboolNe
include_by_ipboolNe
include_by_email_domainboolNe
ssoStringNe

Odgovor

Vraća: PreBanSummary

Primer

Primer get_pre_ban_summary
Copy Copy
1
2let params: GetPreBanSummaryParams = GetPreBanSummaryParams {
3 comment_id: String::from("news/article-9876-comment-42"),
4 include_by_user_id_and_email: Some(true),
5 include_by_ip: Some(false),
6 include_by_email_domain: Some(true),
7 sso: Some(String::from("sso-acme-corp-2026")),
8};
9let pre_ban_summary: PreBanSummary = get_pre_ban_summary(configuration, params).await?;
10

get_search_comments_summary Internal Link


Parametri

NazivTipObaveznoOpis
valueStringNe
filtersStringNe
search_filtersStringNe
ssoStringNe

Odgovor

Vraća: ModerationCommentSearchResponse

Primer

Primer get_search_comments_summary
Copy Copy
1
2async fn fetch_summary() -> Result<ModerationCommentSearchResponse, Error> {
3 let params: GetSearchCommentsSummaryParams = GetSearchCommentsSummaryParams {
4 value: Some("climate change".to_string()),
5 filters: Some(r#"{"tenant":"acme-corp-tenant","stream":"news/article"}"#.to_string()),
6 search_filters: Some(r#"{"author_email":"reporter@news.example.com","moderation_status":"reviewed"}"#.to_string()),
7 sso: Some("sso:acme:user:67890".to_string()),
8 };
9 let summary: ModerationCommentSearchResponse = get_search_comments_summary(&configuration, params).await?;
10 Ok(summary)
11}
12

get_search_pages Internal Link

Parametri

NameTypeRequiredDescription
valueStringNe
ssoStringNe

Odgovor

Vraća: ModerationPageSearchResponse

Primer

get_search_pages Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params = GetSearchPagesParams {
4 value: Some("news/article/world/2026-summit".to_string()),
5 sso: Some("acme-corp-tenant".to_string()),
6 };
7 let moderation_response: ModerationPageSearchResponse =
8 get_search_pages(&configuration, params).await?;
9 let _status: ApiStatus = moderation_response.status;
10 Ok(())
11}
12

get_search_sites Internal Link

Parametri

NazivTipObaveznoOpis
valueStringNe
ssoStringNe

Odgovor

Vraća: ModerationSiteSearchResponse

Primer

Primer get_search_sites
Copy Copy
1
2async fn run_search() -> Result<(), Error> {
3 let params = GetSearchSitesParams {
4 value: Some("news/article".to_string()),
5 sso: Some("acme-sso-provider".to_string()),
6 };
7 let response: ModerationSiteSearchResponse = get_search_sites(&configuration, params).await?;
8 println!("{:#?}", response);
9 Ok(())
10}
11

get_search_suggest Internal Link

Parametri

ImeTipObaveznoOpis
text_searchStringNe
ssoStringNe

Odgovor

Vraća: ModerationSuggestResponse

Primer

get_search_suggest Primer
Copy Copy
1
2async fn run_suggest() -> Result<(), Error> {
3 let params: GetSearchSuggestParams = GetSearchSuggestParams {
4 text_search: Some("news/article: presidential debate highlights".to_string()),
5 sso: Some("acme-corp-tenant".to_string()),
6 };
7 let suggestion: ModerationSuggestResponse = get_search_suggest(&configuration, params).await?;
8 Ok(())
9}
10

get_search_users Internal Link

Parametri

NazivTipObaveznoOpis
valueStringNe
ssoStringNe

Odgovor

Vraća: ModerationUserSearchResponse

Primer

Primer get_search_users
Copy Copy
1
2async fn example_search() -> Result<(), Error> {
3 let params: GetSearchUsersParams = GetSearchUsersParams {
4 value: Some("jane.doe@acme.com".to_string()),
5 sso: Some("acme-corp-tenant".to_string()),
6 };
7 let user_search: ModerationUserSearchResponse = get_search_users(&configuration, params).await?;
8 let _ = user_search;
9 Ok(())
10}
11

get_trust_factor Internal Link

Parametri

ImeTipObaveznoOpis
user_idStringNe
ssoStringNe

Odgovor

Vraća: GetUserTrustFactorResponse

Primer

Primer za get_trust_factor
Copy Copy
1
2async fn fetch_trust_factor() -> Result<(), Error> {
3 let params: GetTrustFactorParams = GetTrustFactorParams {
4 user_id: Some(String::from("journalist-984")),
5 sso: Some(String::from("google-oauth2|1029384756")),
6 };
7 let trust_response: GetUserTrustFactorResponse = get_trust_factor(&configuration, params).await?;
8 println!("{:#?}", trust_response);
9 Ok(())
10}
11

get_user_ban_preference Internal Link

Parametri

ImeTipObaveznoOpis
ssoStringNe

Odgovor

Vraća: ApiModerateGetUserBanPreferencesResponse

Primer

get_user_ban_preference Primer
Copy Copy
1
2async fn example() -> Result<(), Error> {
3 let params: GetUserBanPreferenceParams = GetUserBanPreferenceParams {
4 sso: Some("acme-corp-tenant".to_string()),
5 };
6 let response: ApiModerateGetUserBanPreferencesResponse =
7 get_user_ban_preference(&configuration, params).await?;
8 println!("{:#?}", response);
9 Ok(())
10}
11

get_user_internal_profile Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringNe
ssoStringNe

Odgovor

Vraća: GetUserInternalProfileResponse

Primer

get_user_internal_profile Primer
Copy Copy
1
2async fn fetch_profile() -> Result<GetUserInternalProfileResponse, Error> {
3 let params: GetUserInternalProfileParams = GetUserInternalProfileParams {
4 comment_id: Some(String::from("cmt-72a1f4")),
5 sso: Some(String::from("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoidXNlcjEyMyJ9.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c")),
6 };
7 let profile: GetUserInternalProfileResponse = get_user_internal_profile(&configuration, params).await?;
8 Ok(profile)
9}
10

post_adjust_comment_votes Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
adjust_comment_votes_paramsmodels::AdjustCommentVotesParamsDa
ssoStringNe

Odgovor

Vraća: AdjustVotesResponse

Primer

Primer za post_adjust_comment_votes
Copy Copy
1
2let params: PostAdjustCommentVotesParams = PostAdjustCommentVotesParams {
3 comment_id: String::from("cmt-news-2026-0042"),
4 adjust_comment_votes_params: models::AdjustCommentVotesParams {
5 delta: 1,
6 reason: Some(String::from("Added supporting source")),
7 },
8 sso: Some(String::from("sso-acme-corp-tenant-xyz123")),
9};
10let response: AdjustVotesResponse = post_adjust_comment_votes(&configuration, params).await?;
11

post_ban_user_from_comment Internal Link

Parametri

ImeTipObaveznoOpis
comment_idStringDa
ban_emailboolNe
ban_email_domainboolNe
ban_ipboolNe
delete_all_users_commentsboolNe
banned_untilStringNe
is_shadow_banboolNe
update_idStringNe
ban_reasonStringNe
ssoStringNe

Odgovor

Vraća: BanUserFromCommentResult

Primer

post_ban_user_from_comment Primer
Copy Copy
1
2let params: PostBanUserFromCommentParams = PostBanUserFromCommentParams {
3 comment_id: "news-article-98765-comment-123".to_string(),
4 ban_email: Some(true),
5 ban_email_domain: Some(false),
6 ban_ip: Some(true),
7 delete_all_users_comments: Some(true),
8 banned_until: Some("2026-12-31T23:59:59Z".to_string()),
9 is_shadow_ban: Some(false),
10 update_id: Some("moderator-42".to_string()),
11 ban_reason: Some("Repeated spam and abusive language".to_string()),
12 sso: Some("sso-user-token-8a7f".to_string()),
13};
14let ban_result: BanUserFromCommentResult = post_ban_user_from_comment(&configuration, params).await?;
15

post_ban_user_undo Internal Link

Parametri

ImeTipObaveznoOpis
ban_user_undo_paramsmodels::BanUserUndoParamsDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

post_ban_user_undo Primer
Copy Copy
1
2async fn undo_ban_example() -> Result<ApiEmptyResponse, Error> {
3 let ban_params: models::BanUserUndoParams = models::BanUserUndoParams {
4 tenant_slug: "acme-corp-tenant".to_string(),
5 user_id: "user-0042".to_string(),
6 ban_id: "ban-2025-08-15-0001".to_string(),
7 undone_by: "mod_stephanie".to_string(),
8 note: Some("Ban reversed after review".to_string()),
9 };
10 let params: PostBanUserUndoParams = PostBanUserUndoParams {
11 ban_user_undo_params: ban_params,
12 sso: Some("https://sso.acme-corp.com/saml/response".to_string()),
13 };
14 let resp: ApiEmptyResponse = post_ban_user_undo(&configuration, params).await?;
15 Ok(resp)
16}
17

post_bulk_pre_ban_summary Internal Link


Parametri

ImeTipObaveznoOpis
bulk_pre_ban_paramsmodels::BulkPreBanParamsDa
include_by_user_id_and_emailboolNe
include_by_ipboolNe
include_by_email_domainboolNe
ssoStringNe

Odgovor

Vraća: BulkPreBanSummary

Primer

post_bulk_pre_ban_summary Primer
Copy Copy
1
2let params: PostBulkPreBanSummaryParams = PostBulkPreBanSummaryParams {
3 bulk_pre_ban_params: models::BulkPreBanParams {
4 entries: vec![
5 models::BulkPreBanEntry {
6 user_id: Some("user-8472".to_string()),
7 email: Some("malicious.signals@fraudmail.com".to_string()),
8 ip: Some("198.51.100.23".to_string()),
9 },
10 models::BulkPreBanEntry {
11 user_id: Some("user-9021".to_string()),
12 email: Some("bot.account@spamnews.org".to_string()),
13 ip: None,
14 },
15 ],
16 reason: Some("coordinated spam campaign".to_string()),
17 },
18 include_by_user_id_and_email: Some(true),
19 include_by_ip: Some(true),
20 include_by_email_domain: Some(true),
21 sso: Some("acme-corp-sso".to_string()),
22};
23let summary: BulkPreBanSummary = post_bulk_pre_ban_summary(&configuration, params).await?
24

post_comments_by_ids Internal Link

Parametri

NazivTipObaveznoOpis
comments_by_ids_paramsmodels::CommentsByIdsParamsDa
ssoStringNe

Odgovor

Vraća: ModerationApiChildCommentsResponse

Primer

Primer za post_comments_by_ids
Copy Copy
1
2let comments_by_ids = models::CommentsByIdsParams {
3 ids: vec!["cmt-87a1".to_string(), "cmt-42b0".to_string()],
4 tenant: "acme-corp-tenant".to_string(),
5 site: "news/article".to_string(),
6};
7
8let params = PostCommentsByIdsParams {
9 comments_by_ids_params: comments_by_ids,
10 sso: Some("sso_jwt_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9".to_string()),
11};
12
13let response: ModerationApiChildCommentsResponse = post_comments_by_ids(&configuration, params).await?;
14

post_flag_comment Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringYes
ssoStringNo

Odgovor

Vraća: ApiEmptyResponse

Primer

post_flag_comment Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: PostFlagCommentParams = PostFlagCommentParams {
4 comment_id: String::from("news/acme-corp/article-237/comment-8421"),
5 sso: Some(String::from("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.acme-sso-payload")),
6 };
7 let response: ApiEmptyResponse = post_flag_comment(&configuration, params).await?;
8 Ok(())
9}
10

post_remove_comment Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: PostRemoveCommentResponse

Primer

post_remove_comment Primer
Copy Copy
1
2async fn run_remove_comment() -> Result<PostRemoveCommentResponse, Error> {
3 let params: PostRemoveCommentParams = PostRemoveCommentParams {
4 comment_id: String::from("cmt-9f8b6a3"),
5 sso: Some(String::from("sso-token-6f4e9a2b")),
6 };
7 let response: PostRemoveCommentResponse = post_remove_comment(&configuration, params).await?;
8 Ok(response)
9}
10

post_restore_deleted_comment Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

post_restore_deleted_comment Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params = PostRestoreDeletedCommentParams {
4 comment_id: String::from("news/article-2024-06-19/comment-8932"),
5 sso: Some(String::from("user-session-9f8e7d")),
6 };
7 let response: ApiEmptyResponse = post_restore_deleted_comment(&configuration, params).await?;
8 Ok(())
9}
10

post_set_comment_approval_status Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
approvedboolNe
ssoStringNe

Odgovor

Vraća: SetCommentApprovedResponse

Primer

Primer za post_set_comment_approval_status
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: PostSetCommentApprovalStatusParams = PostSetCommentApprovalStatusParams {
4 comment_id: String::from("news/article/2026-06-19/post-42/comment-128"),
5 approved: Some(true),
6 sso: Some(String::from("sso:user:acme:eyJhbGciOiJIUzI1Ni")),
7 };
8 let response: SetCommentApprovedResponse = post_set_comment_approval_status(&configuration, params).await?;
9 let _response = response;
10 Ok(())
11}
12

post_set_comment_review_status Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
reviewedboolNe
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

post_set_comment_review_status Primer
Copy Copy
1
2async fn set_comment_review_status() -> Result<ApiEmptyResponse, Error> {
3 let params: PostSetCommentReviewStatusParams = PostSetCommentReviewStatusParams {
4 comment_id: "news/article-2026-06-18-cmt-9843".to_string(),
5 reviewed: Some(true),
6 sso: Some("acme-sso-session-7f2e9b".to_string()),
7 };
8 let response: ApiEmptyResponse = post_set_comment_review_status(&configuration, params).await?;
9 Ok(response)
10}
11

post_set_comment_spam_status Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
spamboolNe
perm_not_spamboolNe
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer post_set_comment_spam_status
Copy Copy
1
2async fn run_set_spam_status() -> Result<(), Error> {
3 let params: PostSetCommentSpamStatusParams = PostSetCommentSpamStatusParams {
4 comment_id: String::from("acme-news/2026/06/19/article-84/comment-1023"),
5 spam: Some(true),
6 perm_not_spam: Some(false),
7 sso: Some(String::from("jwt:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.fakepayload")),
8 };
9 let response: ApiEmptyResponse = post_set_comment_spam_status(configuration, params).await?;
10 Ok(())
11}
12

post_set_comment_text Internal Link

Parametri

ImeTipObaveznoOpis
comment_idStringDa
set_comment_text_paramsmodels::SetCommentTextParamsDa
ssoStringNe

Odgovor

Vraća: SetCommentTextResponse

Primer

post_set_comment_text Primer
Copy Copy
1
2async fn update_comment_text() -> Result<(), Error> {
3 let params: PostSetCommentTextParams = PostSetCommentTextParams {
4 comment_id: "comment-73b2a9".to_string(),
5 set_comment_text_params: models::SetCommentTextParams {
6 text: "Updated: The event now starts at 9:00 AM local time.".to_string(),
7 },
8 sso: Some("sso-session-8a7f3b".to_string()),
9 };
10
11 let response: SetCommentTextResponse = post_set_comment_text(&configuration, params).await?;
12 Ok(())
13}
14

post_un_flag_comment Internal Link

Parametri

ImeTipObaveznoOpis
comment_idStringDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

post_un_flag_comment Primer
Copy Copy
1
2async fn run_unflag_comment() -> Result<ApiEmptyResponse, Error> {
3 let params: PostUnFlagCommentParams = PostUnFlagCommentParams {
4 comment_id: "news/world/2026/06/19/comment-7890".to_string(),
5 sso: Some("acme-corp-user-xyZ12Token".to_string()),
6 };
7 let response: ApiEmptyResponse = post_un_flag_comment(&configuration, params).await?;
8 Ok(response)
9}
10

post_vote Internal Link

Parametri

NazivTipObaveznoOpis
comment_idStringDa
directionStringNe
ssoStringNe

Odgovor

Vraća: VoteResponse

Primer

post_vote Primer
Copy Copy
1
2async fn submit_vote() -> Result<VoteResponse, Error> {
3 let params: PostVoteParams = PostVoteParams {
4 comment_id: String::from("news/article-1234/comment-5678"),
5 direction: Some(String::from("up")),
6 sso: Some(String::from("acme-corp-sso-token-abc123")),
7 };
8 let vote_response: VoteResponse = post_vote(&configuration, params).await?;
9 Ok(vote_response)
10}
11

put_award_badge Internal Link

Parametri

NameTypeRequiredDescription
badge_idStringDa
user_idStringNe
comment_idStringNe
broadcast_idStringNe
ssoStringNe

Odgovor

Vraća: AwardUserBadgeResponse

Primer

Primer za put_award_badge
Copy Copy
1
2async fn award_badge_example() -> Result<AwardUserBadgeResponse, Error> {
3 let params: PutAwardBadgeParams = PutAwardBadgeParams {
4 badge_id: "community-champion".to_string(),
5 user_id: Some("user-4821".to_string()),
6 comment_id: Some("news/article/2026-06-18-comment-91".to_string()),
7 broadcast_id: None,
8 sso: Some("acme-corp-sso-token-abc123".to_string()),
9 };
10 let response: AwardUserBadgeResponse = put_award_badge(&configuration, params).await?;
11 Ok(response)
12}
13

put_close_thread Internal Link

Parametri

NazivTipObaveznoOpis
url_idStringDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

put_close_thread Primer
Copy Copy
1
2async fn close_thread() -> Result<(), Error> {
3 let params: PutCloseThreadParams = PutCloseThreadParams {
4 url_id: String::from("news/2026/07/acme-launch-coverage"),
5 sso: Some(String::from("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.sso_payload.signature")),
6 };
7 let response: ApiEmptyResponse = put_close_thread(&configuration, params).await?;
8 Ok(())
9}
10

put_remove_badge Internal Link


Parametri

ImeTipObaveznoOpis
badge_idStringDa
user_idStringNe
comment_idStringNe
broadcast_idStringNe
ssoStringNe

Odgovor

Vraća: RemoveUserBadgeResponse

Primer

put_remove_badge Primer
Copy Copy
1
2let params: PutRemoveBadgeParams = PutRemoveBadgeParams {
3 badge_id: "trusted-moderator-1".to_string(),
4 user_id: Some("user-82f9".to_string()),
5 comment_id: Some("comment-000123".to_string()),
6 broadcast_id: Some("live-broadcast-nyc-2026".to_string()),
7 sso: Some("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9".to_string()),
8};
9
10let response: RemoveUserBadgeResponse = put_remove_badge(&configuration, params).await?;
11

put_reopen_thread Internal Link

Parametri

NameTypeRequiredDescription
url_idStringDa
ssoStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

put_reopen_thread Primer
Copy Copy
1
2async fn run_reopen_thread() -> Result<(), Error> {
3 let params: PutReopenThreadParams = PutReopenThreadParams {
4 url_id: String::from("acme-corp/news/article-2026-06-19"),
5 sso: Some(String::from("sso-token-9f8e7d6c")),
6 };
7 let response: ApiEmptyResponse = put_reopen_thread(configuration, params).await?;
8 let _response = response;
9 Ok(())
10}
11

set_trust_factor Internal Link

Parametri

NazivTipObaveznoOpis
user_idStringNe
trust_factorStringNe
ssoStringNe

Odgovor

Vraća: SetUserTrustFactorResponse

Primer

Primer set_trust_factor
Copy Copy
1
2async fn update_user_trust() -> Result<SetUserTrustFactorResponse, Error> {
3 let params: SetTrustFactorParams = SetTrustFactorParams {
4 user_id: Some("user-9821".to_string()),
5 trust_factor: Some("high".to_string()),
6 sso: Some("okta-acme-corp".to_string()),
7 };
8
9 let response: SetUserTrustFactorResponse = set_trust_factor(&configuration, params).await?;
10 Ok(response)
11}
12

create_moderator Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_moderator_bodymodels::CreateModeratorBodyDa

Odgovor

Vraća: CreateModeratorResponse

Primer

create_moderator Primer
Copy Copy
1
2let params: CreateModeratorParams = CreateModeratorParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 create_moderator_body: models::CreateModeratorBody {
5 email: "jane.doe@acme-corp.com".to_string(),
6 display_name: Some("Jane Doe".to_string()),
7 username: Some("jdoe".to_string()),
8 role: Some("moderator".to_string()),
9 sections: Some(vec!["news/article".to_string(), "tech/reviews".to_string()]),
10 notify: Some(true),
11 },
12};
13let response: CreateModeratorResponse = create_moderator(&configuration, params).await?;
14

delete_moderator Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
send_emailStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

delete_moderator Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteModeratorParams = DeleteModeratorParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 id: String::from("moderator-93b1f"),
6 send_email: Some(String::from("moderator@acme-corp.com")),
7 };
8 let _response: ApiEmptyResponse = delete_moderator(&configuration, params).await?;
9 Ok(())
10}
11

get_moderator Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetModeratorResponse

Primer

Primer get_moderator
Copy Copy
1
2async fn fetch_moderator() -> Result<GetModeratorResponse, Error> {
3 let params: GetModeratorParams = GetModeratorParams {
4 tenant_id: "acme-newsroom".to_string(),
5 id: "mod-jane-smith-001".to_string(),
6 };
7 let include_permissions: Option<bool> = Some(true);
8 let moderator: GetModeratorResponse = get_moderator(&configuration, params).await?;
9 Ok(moderator)
10}
11

get_moderators Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
skipf64Ne

Odgovor

Vraća: GetModeratorsResponse

Primer

get_moderators Primer
Copy Copy
1
2async fn fetch_moderators(configuration: &configuration::Configuration) -> Result<GetModeratorsResponse, Error> {
3 let params: GetModeratorsParams = GetModeratorsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 skip: Some(20.0),
6 };
7 let response: GetModeratorsResponse = get_moderators(configuration, params).await?;
8 Ok(response)
9}
10

send_invite Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
from_nameStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer send_invite
Copy Copy
1
2async fn run_send_invite() -> Result<ApiEmptyResponse, Error> {
3 let params: SendInviteParams = SendInviteParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-2026-06-19".to_string(),
6 from_name: "Acme News Team".to_string(),
7 subject: Some("Invitation to comment".to_string()),
8 message: Some("We value your feedback on this article — join the conversation.".to_string()),
9 ..Default::default()
10 };
11
12 let response: ApiEmptyResponse = send_invite(&configuration, params).await?;
13 Ok(response)
14}
15

update_moderator Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa
update_moderator_bodymodels::UpdateModeratorBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_moderator
Copy Copy
1
2async fn update_moderator_example() -> Result<(), Error> {
3 let params: UpdateModeratorParams = UpdateModeratorParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "moderator-1a2b3c".to_string(),
6 update_moderator_body: models::UpdateModeratorBody {
7 display_name: Some("Jane Doe".to_string()),
8 email: Some("jane.doe@acme-corp.com".to_string()),
9 role: Some("senior_moderator".to_string()),
10 active: Some(true),
11 permissions: Some(vec![
12 "approve_comments".to_string(),
13 "flag_spam".to_string(),
14 "ban_users".to_string(),
15 ]),
16 },
17 };
18 let _empty: ApiEmptyResponse = update_moderator(&configuration, params).await?;
19 Ok(())
20}
21

delete_notification_count Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringYes
idStringYes

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer delete_notification_count
Copy Copy
1
2async fn delete_notification_count_example() -> Result<(), Error> {
3 let params = DeleteNotificationCountParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article/notification-827b".to_string(),
6 if_match: Some("W/\"etag-827b\"".to_string()),
7 };
8 let _response: ApiEmptyResponse = delete_notification_count(&configuration, params).await?;
9 Ok(())
10}
11

get_cached_notification_count Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetCachedNotificationCountResponse

Primer

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

get_notification_count Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
user_idStringNe
url_idStringNe
from_comment_idStringNe
viewedboolNe

Odgovor

Vraća: GetNotificationCountResponse

Primer

Primer get_notification_count
Copy Copy
1
2let params: GetNotificationCountParams = GetNotificationCountParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 user_id: Some("user-123".to_string()),
5 url_id: Some("news/article/2026/06/19".to_string()),
6 from_comment_id: Some("cmt-98765".to_string()),
7 viewed: Some(false),
8};
9let notification_count: GetNotificationCountResponse = get_notification_count(configuration, params).await?;
10

get_notifications Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
user_idStringNe
url_idStringNe
from_comment_idStringNe
viewedboolNe
skipf64Ne

Odgovor

Vraća: GetNotificationsResponse

Primer

Primer get_notifications
Copy Copy
1
2async fn run_get_notifications() -> Result<(), Error> {
3 let params: GetNotificationsParams = GetNotificationsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 user_id: Some("user-9a7b".to_string()),
6 url_id: Some("news/article/launch-announcement".to_string()),
7 from_comment_id: Some("cmt-1024".to_string()),
8 viewed: Some(false),
9 skip: Some(0.0),
10 };
11 let notifications: GetNotificationsResponse = get_notifications(&configuration, params).await?;
12 Ok(())
13}
14

update_notification Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
update_notification_bodymodels::UpdateNotificationBodyDa
user_idStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_notification
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let update_notification_body: models::UpdateNotificationBody = models::UpdateNotificationBody {
4 enabled: true,
5 event: "comment.posted".into(),
6 channels: vec!["email".into(), "webhook".into()],
7 template_id: "tmpl-new-comment".into(),
8 };
9 let params: UpdateNotificationParams = UpdateNotificationParams {
10 tenant_id: "acme-corp-tenant".to_string(),
11 id: "notif-12345".to_string(),
12 update_notification_body,
13 user_id: Some("admin-user-99".to_string()),
14 };
15 let response: ApiEmptyResponse = update_notification(&configuration, params).await?;
16 Ok(())
17}
18

create_v1_page_react Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
url_idStringDa
titleStringNe

Odgovor

Vraća: CreateV1PageReact

Primer

create_v1_page_react Primer
Copy Copy
1
2async fn example() -> Result<CreateV1PageReact, Error> {
3 let params = CreateV1PageReactParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article/2026/06/launch".to_string(),
6 title: Some("Acme Launch Coverage".to_string()),
7 };
8 let reaction: CreateV1PageReact = create_v1_page_react(&configuration, params).await?;
9 Ok(reaction)
10}
11

create_v2_page_react Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
url_idStringDa
idStringDa
titleStringNe

Odgovor

Vraća: CreateV1PageReact

Primer

create_v2_page_react Primer
Copy Copy
1
2async fn example_create_react() -> Result<CreateV1PageReact, Error> {
3 let params: CreateV2PageReactParams = CreateV2PageReactParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 url_id: String::from("news/2026/product-launch"),
6 id: String::from("react-like"),
7 title: Some(String::from("Product Launch Coverage")),
8 };
9 let response: CreateV1PageReact = create_v2_page_react(&config, params).await?;
10 Ok(response)
11}
12

delete_v1_page_react Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
url_idStringDa

Odgovor

Vraća: CreateV1PageReact

Primer

delete_v1_page_react Primer
Copy Copy
1
2async fn run_delete_react() -> Result<(), Error> {
3 let tenant_id: String = "acme-corp-tenant".to_string();
4 let maybe_url_id: Option<String> = Some("news/politics/2026-election".to_string());
5 let url_id: String = maybe_url_id.unwrap();
6 let params: DeleteV1PageReactParams = DeleteV1PageReactParams { tenant_id, url_id };
7 let deleted: CreateV1PageReact = delete_v1_page_react(&configuration, params).await?;
8 let _result: CreateV1PageReact = deleted;
9 Ok(())
10}
11

delete_v2_page_react Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa
idStringDa

Odgovor

Vraća: CreateV1PageReact

Primer

delete_v2_page_react Primer
Copy Copy
1
2async fn run_delete() -> Result<(), Error> {
3 let params: DeleteV2PageReactParams = DeleteV2PageReactParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article/2026/06/feature-ml".to_string(),
6 id: "react_987654321".to_string(),
7 };
8 let request_id: Option<String> = Some("req-20260619-01".to_string());
9 let deleted: CreateV1PageReact = delete_v2_page_react(&configuration, params).await?;
10 let _ = request_id;
11 Ok(())
12}
13

get_v1_page_likes Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa

Odgovor

Vraća: GetV1PageLikes

Primer

get_v1_page_likes Primer
Copy Copy
1
2async fn fetch_page_likes() -> Result<(), Error> {
3 let params: GetV1PageLikesParams = GetV1PageLikesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article-123".to_string(),
6 };
7 let optional_referrer: Option<String> = Some("https://news.example.com/article-123".to_string());
8 let likes: GetV1PageLikes = get_v1_page_likes(&configuration, params).await?;
9 println!("retrieved page likes: {:?}", optional_referrer);
10 let _consumed: GetV1PageLikes = likes;
11 Ok(())
12}
13

get_v2_page_react_users Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa
idStringDa

Odgovor

Vraća: GetV2PageReactUsersResponse

Primer

get_v2_page_react_users Primer
Copy Copy
1
2async fn example_get_react_users(configuration: &configuration::Configuration) -> Result<(), Error> {
3 let params: GetV2PageReactUsersParams = GetV2PageReactUsersParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 url_id: String::from("news/2026/space-flight-updates"),
6 id: String::from("page-7a3f"),
7 include_reaction_info: Some(true),
8 limit: Some(100),
9 };
10 let response: GetV2PageReactUsersResponse = get_v2_page_react_users(configuration, params).await?;
11 let _response = response;
12 Ok(())
13}
14

get_v2_page_reacts Internal Link

Parameters

ImeTipObaveznoOpis
tenant_idStringDa
url_idStringDa

Odgovor

Vraća: GetV2PageReacts

Primer

Primer get_v2_page_reacts
Copy Copy
1
2async fn fetch_reacts_example() -> Result<(), Error> {
3 let params: GetV2PageReactsParams = GetV2PageReactsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article/rust-async-await".to_string(),
6 include_counts: Some(true),
7 limit: Some(50),
8 cursor: Some("cursor_abc123".to_string()),
9 };
10 let reacts: GetV2PageReacts = get_v2_page_reacts(&configuration, params).await?;
11 let _ = reacts;
12 Ok(())
13}
14

add_page Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_api_page_datamodels::CreateApiPageDataDa

Odgovor

Vraća: AddPageApiResponse

Primer

Primer add_page
Copy Copy
1
2let create_api_page_data: models::CreateApiPageData = models::CreateApiPageData {
3 path: "news/article".to_string(),
4 title: "Breaking: Market Rally".to_string(),
5 url: Some("https://acme.example.com/news/market-rally".to_string()),
6 meta_description: Some("Markets surge after earnings beat expectations".to_string()),
7 tags: Some(vec!["finance".to_string(), "markets".to_string()]),
8};
9
10let params: AddPageParams = AddPageParams {
11 tenant_id: "acme-corp-tenant".to_string(),
12 create_api_page_data,
13};
14
15let response: AddPageApiResponse = add_page(&configuration, params).await?;
16

delete_page Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: DeletePageApiResponse


get_offline_users Internal Link


Prethodni komentatori na stranici koji trenutno NISU online. Sortirano po displayName. Koristite ovo nakon što iscrpite /users/online da biste prikazali sekciju "Members". Paginacija kursora po commenterName: server prolazi delimični indeks {tenantId, urlId, commenterName} od afterName unapred putem $gt, bez troška $skip.

Parametri

NameTypeRequiredDescription
tenant_idStringDa
url_idStringDa
after_nameStringNe
after_user_idStringNe

Odgovor

Vraća: PageUsersOfflineResponse

Primer

get_offline_users Primer
Copy Copy
1
2async fn fetch_offline_users() -> Result<PageUsersOfflineResponse, Error> {
3 let params: GetOfflineUsersParams = GetOfflineUsersParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/world/today".to_string(),
6 after_name: Some("jane.smith".to_string()),
7 after_user_id: Some("user-1024".to_string()),
8 };
9 let response: PageUsersOfflineResponse = get_offline_users(&configuration, params).await?;
10 Ok(response)
11}
12

get_online_users Internal Link

Trenutno online posetioci stranice: osobe čija je websocket sesija trenutno pretplaćena na stranicu. Vraća anonCount + totalCount (pretplatnici cele sobe, uključujući anonimne posetioce koje ne navodimo).

Parametri

NazivTipObaveznoOpis
tenant_idStringYes
url_idStringYes
after_nameStringNo
after_user_idStringNo

Odgovor

Vraća: PageUsersOnlineResponse

Primer

get_online_users Primer
Copy Copy
1
2async fn fetch_online_users() -> Result<PageUsersOnlineResponse, Error> {
3 let params: GetOnlineUsersParams = GetOnlineUsersParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/world/article-2026".to_string(),
6 after_name: Some("jane.doe".to_string()),
7 after_user_id: Some("user_98765".to_string()),
8 };
9 let response: PageUsersOnlineResponse = get_online_users(&configuration, params).await?;
10 Ok(response)
11}
12

get_page_by_urlid Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringYes
url_idStringYes

Odgovor

Vraća: GetPageByUrlidApiResponse

Primer

get_page_by_urlid Primer
Copy Copy
1
2async fn fetch_page() -> Result<GetPageByUrlidApiResponse, Error> {
3 let params: GetPageByUrlidParams = GetPageByUrlidParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article/how-to-build-an-api".to_string(),
6 locale: Some("en-US".to_string()),
7 };
8 let page: GetPageByUrlidApiResponse = get_page_by_urlid(&configuration, params).await?;
9 Ok(page)
10}
11

get_pages Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa

Odgovor

Vraća: GetPagesApiResponse

Primer

Primer get_pages
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetPagesParams = GetPagesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 path: Some("news/article".to_string()),
6 limit: Some(25),
7 cursor: Some("cursor_01AZ".to_string()),
8 };
9 let pages: GetPagesApiResponse = get_pages(&configuration, params).await?;
10 Ok(())
11}
12

get_pages_public Internal Link

Lista stranica za tenant. Koristi se od strane FChat desktop klijenta za popunjavanje njegove liste soba. Zahteva da enableFChat bude true na razrešenoj prilagođenoj konfiguraciji za svaku stranicu. Stranice koje zahtevaju SSO filtriraju se prema pristupu grupa korisnika koji šalje zahtev.

Parametri

NameTypeRequiredDescription
tenant_idStringDa
cursorStringNe
limiti32Ne
qStringNe
sort_bymodels::PagesSortByNe
has_commentsboolNe

Odgovor

Vraća: GetPublicPagesResponse

Primer

get_pages_public Primer
Copy Copy
1
2let params: GetPagesPublicParams = GetPagesPublicParams {
3 tenant_id: String::from("acme-corp-tenant"),
4 cursor: Some(String::from("cursor_eyJwZl9pZCI6IjEyMyJ9")),
5 limit: Some(50),
6 q: Some(String::from("tag:release status:published")),
7 sort_by: Some(models::PagesSortBy::CreatedAt),
8 has_comments: Some(true),
9};
10let response: GetPublicPagesResponse = get_pages_public(&configuration, params).await?;
11

get_users_info Internal Link


Grupne informacije o korisnicima za tenant. Za zadate userIds vraća informacije za prikaz iz User / SSOUser. Koristi se u widgetu za komentare za obogaćivanje korisnika koji su se upravo pojavili putem događaja prisutnosti. Nema konteksta stranice: privatnost se dosledno primenjuje (privatni profili su maskirani).

Parametri

NameTypeRequiredDescription
tenant_idStringYes
idsStringYes

Odgovor

Vraća: PageUsersInfoResponse

Primer

Primer get_users_info
Copy Copy
1
2let params: GetUsersInfoParams = GetUsersInfoParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 ids: "alice@example.com,bob@example.com,carol@example.com".to_string(),
5 page_size: Some(100),
6};
7let users_response: PageUsersInfoResponse = get_users_info(&configuration, params).await?;
8

patch_page Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa
update_api_page_datamodels::UpdateApiPageDataDa

Odgovor

Vraća: PatchPageApiResponse

Primer

patch_page Primer
Copy Copy
1
2async fn update_page() -> Result<PatchPageApiResponse, Error> {
3 let params: PatchPageParams = PatchPageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/product-update-2026".to_string(),
6 update_api_page_data: models::UpdateApiPageData {
7 title: Some("June 2026 Product Update".to_string()),
8 slug: Some("news/product-update-2026".to_string()),
9 description: Some("Summarizes June releases and roadmap changes".to_string()),
10 is_published: Some(true),
11 content: Some("<p>We shipped performance improvements and new integrations.</p>".to_string()),
12 },
13 };
14
15 let response: PatchPageApiResponse = patch_page(&configuration, params).await?;
16 Ok(response)
17}
18

delete_pending_webhook_event Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

delete_pending_webhook_event Primer
Copy Copy
1
2async fn perform_delete() -> Result<ApiEmptyResponse, Error> {
3 let tenant_id: Option<String> = Some(String::from("acme-corp-tenant"));
4 let id: Option<String> = Some(String::from("wh_evt_2026_09f3"));
5 let params: DeletePendingWebhookEventParams = DeletePendingWebhookEventParams {
6 tenant_id: tenant_id.unwrap(),
7 id: id.unwrap(),
8 };
9 let response: ApiEmptyResponse = delete_pending_webhook_event(&configuration, params).await?;
10 Ok(response)
11}
12

get_pending_webhook_event_count Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
comment_idStringNe
external_idStringNe
event_typeStringNe
domainStringNe
attempt_count_gtf64Ne

Odgovor

Vraća: GetPendingWebhookEventCountResponse

Primer

Primer get_pending_webhook_event_count
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let cfg: &configuration::Configuration = &configuration;
4 let params: GetPendingWebhookEventCountParams = GetPendingWebhookEventCountParams {
5 tenant_id: "acme-corp-tenant".to_string(),
6 comment_id: Some("cmt_92a7b3".to_string()),
7 external_id: Some("article-2026-06-19".to_string()),
8 event_type: Some("comment.created".to_string()),
9 domain: Some("acme.com".to_string()),
10 attempt_count_gt: Some(1.0),
11 };
12 let count_response: GetPendingWebhookEventCountResponse = get_pending_webhook_event_count(cfg, params).await?;
13 Ok(())
14}
15

get_pending_webhook_events Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
comment_idStringNe
external_idStringNe
event_typeStringNe
domainStringNe
attempt_count_gtf64Ne
skipf64Ne

Odgovor

Vraća: GetPendingWebhookEventsResponse

Primer

Primer get_pending_webhook_events
Copy Copy
1
2async fn run() -> Result<GetPendingWebhookEventsResponse, Error> {
3 let params: GetPendingWebhookEventsParams = GetPendingWebhookEventsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: Some("cmt_12345".to_string()),
6 external_id: Some("ext-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 skip: Some(0.0),
11 };
12 let response: GetPendingWebhookEventsResponse =
13 get_pending_webhook_events(&configuration, params).await?;
14 Ok(response)
15}
16

create_question_config Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_question_config_bodymodels::CreateQuestionConfigBodyDa

Odgovor

Vraća: CreateQuestionConfigResponse

Primer

create_question_config Primer
Copy Copy
1
2let params: CreateQuestionConfigParams = CreateQuestionConfigParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 create_question_config_body: models::CreateQuestionConfigBody {
5 slug: "news/article".to_string(),
6 title: "Article Comments".to_string(),
7 description: Some("Questions configuration for news articles".to_string()),
8 enabled: Some(true),
9 allow_anonymous: Some(false),
10 moderation_level: Some("pre_moderation".to_string()),
11 custom_options: Some(vec![
12 models::QuestionConfigCustomOptionsInner { key: "max_length".to_string(), value: "500".to_string() }
13 ]),
14 },
15};
16let response: CreateQuestionConfigResponse = create_question_config(&configuration, params).await?;
17

delete_question_config Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer delete_question_config
Copy Copy
1
2async fn run_delete_question_config() -> Result<(), Error> {
3 let params: DeleteQuestionConfigParams = DeleteQuestionConfigParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 id: "faq/general-2026".to_owned(),
6 };
7 let _response: ApiEmptyResponse = delete_question_config(&configuration, params).await?;
8 Ok(())
9}
10

get_question_config Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetQuestionConfigResponse

Primer

Primer get_question_config
Copy Copy
1
2async fn example_get_question_config() -> Result<GetQuestionConfigResponse, Error> {
3 let configuration: configuration::Configuration = configuration::Configuration::default();
4 let optional_tenant: Option<String> = Some("acme-corp-tenant".to_string());
5 let tenant_id: String = optional_tenant.unwrap_or_else(|| "acme-default".to_string());
6 let params = GetQuestionConfigParams {
7 tenant_id,
8 id: "news/article/2026-06-18".to_string(),
9 };
10 let response: GetQuestionConfigResponse = get_question_config(&configuration, params).await?;
11 Ok(response)
12}
13

get_question_configs Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
skipf64Ne

Odgovor

Vraća: GetQuestionConfigsResponse

Primer

Primer za get_question_configs
Copy Copy
1
2async fn fetch_question_configs() -> Result<GetQuestionConfigsResponse, Error> {
3 let params: GetQuestionConfigsParams = GetQuestionConfigsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 skip: Some(20.0),
6 };
7 let response: GetQuestionConfigsResponse = get_question_configs(&configuration, params).await?;
8 Ok(response)
9}
10

update_question_config Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
update_question_config_bodymodels::UpdateQuestionConfigBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_question_config
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: UpdateQuestionConfigParams = UpdateQuestionConfigParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "question-config-789".to_string(),
6 update_question_config_body: models::UpdateQuestionConfigBody {
7 label: Some("Article feedback".to_string()),
8 enabled: Some(true),
9 require_login: Some(false),
10 custom_options: Some(vec![
11 models::QuestionConfigCustomOptionsInner {
12 key: "category".to_string(),
13 value: "news".to_string(),
14 },
15 ]),
16 },
17 };
18
19 let _response: ApiEmptyResponse = update_question_config(&configuration, params).await?;
20 Ok(())
21}
22

create_question_result Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_question_result_bodymodels::CreateQuestionResultBodyDa

Odgovor

Vraća: CreateQuestionResultResponse

Primer

Primer create_question_result
Copy Copy
1
2let params: CreateQuestionResultParams = CreateQuestionResultParams {
3 tenant_id: String::from("acme-corp-tenant"),
4 create_question_result_body: models::CreateQuestionResultBody {
5 question_id: String::from("news/article/1234"),
6 user_id: Some(String::from("reader-9876")),
7 answer: String::from("B"),
8 correct: Some(false),
9 score: Some(0.0),
10 },
11};
12let response: CreateQuestionResultResponse = create_question_result(&configuration, params).await?;
13

delete_question_result Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer delete_question_result
Copy Copy
1
2async fn run_delete() -> Result<(), Error> {
3 let tenant_id: String = "acme-corp-tenant".to_string();
4 let id: String = "news/article-12345/question-67890".to_string();
5
6 let params = DeleteQuestionResultParams {
7 tenant_id,
8 id,
9 };
10
11 let response: ApiEmptyResponse = delete_question_result(&configuration, params).await?;
12 Ok(())
13}
14

get_question_result Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetQuestionResultResponse

Primer

Primer get_question_result
Copy Copy
1
2async fn example_call() -> Result<(), Error> {
3 let params: GetQuestionResultParams = GetQuestionResultParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article-2026-07-poll-question-1".to_string(),
6 include_details: Some(true),
7 locale: Some("en-US".to_string()),
8 };
9 let result: GetQuestionResultResponse = get_question_result(&configuration, params).await?;
10 Ok(())
11}
12

get_question_results Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringNe
user_idStringNe
start_dateStringNe
question_idStringNe
question_idsStringNe
skipf64Ne

Odgovor

Vraća: GetQuestionResultsResponse

Primer

Primer get_question_results
Copy Copy
1
2let params: GetQuestionResultsParams = GetQuestionResultsParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 url_id: Some("news/world/2026-election".to_string()),
5 user_id: Some("user_12345".to_string()),
6 start_date: Some("2026-01-01T00:00:00Z".to_string()),
7 question_id: Some("q_987".to_string()),
8 question_ids: Some("q_987,q_654".to_string()),
9 skip: Some(20.0),
10};
11
12let response: GetQuestionResultsResponse = get_question_results(&configuration, params).await?;
13

update_question_result Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
update_question_result_bodymodels::UpdateQuestionResultBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_question_result
Copy Copy
1
2async fn example_update_question_result() -> Result<(), Error> {
3 let body: models::UpdateQuestionResultBody = models::UpdateQuestionResultBody {
4 answered: Some(true),
5 confidence: Some(0.92),
6 responder: Some("editor-zoe".to_string()),
7 notes: Some("Validated against article sources".to_string()),
8 };
9 let params: UpdateQuestionResultParams = UpdateQuestionResultParams {
10 tenant_id: "acme-news-tenant".to_string(),
11 id: "news/article/5621/question/12".to_string(),
12 update_question_result_body: body,
13 };
14 let _resp: ApiEmptyResponse = update_question_result(&configuration, params).await?;
15 Ok(())
16}
17

aggregate_question_results Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
question_idStringNe
question_idsVecNe
url_idStringNe
time_bucketmodels::AggregateTimeBucketNe
start_datechrono::DateTimechrono::FixedOffsetNe
force_recalculateboolNe

Odgovor

Vraća: AggregateQuestionResultsResponse

Primer

Primer za aggregate_question_results
Copy Copy
1
2async fn run() -> Result<AggregateQuestionResultsResponse, Error> {
3 let params: AggregateQuestionResultsParams = AggregateQuestionResultsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 question_id: Some("q-12345".to_string()),
6 question_ids: Some(vec!["q-12345".to_string(), "q-67890".to_string()]),
7 url_id: Some("news/article/2026/06/breaking".to_string()),
8 time_bucket: Some(models::AggregateTimeBucket::Daily),
9 start_date: Some(chrono::DateTime::parse_from_rfc3339("2026-01-01T00:00:00+00:00").unwrap()),
10 force_recalculate: Some(true),
11 };
12 let response: AggregateQuestionResultsResponse = aggregate_question_results(&configuration, params).await?;
13 Ok(response)
14}
15

bulk_aggregate_question_results Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
bulk_aggregate_question_results_requestmodels::BulkAggregateQuestionResultsRequestDa
force_recalculateboolNe

Odgovor

Vraća: BulkAggregateQuestionResultsResponse

Primer

Primer bulk_aggregate_question_results
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: BulkAggregateQuestionResultsParams = BulkAggregateQuestionResultsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 bulk_aggregate_question_results_request: models::BulkAggregateQuestionResultsRequest {
6 items: vec![
7 models::BulkAggregateQuestionItem {
8 question_id: "article-engagement".to_string(),
9 path: "news/article/987".to_string(),
10 include_subpaths: true,
11 }
12 ],
13 time_bucket: models::AggregateTimeBucket::Daily,
14 range_start: "2026-05-01T00:00:00Z".to_string(),
15 range_end: "2026-05-31T23:59:59Z".to_string(),
16 },
17 force_recalculate: Some(true),
18 };
19 let result: BulkAggregateQuestionResultsResponse = bulk_aggregate_question_results(&configuration, params).await?;
20 println!("{:#?}", result);
21 Ok(())
22}
23

combine_comments_with_question_results Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
question_idStringNe
question_idsVecNe
url_idStringNe
start_datechrono::DateTimechrono::FixedOffsetNe
force_recalculateboolNe
min_valuef64Ne
max_valuef64Ne
limitf64Ne

Odgovor

Vraća: CombineQuestionResultsWithCommentsResponse

Primer

Primer combine_comments_with_question_results
Copy Copy
1
2let params: CombineCommentsWithQuestionResultsParams = CombineCommentsWithQuestionResultsParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 question_id: None,
5 question_ids: Some(vec!["product-satisfaction".to_string(), "support-response".to_string()]),
6 url_id: Some("news/article-42".to_string()),
7 start_date: Some(chrono::FixedOffset::east(0).ymd(2025, 12, 01).and_hms(08, 00, 00)),
8 force_recalculate: Some(true),
9 min_value: Some(0.0),
10 max_value: Some(1.0),
11 limit: Some(250.0),
12};
13let response: CombineQuestionResultsWithCommentsResponse = combine_comments_with_question_results(&configuration, params).await?;
14

add_sso_user Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_apisso_user_datamodels::CreateApissoUserDataDa

Odgovor

Vraća: AddSsoUserApiResponse


delete_sso_user Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
delete_commentsboolNe
comment_delete_modeStringNe

Odgovor

Vraća: DeleteSsoUserApiResponse

get_sso_user_by_email Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
emailStringDa

Odgovor

Vraća: GetSsoUserByEmailApiResponse


get_sso_user_by_id Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetSsoUserByIdApiResponse


get_sso_users Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
skipi32Ne

Odgovor

Vraća: GetSsoUsersResponse

Primer

get_sso_users Primer
Copy Copy
1
2async fn run() -> Result<GetSsoUsersResponse, Error> {
3 let params: GetSsoUsersParams = GetSsoUsersParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 skip: Some(10),
6 };
7 let sso_users: GetSsoUsersResponse = get_sso_users(&configuration, params).await?;
8 Ok(sso_users)
9}
10

patch_sso_user Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa
update_apisso_user_datamodels::UpdateApissoUserDataDa
update_commentsboolNe

Odgovor

Vraća: PatchSsoUserApiResponse


put_sso_user Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
update_apisso_user_datamodels::UpdateApissoUserDataDa
update_commentsboolNe

Odgovor

Vraća: PutSsoUserApiResponse

create_subscription Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_api_user_subscription_datamodels::CreateApiUserSubscriptionDataDa

Odgovor

Vraća: CreateSubscriptionApiResponse

Primer

Primer create_subscription
Copy Copy
1
2let params: CreateSubscriptionParams = CreateSubscriptionParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 create_api_user_subscription_data: models::CreateApiUserSubscriptionData {
5 user_id: "user-987".to_string(),
6 plan_id: "pro-monthly".to_string(),
7 source: Some("website".to_string()),
8 topics: Some(vec!["news/article".to_string(), "product/updates".to_string()]),
9 auto_renew: Some(true),
10 metadata: Some(std::collections::HashMap::from([("ref".to_string(), "signup_form".to_string())])),
11 },
12};
13let response: CreateSubscriptionApiResponse = create_subscription(&configuration, params).await?;
14

delete_subscription Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
user_idStringNe

Odgovor

Vraća: DeleteSubscriptionApiResponse


get_subscriptions Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
user_idStringNe

Odgovor

Vraća: GetSubscriptionsApiResponse

Primer

get_subscriptions Primer
Copy Copy
1
2async fn fetch_subscriptions() -> Result<GetSubscriptionsApiResponse, Error> {
3 let params: GetSubscriptionsParams = GetSubscriptionsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 user_id: Some("user-9876".to_string()),
6 };
7 let subscriptions: GetSubscriptionsApiResponse = get_subscriptions(&configuration, params).await?;
8 Ok(subscriptions)
9}
10

update_subscription Internal Link


Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
update_api_user_subscription_datamodels::UpdateApiUserSubscriptionDataDa
user_idStringNe

Odgovor

Vraća: UpdateSubscriptionApiResponse

Primer

Primer update_subscription
Copy Copy
1
2async fn run_update() -> Result<UpdateSubscriptionApiResponse, Error> {
3 let params: UpdateSubscriptionParams = UpdateSubscriptionParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "sub-8f3a2b".to_string(),
6 update_api_user_subscription_data: models::UpdateApiUserSubscriptionData {
7 active: true,
8 plan: "standard".to_string(),
9 topics: vec!["news/article".to_string(), "product/updates".to_string()],
10 },
11 user_id: Some("user-987".to_string()),
12 };
13 let updated: UpdateSubscriptionApiResponse = update_subscription(&configuration, params).await?;
14 Ok(updated)
15}
16

get_tenant_daily_usages Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
year_numberf64Ne
month_numberf64Ne
day_numberf64Ne
skipf64Ne

Odgovor

Vraća: GetTenantDailyUsagesResponse

Primer

get_tenant_daily_usages Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetTenantDailyUsagesParams = GetTenantDailyUsagesParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 year_number: Some(2026.0),
6 month_number: Some(6.0),
7 day_number: Some(19.0),
8 skip: Some(0.0),
9 };
10 let daily_usages: GetTenantDailyUsagesResponse =
11 get_tenant_daily_usages(&configuration, params).await?;
12 let _ = daily_usages;
13 Ok(())
14}
15

create_tenant_package Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_tenant_package_bodymodels::CreateTenantPackageBodyDa

Odgovor

Vraća: CreateTenantPackageResponse

Primer

Primer create_tenant_package
Copy Copy
1
2async fn run() -> Result<CreateTenantPackageResponse, Error> {
3 let create_tenant_package_body: models::CreateTenantPackageBody = models::CreateTenantPackageBody {
4 name: "Premium Support".to_string(),
5 plan: "enterprise".to_string(),
6 seats: Some(50),
7 price_cents: Some(19900),
8 currency: Some("USD".to_string()),
9 features: Some(vec!["priority-support".to_string(), "white-label".to_string()]),
10 auto_renew: Some(true),
11 notes: Some("Includes monthly account review".to_string()),
12 };
13 let params: CreateTenantPackageParams = CreateTenantPackageParams {
14 tenant_id: "acme-corp-tenant".to_string(),
15 create_tenant_package_body,
16 };
17 let response: CreateTenantPackageResponse = create_tenant_package(&configuration, params).await?;
18 Ok(response)
19}
20

delete_tenant_package Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer delete_tenant_package
Copy Copy
1
2async fn run_delete_example() -> Result<(), Error> {
3 let params: DeleteTenantPackageParams = DeleteTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "premium-comment-moderation".to_string(),
6 };
7 let response: ApiEmptyResponse = delete_tenant_package(&configuration, params).await?;
8 Ok(())
9}
10

get_tenant_package Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringYes
idStringYes

Odgovor

Vraća: GetTenantPackageResponse

Primer

Primer get_tenant_package
Copy Copy
1
2async fn run_get_tenant_package() -> Result<GetTenantPackageResponse, Error> {
3 let params: GetTenantPackageParams = GetTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "pkg-premium-001".to_string(),
6 include_related: Some(true),
7 };
8 let response: GetTenantPackageResponse = get_tenant_package(&configuration, params).await?;
9 Ok(response)
10}
11

get_tenant_packages Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
skipf64Ne

Odgovor

Vraća: GetTenantPackagesResponse

Primer

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

replace_tenant_package Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
replace_tenant_package_bodymodels::ReplaceTenantPackageBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

replace_tenant_package Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: ReplaceTenantPackageParams = ReplaceTenantPackageParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 id: String::from("news/article-package"),
6 replace_tenant_package_body: models::ReplaceTenantPackageBody {
7 name: Some(String::from("Article Comments Package")),
8 plan: Some(String::from("pro")),
9 enabled: Some(true),
10 features: Some(vec![String::from("moderation"), String::from("reactions")]),
11 metadata: Some(std::collections::HashMap::from([
12 (String::from("region"), String::from("us-east-1")),
13 (String::from("contact"), String::from("ops@acme.example")),
14 ])),
15 },
16 };
17
18 let _response: ApiEmptyResponse = replace_tenant_package(&configuration, params).await?;
19 Ok(())
20}
21

update_tenant_package Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
update_tenant_package_bodymodels::UpdateTenantPackageBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_tenant_package
Copy Copy
1
2async fn run_update_package() -> Result<(), Error> {
3 let params: UpdateTenantPackageParams = UpdateTenantPackageParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "package-premium".to_string(),
6 update_tenant_package_body: models::UpdateTenantPackageBody {
7 name: Some("Premium".to_string()),
8 description: Some("Premium moderation and analytics package".to_string()),
9 price_cents: Some(2999),
10 features: Some(vec![
11 "moderation".to_string(),
12 "analytics".to_string(),
13 "priority-support".to_string(),
14 ]),
15 active: Some(true),
16 },
17 };
18
19 let _response: ApiEmptyResponse = update_tenant_package(&configuration, params).await?;
20 Ok(())
21}
22

create_tenant_user Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_tenant_user_bodymodels::CreateTenantUserBodyDa

Odgovor

Vraća: CreateTenantUserResponse

Primer

Primer create_tenant_user
Copy Copy
1
2let params: CreateTenantUserParams = CreateTenantUserParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 create_tenant_user_body: models::CreateTenantUserBody {
5 email: "jane.doe@acme.com".to_string(),
6 display_name: Some("Jane Doe".to_string()),
7 role: Some("moderator".to_string()),
8 locale: Some("en-US".to_string()),
9 digest_email_frequency: Some(DigestEmailFrequency::Daily),
10 imported_agent_approval_notification_frequency: Some(ImportedAgentApprovalNotificationFrequency::Immediate),
11 },
12};
13let created: CreateTenantUserResponse = create_tenant_user(&configuration, params).await?;
14

delete_tenant_user Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
delete_commentsStringNe
comment_delete_modeStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

delete_tenant_user Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteTenantUserParams = DeleteTenantUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-8421".to_string(),
6 delete_comments: Some("yes".to_string()),
7 comment_delete_mode: Some("permanent".to_string()),
8 };
9 let _response: ApiEmptyResponse = delete_tenant_user(&configuration, params).await?;
10 Ok(())
11}
12

get_tenant_user Internal Link


Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetTenantUserResponse

Primer

Primer get_tenant_user
Copy Copy
1
2async fn example_get_tenant_user() -> Result<GetTenantUserResponse, Error> {
3 let params: GetTenantUserParams = GetTenantUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-7b9a2".to_string(),
6 include_profile: Some(true),
7 };
8 let response: GetTenantUserResponse = get_tenant_user(&configuration, params).await?;
9 Ok(response)
10}
11

get_tenant_users Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
skipf64Ne

Odgovor

Vraća: GetTenantUsersResponse

Primer

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

replace_tenant_user Internal Link

Parametri

NameTipObaveznoOpis
tenant_idStringDa
idStringDa
replace_tenant_user_bodymodels::ReplaceTenantUserBodyDa
update_commentsStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer replace_tenant_user
Copy Copy
1
2let params: ReplaceTenantUserParams = ReplaceTenantUserParams {
3 tenant_id: "acme-corp-tenant".to_string(),
4 id: "user-123".to_string(),
5 replace_tenant_user_body: models::ReplaceTenantUserBody {
6 user_id: "user-123".to_string(),
7 email: "jane.doe@acme.com".to_string(),
8 display_name: "Jane Doe".to_string(),
9 roles: vec!["editor".to_string()],
10 },
11 update_comments: Some("propagate".to_string()),
12};
13
14let response: ApiEmptyResponse = replace_tenant_user(&configuration, params).await?;
15

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
redirect_urlStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer send_login_link
Copy Copy
1
2async fn send_link_example() -> Result<(), Error> {
3 let params: SendLoginLinkParams = SendLoginLinkParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-9876".to_string(),
6 redirect_url: Some("https://acme.example.com/welcome".to_string()),
7 };
8 let response: ApiEmptyResponse = send_login_link(&configuration, params).await?;
9 Ok(())
10}
11

update_tenant_user Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringYes
idStringYes
update_tenant_user_bodymodels::UpdateTenantUserBodyYes
update_commentsStringNo

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_tenant_user
Copy Copy
1
2let params: UpdateTenantUserParams = UpdateTenantUserParams {
3 tenant_id: String::from("acme-corp-tenant"),
4 id: String::from("user_42"),
5 update_tenant_user_body: models::UpdateTenantUserBody {
6 email: Some(String::from("alice.johnson@acme.com")),
7 display_name: Some(String::from("Alice Johnson")),
8 roles: Some(vec![String::from("editor")]),
9 active: Some(true),
10 },
11 update_comments: Some(String::from("synchronize-profile-and-comments")),
12};
13let response: ApiEmptyResponse = update_tenant_user(&configuration, params).await?;
14

create_tenant Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
create_tenant_bodymodels::CreateTenantBodyDa

Odgovor

Vraća: CreateTenantResponse

Primer

create_tenant Primer
Copy Copy
1
2async fn create_tenant_example() -> Result<CreateTenantResponse, Error> {
3 let params: CreateTenantParams = CreateTenantParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 create_tenant_body: models::CreateTenantBody {
6 name: "Acme Corporation".to_string(),
7 primary_domain: "acme-corp.com".to_string(),
8 contact_email: "ops@acme-corp.com".to_string(),
9 api_domain_configuration: Some(ApiDomainConfiguration {
10 enabled: true,
11 domain: "comments.acme-corp.com".to_string(),
12 }),
13 billing_info: Some(BillingInfo {
14 plan: "pro".to_string(),
15 billing_contact_email: "billing@acme-corp.com".to_string(),
16 }),
17 imported_sites: Some(vec![ImportedSiteType {
18 site_type: "news/article".to_string(),
19 site_id: "acme-news".to_string(),
20 }]),
21 },
22 };
23 let response: CreateTenantResponse = create_tenant(&configuration, params).await?;
24 Ok(response)
25}
26

delete_tenant Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
sureStringNe

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer delete_tenant
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteTenantParams = DeleteTenantParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "tenant-5f2d".to_string(),
6 sure: Some("confirm".to_string()),
7 };
8 let response: ApiEmptyResponse = delete_tenant(&configuration, params).await?;
9 let _ = response;
10 Ok(())
11}
12

get_tenant Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetTenantResponse

Primer

Primer get_tenant
Copy Copy
1
2async fn example_get_tenant() -> Result<(), Error> {
3 let params: GetTenantParams = GetTenantParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "news/article".to_string(),
6 };
7 let include_subdomains: Option<bool> = Some(true);
8 let tenant: GetTenantResponse = get_tenant(&configuration, params).await?;
9 println!("{:#?}", tenant);
10 Ok(())
11}
12

get_tenants Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
metaStringNe
skipf64Ne

Odgovor

Vraća: GetTenantsResponse

Primer

get_tenants Primer
Copy Copy
1
2async fn run_get_tenants() -> Result<(), Error> {
3 let params: GetTenantsParams = GetTenantsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 meta: Some("include=domains,billing".to_string()),
6 skip: Some(10.0),
7 };
8 let tenants: GetTenantsResponse = get_tenants(&configuration, params).await?;
9 println!("{:#?}", tenants);
10 Ok(())
11}
12

update_tenant Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
update_tenant_bodymodels::UpdateTenantBodyDa

Odgovor

Vraća: ApiEmptyResponse

Primer

Primer update_tenant
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: UpdateTenantParams = UpdateTenantParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "site-1234".to_string(),
6 update_tenant_body: models::UpdateTenantBody {
7 name: Some("Acme Corp Comments".to_string()),
8 admin_email: Some("admin@acme.com".to_string()),
9 is_active: Some(true),
10 billing_info: Some(models::BillingInfo {
11 plan: "professional".to_string(),
12 contact_email: "billing@acme.com".to_string(),
13 }),
14 domain_configuration: Some(models::ApiDomainConfiguration {
15 primary_domain: "comments.acme.com".to_string(),
16 }),
17 },
18 };
19
20 let response: ApiEmptyResponse = update_tenant(configuration, params).await?;
21 let _ = response;
22 Ok(())
23}
24

change_ticket_state Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringYes
user_idStringYes
idStringYes
change_ticket_state_bodymodels::ChangeTicketStateBodyYes

Odgovor

Vraća: ChangeTicketStateResponse

Primer

Primer change_ticket_state
Copy Copy
1
2let change_ticket_state_body: models::ChangeTicketStateBody = models::ChangeTicketStateBody {
3 state: Some("resolved".to_string()),
4 comment: Some("Fixed in release 1.2.3".to_string()),
5 notify_subscribers: Some(true),
6};
7
8let params: ChangeTicketStateParams = ChangeTicketStateParams {
9 tenant_id: "acme-corp-tenant".to_string(),
10 user_id: "john.doe@acme.com".to_string(),
11 id: "ticket-98765".to_string(),
12 change_ticket_state_body,
13};
14
15let response: ChangeTicketStateResponse = change_ticket_state(configuration, params).await?;
16

create_ticket Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
user_idStringDa
create_ticket_bodymodels::CreateTicketBodyDa

Odgovor

Vraća: CreateTicketResponse

Primer

create_ticket Primer
Copy Copy
1
2async fn create_ticket_example() -> Result<CreateTicketResponse, Error> {
3 let params: CreateTicketParams = CreateTicketParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 user_id: "alice-7d9".to_string(),
6 create_ticket_body: models::CreateTicketBody {
7 subject: "Payment issue: double charge on subscription".to_string(),
8 message: "I was charged twice for the July subscription. Please refund one charge.".to_string(),
9 priority: Some("high".to_string()),
10 tags: Some(vec!["billing".to_string(), "subscription".to_string()]),
11 contact_email: Some("alice@acme-corp.com".to_string()),
12 },
13 };
14
15 let response: CreateTicketResponse = create_ticket(&configuration, params).await?;
16 Ok(response)
17}
18

get_ticket Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa
user_idStringNe

Odgovor

Vraća: GetTicketResponse

Primer

Primer get_ticket-a
Copy Copy
1
2async fn fetch_ticket() -> Result<GetTicketResponse, Error> {
3 let params: GetTicketParams = GetTicketParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "TICKET-2026-045".to_string(),
6 user_id: Some("user-12345".to_string()),
7 };
8 let ticket: GetTicketResponse = get_ticket(&configuration, params).await?;
9 Ok(ticket)
10}
11

get_tickets Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
user_idStringNe
statef64Ne
skipf64Ne
limitf64Ne

Odgovor

Vraća: GetTicketsResponse

Primer

Primer get_tickets
Copy Copy
1
2async fn example_get_tickets() -> Result<(), Error> {
3 let params: GetTicketsParams = GetTicketsParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 user_id: Some(String::from("journalist-42")),
6 state: Some(1.0),
7 skip: Some(0.0),
8 limit: Some(50.0),
9 };
10 let tickets: GetTicketsResponse = get_tickets(&configuration, params).await?;
11 Ok(())
12}
13

get_translations Internal Link

Parametri

NazivTipObaveznoOpis
namespaceStringDa
componentStringDa
localeStringNe
use_full_translation_idsboolNe

Odgovor

Vraća: GetTranslationsResponse

Primer

Primer get_translations
Copy Copy
1
2async fn fetch_translations() -> Result<(), Error> {
3 let params: GetTranslationsParams = GetTranslationsParams {
4 namespace: "acme-corp-tenant".to_string(),
5 component: "news/article".to_string(),
6 locale: Some("en-US".to_string()),
7 use_full_translation_ids: Some(true),
8 };
9 let translations: GetTranslationsResponse = get_translations(configuration, params).await?;
10 Ok(())
11}
12

upload_image Internal Link


Otpremanje i promena veličine slike

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
filestd::path::PathBufDa
size_presetmodels::SizePresetNe
url_idStringNe

Odgovor

Vraća: UploadImageResponse


get_user_badge_progress_by_id Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiGetUserBadgeProgressResponse

Primer

Primer get_user_badge_progress_by_id
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: GetUserBadgeProgressByIdParams = GetUserBadgeProgressByIdParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 id: "badge-gold-2026".to_owned(),
6 user_id: Some("user-987".to_owned()),
7 };
8 let badge_progress: ApiGetUserBadgeProgressResponse =
9 get_user_badge_progress_by_id(&configuration, params).await?;
10 println!("{:#?}", badge_progress);
11 Ok(())
12}
13

get_user_badge_progress_by_user_id Internal Link


Parametri

ImeTipObaveznoOpis
tenant_idStringDa
user_idStringDa

Odgovor

Vraća: ApiGetUserBadgeProgressResponse

Primer

get_user_badge_progress_by_user_id Primer
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let user_id_opt: Option<&str> = Some("user-7823");
4 let params: GetUserBadgeProgressByUserIdParams = GetUserBadgeProgressByUserIdParams {
5 tenant_id: "acme-corp-tenant".to_string(),
6 user_id: user_id_opt.unwrap().to_string(),
7 };
8 let response: ApiGetUserBadgeProgressResponse =
9 get_user_badge_progress_by_user_id(&configuration, params).await?;
10 Ok(())
11}
12

get_user_badge_progress_list Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
user_idStringNe
limitf64Ne
skipf64Ne

Odgovor

Vraća: ApiGetUserBadgeProgressListResponse

Primer

get_user_badge_progress_list Primer
Copy Copy
1
2async fn example() -> Result<(), Error> {
3 let params: GetUserBadgeProgressListParams = GetUserBadgeProgressListParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 user_id: Some("user-9876".to_string()),
6 limit: Some(25.0),
7 skip: Some(0.0),
8 };
9 let badge_progress: ApiGetUserBadgeProgressListResponse =
10 get_user_badge_progress_list(&configuration, params).await?;
11 Ok(())
12}
13

create_user_badge Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
create_user_badge_paramsmodels::CreateUserBadgeParamsDa

Odgovor

Vraća: ApiCreateUserBadgeResponse

Primer

Primer create_user_badge
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: CreateUserBadgeParams = CreateUserBadgeParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 create_user_badge_params: models::CreateUserBadgeParams {
6 user_id: "user-7890".to_string(),
7 badge_key: "top-commenter".to_string(),
8 title: "Top Commenter".to_string(),
9 description: Some("Consistently provided insightful comments".to_string()),
10 image_url: Some("https://assets.news.example.com/badges/top-commenter.png".to_string()),
11 is_visible: Some(true),
12 expires_at: None,
13 },
14 };
15
16 let response: ApiCreateUserBadgeResponse = create_user_badge(&configuration, params).await?;
17 Ok(())
18}
19

delete_user_badge Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiEmptySuccessResponse

Primer

Primer delete_user_badge
Copy Copy
1
2let params: DeleteUserBadgeParams = DeleteUserBadgeParams {
3 tenant_id: "acme-newsroom-tenant".to_string(),
4 id: "badge-moderator-001".to_string(),
5};
6let include_related: Option<bool> = Some(false);
7let result: ApiEmptySuccessResponse = delete_user_badge(&configuration, params).await?;
8

get_user_badge Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: ApiGetUserBadgeResponse

Primer

get_user_badge Primer
Copy Copy
1
2async fn fetch_user_badge() -> Result<ApiGetUserBadgeResponse, Error> {
3 let params: GetUserBadgeParams = GetUserBadgeParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "badge-moderator".to_string(),
6 include_inactive: Some(false),
7 };
8 let badge: ApiGetUserBadgeResponse = get_user_badge(&configuration, params).await?;
9 Ok(badge)
10}
11

get_user_badges Internal Link

Parametri

NameTypeObaveznoOpis
tenant_idStringDa
user_idStringNe
badge_idStringNe
displayed_on_commentsboolNe
limitf64Ne
skipf64Ne

Odgovor

Vraća: ApiGetUserBadgesResponse

Primer

get_user_badges Primer
Copy Copy
1
2async fn example_get_user_badges() -> Result<ApiGetUserBadgesResponse, Error> {
3 let params: GetUserBadgesParams = GetUserBadgesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 user_id: Some("user_7890".to_string()),
6 badge_id: Some("top-commenter".to_string()),
7 displayed_on_comments: Some(true),
8 limit: Some(25.0),
9 skip: Some(0.0),
10 };
11 let response: ApiGetUserBadgesResponse = get_user_badges(&configuration, params).await?;
12 Ok(response)
13}
14

update_user_badge Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
update_user_badge_paramsmodels::UpdateUserBadgeParamsDa

Odgovor

Vraća: ApiEmptySuccessResponse

Primer

Primer update_user_badge
Copy Copy
1
2async fn run_update_badge() -> Result<ApiEmptySuccessResponse, Error> {
3 let params: UpdateUserBadgeParams = UpdateUserBadgeParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "badge-8742".to_string(),
6 update_user_badge_params: models::UpdateUserBadgeParams {
7 name: Some("Top Contributor".to_string()),
8 description: Some("Awarded for 100 helpful comments".to_string()),
9 icon_url: Some("https://assets.acme.com/badges/top-contributor.png".to_string()),
10 expires_at: None,
11 is_visible: Some(true),
12 },
13 };
14 let response: ApiEmptySuccessResponse = update_user_badge(&configuration, params).await?;
15 Ok(response)
16}
17

get_user_notification_count Internal Link

Parametri

NazivTypeObaveznoOpis
tenant_idStringDa
ssoStringNe

Odgovor

Vraća: GetUserNotificationCountResponse

Primer

Primer get_user_notification_count
Copy Copy
1
2async fn example() -> Result<(), Error> {
3 let params: GetUserNotificationCountParams = GetUserNotificationCountParams {
4 tenant_id: "acme-corp-tenant".to_owned(),
5 sso: Some("user-42.sso.example".to_owned()),
6 };
7 let response: GetUserNotificationCountResponse = get_user_notification_count(&configuration, params).await?;
8 Ok(())
9}
10

get_user_notifications Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringNe
page_sizei32Ne
after_idStringNe
include_contextboolNe
after_created_ati64Ne
unread_onlyboolNe
dm_onlyboolNe
no_dmboolNe
include_translationsboolNe
include_tenant_notificationsboolNe
ssoStringNe

Odgovor

Vraća: GetMyNotificationsResponse

Primer

Primer get_user_notifications
Copy Copy
1
2async fn fetch_notifications() -> Result<GetMyNotificationsResponse, Error> {
3 let params: GetUserNotificationsParams = GetUserNotificationsParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 url_id: Some(String::from("news/product-launch")),
6 page_size: Some(25),
7 after_id: Some(String::from("notif_1024")),
8 include_context: Some(true),
9 after_created_at: Some(1_676_000_000i64),
10 unread_only: Some(true),
11 dm_only: Some(false),
12 no_dm: Some(false),
13 include_translations: Some(true),
14 include_tenant_notifications: Some(false),
15 sso: Some(String::from("sso_token_abc123")),
16 };
17 let notifications: GetMyNotificationsResponse = get_user_notifications(&configuration, params).await?;
18 Ok(notifications)
19}
20

reset_user_notification_count Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
ssoStringNe

Odgovor

Vraća: ResetUserNotificationsResponse

Primer

Primer reset_user_notification_count
Copy Copy
1
2async fn run_reset() -> Result<ResetUserNotificationsResponse, Error> {
3 let params: ResetUserNotificationCountParams = ResetUserNotificationCountParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 sso: Some("https://sso.acme.com/session/abc123".to_string()),
6 };
7 let response: ResetUserNotificationsResponse = reset_user_notification_count(&configuration, params).await?;
8 Ok(response)
9}
10

reset_user_notifications Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
after_idStringNe
after_created_ati64Ne
unread_onlyboolNe
dm_onlyboolNe
no_dmboolNe
ssoStringNe

Odgovor

Vraća: ResetUserNotificationsResponse

Primer

Primer reset_user_notifications
Copy Copy
1
2async fn run_reset() -> Result<(), Error> {
3 let params: ResetUserNotificationsParams = ResetUserNotificationsParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 after_id: Some("notif-20260619-0001".to_string()),
6 after_created_at: Some(1_787_400_000i64),
7 unread_only: Some(true),
8 dm_only: Some(false),
9 no_dm: Some(false),
10 sso: Some("saml".to_string()),
11 };
12 let response: ResetUserNotificationsResponse =
13 reset_user_notifications(&configuration, params).await?;
14 Ok(())
15}
16

update_user_notification_comment_subscription_status Internal Link

Omogućite ili onemogućite notifikacije za određeni komentar.

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
notification_idStringDa
opted_in_or_outStringDa
comment_idStringDa
ssoStringNe

Odgovor

Vraća: UpdateUserNotificationCommentSubscriptionStatusResponse

Primer

Primer update_user_notification_comment_subscription_status
Copy Copy
1
2async fn example() -> Result<UpdateUserNotificationCommentSubscriptionStatusResponse, Error> {
3 let params: UpdateUserNotificationCommentSubscriptionStatusParams = UpdateUserNotificationCommentSubscriptionStatusParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 notification_id: "news/winter-2026-update".to_string(),
6 opted_in_or_out: "opted_in".to_string(),
7 comment_id: "article-42-comment-7".to_string(),
8 sso: Some("user-123|eyJhbGciOi...".to_string()),
9 };
10 let response: UpdateUserNotificationCommentSubscriptionStatusResponse =
11 update_user_notification_comment_subscription_status(&configuration, params).await?;
12 Ok(response)
13}
14

update_user_notification_page_subscription_status Internal Link

Omogućite ili onemogućite obaveštenja za stranicu. Kada su korisnici pretplaćeni na stranicu, obaveštenja se kreiraju za nove root komentare, i takođe

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
url_idStringDa
urlStringDa
page_titleStringDa
subscribed_or_unsubscribedStringDa
ssoStringNe

Odgovor

Vraća: UpdateUserNotificationPageSubscriptionStatusResponse

Primer

Primer update_user_notification_page_subscription_status
Copy Copy
1
2async fn example() -> Result<UpdateUserNotificationPageSubscriptionStatusResponse, Error> {
3 let params: UpdateUserNotificationPageSubscriptionStatusParams = UpdateUserNotificationPageSubscriptionStatusParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/rocket-launch-2026".to_string(),
6 url: "https://acme.example.com/news/rocket-launch-2026".to_string(),
7 page_title: "Acme Rocket Launch — June 2026".to_string(),
8 subscribed_or_unsubscribed: "subscribed".to_string(),
9 sso: Some("user:alice@acme.com".to_string()),
10 };
11 let response: UpdateUserNotificationPageSubscriptionStatusResponse =
12 update_user_notification_page_subscription_status(&configuration, params).await?;
13 Ok(response)
14}
15

update_user_notification_status Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringYes
notification_idStringYes
new_statusStringYes
ssoStringNo

Odgovor

Vraća: UpdateUserNotificationStatusResponse

Primer

Primer update_user_notification_status
Copy Copy
1
2async fn run_update() -> Result<UpdateUserNotificationStatusResponse, Error> {
3 let params: UpdateUserNotificationStatusParams = UpdateUserNotificationStatusParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 notification_id: "notifications/8472".to_string(),
6 new_status: "dismissed".to_string(),
7 sso: Some("sso-user-98765-token".to_string()),
8 };
9 let response: UpdateUserNotificationStatusResponse =
10 update_user_notification_status(&configuration, params).await?;
11 Ok(response)
12}
13

get_user_presence_statuses Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
url_id_wsStringDa
user_idsStringDa

Odgovor

Vraća: GetUserPresenceStatusesResponse

Primer

Primer get_user_presence_statuses
Copy Copy
1
2let cfg: &configuration::Configuration = &configuration;
3let params: GetUserPresenceStatusesParams = GetUserPresenceStatusesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id_ws: "news/article".to_string(),
6 user_ids: "user-123,user-456".to_string(),
7 include_offline: Some(false),
8};
9let response: GetUserPresenceStatusesResponse = get_user_presence_statuses(cfg, params).await?;
10

search_users Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
url_idStringDa
username_starts_withStringNe
mention_group_idsVecNe
ssoStringNe
search_sectionStringNe

Odgovor

Vraća: SearchUsersResult

Primer

search_users Primer
Copy Copy
1
2async fn fetch_users() -> Result<(), Error> {
3 let params: SearchUsersParams = SearchUsersParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/article-2026-06".to_string(),
6 username_starts_with: Some("jo".to_string()),
7 mention_group_ids: Some(vec![
8 "group-moderators".to_string(),
9 "group-editors".to_string(),
10 ]),
11 sso: Some("google".to_string()),
12 search_section: Some("comments".to_string()),
13 };
14
15 let result: SearchUsersResult = search_users(&configuration, params).await?;
16 Ok(())
17}
18

get_user Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
idStringDa

Odgovor

Vraća: GetUserResponse

Primer

get_user Primer
Copy Copy
1
2async fn example_get_user() -> Result<(), Error> {
3 let params = GetUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 id: "user-7b9a2c".to_string(),
6 include_roles: Some(true),
7 };
8 let user: GetUserResponse = get_user(&configuration, params).await?;
9 println!("{:#?}", user);
10 Ok(())
11}
12

create_vote Internal Link

Parametri

NazivTipObaveznoOpis
tenant_idStringDa
comment_idStringDa
directionStringDa
user_idStringNe
anon_user_idStringNe

Odgovor

Vraća: VoteResponse

Primer

Primer create_vote
Copy Copy
1
2async fn run() -> Result<VoteResponse, Error> {
3 let params: CreateVoteParams = CreateVoteParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 comment_id: "news/article/12345/comment-9876".to_string(),
6 direction: "up".to_string(),
7 user_id: Some("user-42".to_string()),
8 anon_user_id: None,
9 };
10 let vote_response: VoteResponse = create_vote(&configuration, params).await?;
11 Ok(vote_response)
12}
13

delete_vote Internal Link

Parametri

NameTypeRequiredDescription
tenant_idStringDa
idStringDa
edit_keyStringNe

Odgovor

Vraća: VoteDeleteResponse

Primer

Primer delete_vote
Copy Copy
1
2async fn run() -> Result<(), Error> {
3 let params: DeleteVoteParams = DeleteVoteParams {
4 tenant_id: String::from("acme-corp-tenant"),
5 id: String::from("article-5678-comment-1234"),
6 edit_key: Some(String::from("editkey-9b2f4e")),
7 };
8 let response: VoteDeleteResponse = delete_vote(&configuration, params).await?;
9 Ok(())
10}
11

get_votes Internal Link

Parametri

ImeTipObaveznoOpis
tenant_idStringDa
url_idStringDa

Odgovor

Vraća: GetVotesResponse

Primer

Primer get_votes
Copy Copy
1
2async fn fetch_votes() -> Result<GetVotesResponse, Error> {
3 let params: GetVotesParams = GetVotesParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/2026/06/product-launch".to_string(),
6 page_size: Some(25),
7 cursor: Some("cursor_2026_06_ab12".to_string()),
8 };
9 let votes: GetVotesResponse = get_votes(&configuration, params).await?;
10 Ok(votes)
11}
12

get_votes_for_user Internal Link


Parametri

NameTypeRequiredDescription
tenant_idStringDa
url_idStringDa
user_idStringNe
anon_user_idStringNe

Odgovor

Vraća: GetVotesForUserResponse

Primer

Primer get_votes_for_user
Copy Copy
1
2async fn fetch_votes_for_user() -> Result<(), Error> {
3 let params: GetVotesForUserParams = GetVotesForUserParams {
4 tenant_id: "acme-corp-tenant".to_string(),
5 url_id: "news/2026/06/15/market-update".to_string(),
6 user_id: Some("user_98765".to_string()),
7 anon_user_id: Some("anon-4f3b2a".to_string()),
8 };
9 let response: GetVotesForUserResponse = get_votes_for_user(&configuration, params).await?;
10 Ok(())
11}
12

Trebate pomoć?

Ako naiđete na bilo kakve probleme ili imate pitanja u vezi sa Rust SDK-om, molimo:

Doprinosi

Doprinosi su dobrodošli! Molimo posetite GitHub repozitorijum za smernice o doprinosu.