FastComments.com

SDK Go de FastComments


Ceci est le SDK Go officiel pour FastComments.

SDK Go officiel pour l'API FastComments

Dépôt

Voir sur GitHub


Installation Internal Link

go get github.com/fastcomments/fastcomments-go

Utilisation du client API

API publique (sans authentification)

L'API publique permet un accès non authentifié aux points de terminaison publics :

package main

import (
    "context"
    "fmt"
    "github.com/fastcomments/fastcomments-go/client"
)

func main() {
    config := client.NewConfiguration()
    apiClient := client.NewAPIClient(config)

    // Obtenir les commentaires en utilisant l'API publique
    response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
        context.Background(),
        "your-tenant-id",
    ).UrlId("your-page-url-id").Execute()

    if err != nil {
        panic(err)
    }

    fmt.Printf("Status: %d\n", httpResp.StatusCode)
    fmt.Printf("Comments: %+v\n", response)
}

API par défaut (requiert une clé API)

L'API par défaut requiert une authentification en utilisant votre clé API :

package main

import (
    "context"
    "fmt"
    "github.com/fastcomments/fastcomments-go/client"
)

func main() {
    config := client.NewConfiguration()
    apiClient := client.NewAPIClient(config)

    // Créer un contexte authentifié avec la clé API
    auth := context.WithValue(
        context.Background(),
        client.ContextAPIKeys,
        map[string]client.APIKey{
            "api_key": {Key: "your-api-key-here"},
        },
    )

    // Obtenir les commentaires en utilisant l'API par défaut authentifiée
    response, httpResp, err := apiClient.DefaultAPI.GetComments(auth).
        TenantId("your-tenant-id").
        UrlId("your-page-url-id").
        Execute()

    if err != nil {
        panic(err)
    }

    fmt.Printf("Status: %d\n", httpResp.StatusCode)
    fmt.Printf("Comments: %+v\n", response)
}

API de modération (tableau de bord du modérateur)

L'API de modération fournit une suite étendue d'APIs de modération en temps réel et rapides. Toutes les méthodes de modération acceptent un paramètre sso et peuvent s'authentifier via SSO ou un cookie de session FastComments.com :

package main

import (
    "context"
    "fmt"
    "github.com/fastcomments/fastcomments-go/client"
)

func main() {
    config := client.NewConfiguration()
    apiClient := client.NewAPIClient(config)

    // Répertorier les commentaires pour la modération en utilisant l'API de modération
    response, httpResp, err := apiClient.ModerationAPI.GetApiComments(
        context.Background(),
    ).Sso("your-sso-token").Execute()

    if err != nil {
        panic(err)
    }

    fmt.Printf("Status: %d\n", httpResp.StatusCode)
    fmt.Printf("Comments: %+v\n", response)
}

Utilisation Internal Link

SSO simple

package main

import (
    "context"
    "fmt"
    "github.com/fastcomments/fastcomments-go/client"
    "github.com/fastcomments/fastcomments-go/sso"
)

func main() {
    // Créer un jeton SSO simple
    user := &sso.SimpleSSOUserData{
        UserID: "user-123",
        Email:  "user@example.com",
        Avatar: "https://example.com/avatar.jpg",
    }

    ssoInstance := sso.NewSimple(user)
    token, err := ssoInstance.CreateToken()
    if err != nil {
        panic(err)
    }

    fmt.Println("SSO Token:", token)

    // Utiliser le jeton SSO pour effectuer un appel API authentifié
    config := client.NewConfiguration()
    apiClient := client.NewAPIClient(config)

    response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
        context.Background(),
        "your-tenant-id",
    ).UrlId("your-page-url-id").Sso(token).Execute()

    if err != nil {
        panic(err)
    }

    fmt.Printf("Status: %d\n", httpResp.StatusCode)
    fmt.Printf("Comments: %+v\n", response)
}

SSO sécurisé

package main

import (
    "context"
    "fmt"
    "github.com/fastcomments/fastcomments-go/client"
    "github.com/fastcomments/fastcomments-go/sso"
)

func main() {
    // Créer un jeton SSO sécurisé
    user := &sso.SecureSSOUserData{
        UserID:   "user-123",
        Email:    "user@example.com",
        Username: "johndoe",
        Avatar:   "https://example.com/avatar.jpg",
    }

    apiKey := "your-api-key"
    ssoInstance, err := sso.NewSecure(apiKey, user)
    if err != nil {
        panic(err)
    }

    token, err := ssoInstance.CreateToken()
    if err != nil {
        panic(err)
    }

    fmt.Println("Secure SSO Token:", token)

    // Utiliser le jeton SSO pour effectuer un appel API authentifié
    config := client.NewConfiguration()
    apiClient := client.NewAPIClient(config)

    response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
        context.Background(),
        "your-tenant-id",
    ).UrlId("your-page-url-id").Sso(token).Execute()

    if err != nil {
        panic(err)
    }

    fmt.Printf("Status: %d\n", httpResp.StatusCode)
    fmt.Printf("Comments: %+v\n", response)
}

Agrégation Internal Link

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

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
parentTenantIdstringqueryNo
includeStatsbooleanqueryNo

Réponse

Retourne : AggregateResponse

Exemple

Exemple d'agrégation
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 aggregationRequest := *openapiclient.NewAggregationRequest("ResourceName_example", []openapiclient.AggregationOperation{*openapiclient.NewAggregationOperation("Field_example", openapiclient.AggregationOpType("sum"))}) // AggregationRequest |
14 parentTenantId := "parentTenantId_example" // string | (optionnel)
15 includeStats := true // bool | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.Aggregate(context.Background()).TenantId(tenantId).AggregationRequest(aggregationRequest).ParentTenantId(parentTenantId).IncludeStats(includeStats).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.Aggregate``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `Aggregate` : AggregateResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.Aggregate`: %v\n", resp)
26}
27

Obtenir les journaux d'audit Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
limitnumberqueryNo
skipnumberqueryNo
orderstringqueryNo
afternumberqueryNo
beforenumberqueryNo

Réponse

Renvoie: GetAuditLogsResponse

Exemple

Exemple GetAuditLogs
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 limit := float64(1.2) // float64 | (optionnel)
14 skip := float64(1.2) // float64 | (optionnel)
15 order := openapiclient.SORT_DIR("ASC") // SORTDIR | (optionnel)
16 after := float64(1.2) // float64 | (optionnel)
17 before := float64(1.2) // float64 | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.DefaultAPI.GetAuditLogs(context.Background()).TenantId(tenantId).Limit(limit).Skip(skip).Order(order).After(after).Before(before).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetAuditLogs``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `GetAuditLogs`: GetAuditLogsResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetAuditLogs`: %v\n", resp)
28}
29

Déconnexion publique Internal Link

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple LogoutPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12
13 configuration := openapiclient.NewConfiguration()
14 apiClient := openapiclient.NewAPIClient(configuration)
15 resp, r, err := apiClient.PublicAPI.LogoutPublic(context.Background()).Execute()
16 if err != nil {
17 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.LogoutPublic``: %v\n", err)
18 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
19 }
20 // réponse de `LogoutPublic` : APIEmptyResponse
21 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.LogoutPublic`: %v\n", resp)
22}
23

Bloquer depuis un commentaire (public) Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
commentIdstringpathOui
ssostringqueryNon

Réponse

Renvoie: BlockSuccess

Exemple

Exemple de BlockFromCommentPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 publicBlockFromCommentParams := *openapiclient.NewPublicBlockFromCommentParams([]string{"CommentIds_example"}) // PublicBlockFromCommentParams |
15 sso := "sso_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.BlockFromCommentPublic(context.Background(), commentId).TenantId(tenantId).PublicBlockFromCommentParams(publicBlockFromCommentParams).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.BlockFromCommentPublic``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `BlockFromCommentPublic`: BlockSuccess
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.BlockFromCommentPublic`: %v\n", resp)
26}
27

Débloquer un commentaire (public) Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
commentIdstringpathOui
ssostringqueryNon

Réponse

Retourne: UnblockSuccess

Exemple

Exemple UnBlockCommentPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 publicBlockFromCommentParams := *openapiclient.NewPublicBlockFromCommentParams([]string{"CommentIds_example"}) // PublicBlockFromCommentParams |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.UnBlockCommentPublic(context.Background(), commentId).TenantId(tenantId).PublicBlockFromCommentParams(publicBlockFromCommentParams).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UnBlockCommentPublic``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UnBlockCommentPublic` : UnblockSuccess
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UnBlockCommentPublic`: %v\n", resp)
26}
27

Vérifier les commentaires bloqués Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
commentIdsstringqueryOuiUne liste d'identifiants de commentaires séparés par des virgules.
ssostringqueryNon

Réponse

Retourne : CheckBlockedCommentsResponse

Exemple

Exemple de CheckedCommentsForBlocked
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentIds := "commentIds_example" // string | Une liste d'identifiants de commentaires séparés par des virgules.
14 sso := "sso_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.CheckedCommentsForBlocked(context.Background()).TenantId(tenantId).CommentIds(commentIds).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.CheckedCommentsForBlocked``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `CheckedCommentsForBlocked`: CheckBlockedCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CheckedCommentsForBlocked`: %v\n", resp)
25}
26

Bloquer un utilisateur depuis un commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon
anonUserIdstringqueryNon

Réponse

Retourne : BlockSuccess

Exemple

Exemple de BlockUserFromComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 blockFromCommentParams := *openapiclient.NewBlockFromCommentParams() // BlockFromCommentParams |
15 userId := "userId_example" // string | (optionnel)
16 anonUserId := "anonUserId_example" // string | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.DefaultAPI.BlockUserFromComment(context.Background(), id).TenantId(tenantId).BlockFromCommentParams(blockFromCommentParams).UserId(userId).AnonUserId(anonUserId).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.BlockUserFromComment``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `BlockUserFromComment` : BlockSuccess
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.BlockUserFromComment`: %v\n", resp)
27}
28

Créer un commentaire public Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringcheminOui
urlIdstringrequêteOui
broadcastIdstringrequêteOui
sessionIdstringrequêteNon
ssostringrequêteNon

Réponse

Renvoie: SaveCommentsResponseWithPresence

Exemple

Exemple CreateCommentPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 commentData := *openapiclient.NewCommentData("CommenterName_example", "Comment_example", "Url_example", "UrlId_example") // CommentData |
16 sessionId := "sessionId_example" // string | (optionnel)
17 sso := "sso_example" // string | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.CreateCommentPublic(context.Background(), tenantId).UrlId(urlId).BroadcastId(broadcastId).CommentData(commentData).SessionId(sessionId).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.CreateCommentPublic``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `CreateCommentPublic`: SaveCommentsResponseWithPresence
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateCommentPublic`: %v\n", resp)
28}
29

Supprimer un commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes
contextUserIdstringqueryNo
isLivebooleanqueryNo

Réponse

Renvoie : DeleteCommentResult

Exemple

Exemple de DeleteComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 contextUserId := "contextUserId_example" // string | (optionnel)
15 isLive := true // bool | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.DeleteComment(context.Background(), id).TenantId(tenantId).ContextUserId(contextUserId).IsLive(isLive).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `DeleteComment`: DeleteCommentResult
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteComment`: %v\n", resp)
26}
27

Supprimer un commentaire public Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
commentIdstringpathOui
broadcastIdstringqueryOui
editKeystringqueryNon
ssostringqueryNon

Réponse

Retourne : PublicAPIDeleteCommentResponse

Exemple

Exemple DeleteCommentPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 editKey := "editKey_example" // string | (optionnel)
16 sso := "sso_example" // string | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.DeleteCommentPublic(context.Background(), tenantId, commentId).BroadcastId(broadcastId).EditKey(editKey).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.DeleteCommentPublic``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `DeleteCommentPublic`: PublicAPIDeleteCommentResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteCommentPublic`: %v\n", resp)
27}
28

Supprimer le vote sur un commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
commentIdstringpathOui
voteIdstringpathOui
urlIdstringqueryOui
broadcastIdstringqueryOui
editKeystringqueryNon
ssostringqueryNon

Réponse

Retourne : VoteDeleteResponse

Exemple

Exemple de DeleteCommentVote
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 voteId := "voteId_example" // string |
15 urlId := "urlId_example" // string |
16 broadcastId := "broadcastId_example" // string |
17 editKey := "editKey_example" // string | (facultatif)
18 sso := "sso_example" // string | (facultatif)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.PublicAPI.DeleteCommentVote(context.Background(), tenantId, commentId, voteId).UrlId(urlId).BroadcastId(broadcastId).EditKey(editKey).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.DeleteCommentVote``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `DeleteCommentVote`: VoteDeleteResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteCommentVote`: %v\n", resp)
29}
30

Signaler un commentaire Internal Link

Paramètres

NameTypeLocationRequisDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon
anonUserIdstringqueryNon

Réponse

Renvoie : FlagCommentResponse

Exemple

Exemple de FlagComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 userId := "userId_example" // string | (optionnel)
15 anonUserId := "anonUserId_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.FlagComment(context.Background(), id).TenantId(tenantId).UserId(userId).AnonUserId(anonUserId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.FlagComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `FlagComment`: FlagCommentResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.FlagComment`: %v\n", resp)
26}
27

Obtenir un commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIGetCommentResponse

Exemple

Exemple de GetComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetComment(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetComment``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetComment`: APIGetCommentResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetComment`: %v\n", resp)
24}
25

Obtenir des commentaires Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
pageintegerqueryNon
limitintegerqueryNon
skipintegerqueryNon
asTreebooleanqueryNon
skipChildrenintegerqueryNon
limitChildrenintegerqueryNon
maxTreeDepthintegerqueryNon
urlIdstringqueryNon
userIdstringqueryNon
anonUserIdstringqueryNon
contextUserIdstringqueryNon
hashTagstringqueryNon
parentIdstringqueryNon
directionstringqueryNon
fromDateintegerqueryNon
toDateintegerqueryNon

Réponse

Renvoie : APIGetCommentsResponse

Exemple

Exemple GetComments
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 page := int32(56) // int32 | (optionnel)
14 limit := int32(56) // int32 | (optionnel)
15 skip := int32(56) // int32 | (optionnel)
16 asTree := true // bool | (optionnel)
17 skipChildren := int32(56) // int32 | (optionnel)
18 limitChildren := int32(56) // int32 | (optionnel)
19 maxTreeDepth := int32(56) // int32 | (optionnel)
20 urlId := "urlId_example" // string | (optionnel)
21 userId := "userId_example" // string | (optionnel)
22 anonUserId := "anonUserId_example" // string | (optionnel)
23 contextUserId := "contextUserId_example" // string | (optionnel)
24 hashTag := "hashTag_example" // string | (optionnel)
25 parentId := "parentId_example" // string | (optionnel)
26 direction := openapiclient.SortDirections("OF") // SortDirections | (optionnel)
27 fromDate := int64(789) // int64 | (optionnel)
28 toDate := int64(789) // int64 | (optionnel)
29
30 configuration := openapiclient.NewConfiguration()
31 apiClient := openapiclient.NewAPIClient(configuration)
32 resp, r, err := apiClient.DefaultAPI.GetComments(context.Background()).TenantId(tenantId).Page(page).Limit(limit).Skip(skip).AsTree(asTree).SkipChildren(skipChildren).LimitChildren(limitChildren).MaxTreeDepth(maxTreeDepth).UrlId(urlId).UserId(userId).AnonUserId(anonUserId).ContextUserId(contextUserId).HashTag(hashTag).ParentId(parentId).Direction(direction).FromDate(fromDate).ToDate(toDate).Execute()
33 if err != nil {
34 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetComments``: %v\n", err)
35 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
36 }
37 // réponse de `GetComments` : APIGetCommentsResponse
38 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetComments`: %v\n", resp)
39}
40

Obtenir des commentaires publics Internal Link

req tenantId urlId

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
urlIdstringqueryOui
pageintegerqueryNon
directionstringqueryNon
ssostringqueryNon
skipintegerqueryNon
skipChildrenintegerqueryNon
limitintegerqueryNon
limitChildrenintegerqueryNon
countChildrenbooleanqueryNon
fetchPageForCommentIdstringqueryNon
includeConfigbooleanqueryNon
countAllbooleanqueryNon
includei10nbooleanqueryNon
localestringqueryNon
modulesstringqueryNon
isCrawlerbooleanqueryNon
includeNotificationCountbooleanqueryNon
asTreebooleanqueryNon
maxTreeDepthintegerqueryNon
useFullTranslationIdsbooleanqueryNon
parentIdstringqueryNon
searchTextstringqueryNon
hashTagsarrayqueryNon
userIdstringqueryNon
customConfigStrstringqueryNon
afterCommentIdstringqueryNon
beforeCommentIdstringqueryNon

Réponse

Renvoie : GetCommentsResponseWithPresencePublicComment

Exemple

Exemple de GetCommentsPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 page := int32(56) // int32 | (optionnel)
15 direction := openapiclient.SortDirections("OF") // SortDirections | (optionnel)
16 sso := "sso_example" // string | (optionnel)
17 skip := int32(56) // int32 | (optionnel)
18 skipChildren := int32(56) // int32 | (optionnel)
19 limit := int32(56) // int32 | (optionnel)
20 limitChildren := int32(56) // int32 | (optionnel)
21 countChildren := true // bool | (optionnel)
22 fetchPageForCommentId := "fetchPageForCommentId_example" // string | (optionnel)
23 includeConfig := true // bool | (optionnel)
24 countAll := true // bool | (optionnel)
25 includei10n := true // bool | (optionnel)
26 locale := "locale_example" // string | (optionnel)
27 modules := "modules_example" // string | (optionnel)
28 isCrawler := true // bool | (optionnel)
29 includeNotificationCount := true // bool | (optionnel)
30 asTree := true // bool | (optionnel)
31 maxTreeDepth := int32(56) // int32 | (optionnel)
32 useFullTranslationIds := true // bool | (optionnel)
33 parentId := "parentId_example" // string | (optionnel)
34 searchText := "searchText_example" // string | (optionnel)
35 hashTags := []string{"Inner_example"} // []string | (optionnel)
36 userId := "userId_example" // string | (optionnel)
37 customConfigStr := "customConfigStr_example" // string | (optionnel)
38 afterCommentId := "afterCommentId_example" // string | (optionnel)
39 beforeCommentId := "beforeCommentId_example" // string | (optionnel)
40
41 configuration := openapiclient.NewConfiguration()
42 apiClient := openapiclient.NewAPIClient(configuration)
43 resp, r, err := apiClient.PublicAPI.GetCommentsPublic(context.Background(), tenantId).UrlId(urlId).Page(page).Direction(direction).Sso(sso).Skip(skip).SkipChildren(skipChildren).Limit(limit).LimitChildren(limitChildren).CountChildren(countChildren).FetchPageForCommentId(fetchPageForCommentId).IncludeConfig(includeConfig).CountAll(countAll).Includei10n(includei10n).Locale(locale).Modules(modules).IsCrawler(isCrawler).IncludeNotificationCount(includeNotificationCount).AsTree(asTree).MaxTreeDepth(maxTreeDepth).UseFullTranslationIds(useFullTranslationIds).ParentId(parentId).SearchText(searchText).HashTags(hashTags).UserId(userId).CustomConfigStr(customConfigStr).AfterCommentId(afterCommentId).BeforeCommentId(beforeCommentId).Execute()
44 if err != nil {
45 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetCommentsPublic``: %v\n", err)
46 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
47 }
48 // réponse de `GetCommentsPublic`: GetCommentsResponseWithPresencePublicComment
49 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentsPublic`: %v\n", resp)
50}
51

Obtenir le texte du commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
commentIdstringpathOui
editKeystringqueryNon
ssostringqueryNon

Réponse

Renvoie : PublicAPIGetCommentTextResponse

Exemple

Exemple GetCommentText
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 editKey := "editKey_example" // string | (optionnel)
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.GetCommentText(context.Background(), tenantId, commentId).EditKey(editKey).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetCommentText``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetCommentText` : PublicAPIGetCommentTextResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentText`: %v\n", resp)
26}
27

Obtenir les noms d'utilisateurs des votes de commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringpathOui
commentIdstringpathOui
dirintegerqueryOui
ssostringqueryNon

Réponse

Renvoie : GetCommentVoteUserNamesSuccessResponse

Exemple

Exemple de GetCommentVoteUserNames
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 dir := int32(56) // int32 |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.GetCommentVoteUserNames(context.Background(), tenantId, commentId).Dir(dir).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetCommentVoteUserNames``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetCommentVoteUserNames` : GetCommentVoteUserNamesSuccessResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentVoteUserNames`: %v\n", resp)
26}
27

Verrouiller un commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringcheminOui
commentIdstringcheminOui
broadcastIdstringrequêteOui
ssostringrequêteNon

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple de LockComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.LockComment(context.Background(), tenantId, commentId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.LockComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `LockComment`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.LockComment`: %v\n", resp)
26}
27

Épingler un commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
commentIdstringpathOui
broadcastIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : ChangeCommentPinStatusResponse

Exemple

Exemple de PinComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.PinComment(context.Background(), tenantId, commentId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.PinComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PinComment` : ChangeCommentPinStatusResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.PinComment`: %v\n", resp)
26}
27

Enregistrer un commentaire Internal Link


Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
isLivebooleanqueryNon
doSpamCheckbooleanqueryNon
sendEmailsbooleanqueryNon
populateNotificationsbooleanqueryNon

Réponse

Renvoie: APISaveCommentResponse

Exemple

Exemple de SaveComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createCommentParams := *openapiclient.NewCreateCommentParams("CommenterName_example", "Comment_example", "Url_example", "UrlId_example", "Locale_example") // CreateCommentParams |
14 isLive := true // bool | (facultatif)
15 doSpamCheck := true // bool | (facultatif)
16 sendEmails := true // bool | (facultatif)
17 populateNotifications := true // bool | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.DefaultAPI.SaveComment(context.Background()).TenantId(tenantId).CreateCommentParams(createCommentParams).IsLive(isLive).DoSpamCheck(doSpamCheck).SendEmails(sendEmails).PopulateNotifications(populateNotifications).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.SaveComment``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `SaveComment` : APISaveCommentResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SaveComment`: %v\n", resp)
28}
29

Enregistrer des commentaires en masse Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
isLivebooleanqueryNon
doSpamCheckbooleanqueryNon
sendEmailsbooleanqueryNon
populateNotificationsbooleanqueryNon

Réponse

Renvoie : []SaveCommentsBulkResponse

Exemple

Exemple de SaveCommentsBulk
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createCommentParams := []openapiclient.CreateCommentParams{*openapiclient.NewCreateCommentParams("CommenterName_example", "Comment_example", "Url_example", "UrlId_example", "Locale_example")} // []CreateCommentParams |
14 isLive := true // bool | (optionnel)
15 doSpamCheck := true // bool | (optionnel)
16 sendEmails := true // bool | (optionnel)
17 populateNotifications := true // bool | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.DefaultAPI.SaveCommentsBulk(context.Background()).TenantId(tenantId).CreateCommentParams(createCommentParams).IsLive(isLive).DoSpamCheck(doSpamCheck).SendEmails(sendEmails).PopulateNotifications(populateNotifications).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.SaveCommentsBulk``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `SaveCommentsBulk` : []SaveCommentsBulkResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SaveCommentsBulk`: %v\n", resp)
28}
29

Définir le texte du commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
commentIdstringpathOui
broadcastIdstringqueryOui
editKeystringqueryNon
ssostringqueryNon

Réponse

Renvoie: PublicAPISetCommentTextResponse

Exemple

Exemple de SetCommentText
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 commentTextUpdateRequest := *openapiclient.NewCommentTextUpdateRequest("Comment_example") // CommentTextUpdateRequest |
16 editKey := "editKey_example" // string | (optionnel)
17 sso := "sso_example" // string | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.SetCommentText(context.Background(), tenantId, commentId).BroadcastId(broadcastId).CommentTextUpdateRequest(commentTextUpdateRequest).EditKey(editKey).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.SetCommentText``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `SetCommentText`: PublicAPISetCommentTextResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.SetCommentText`: %v\n", resp)
28}
29

Débloquer un utilisateur depuis un commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon
anonUserIdstringqueryNon

Réponse

Renvoie: UnblockSuccess

Exemple

Exemple UnBlockUserFromComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 unBlockFromCommentParams := *openapiclient.NewUnBlockFromCommentParams() // UnBlockFromCommentParams |
15 userId := "userId_example" // string | (optionnel)
16 anonUserId := "anonUserId_example" // string | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.DefaultAPI.UnBlockUserFromComment(context.Background(), id).TenantId(tenantId).UnBlockFromCommentParams(unBlockFromCommentParams).UserId(userId).AnonUserId(anonUserId).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UnBlockUserFromComment``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `UnBlockUserFromComment`: UnblockSuccess
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UnBlockUserFromComment`: %v\n", resp)
27}
28

Retirer le signalement du commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon
anonUserIdstringqueryNon

Réponse

Renvoie : FlagCommentResponse

Exemple

Exemple UnFlagComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 userId := "userId_example" // string | (optionnel)
15 anonUserId := "anonUserId_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.UnFlagComment(context.Background(), id).TenantId(tenantId).UserId(userId).AnonUserId(anonUserId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UnFlagComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UnFlagComment` : FlagCommentResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UnFlagComment`: %v\n", resp)
26}
27

Déverrouiller un commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
commentIdstringpathOui
broadcastIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple d'UnLockComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.UnLockComment(context.Background(), tenantId, commentId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UnLockComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UnLockComment` : APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UnLockComment`: %v\n", resp)
26}
27

Désépingler un commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
commentIdstringpathOui
broadcastIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : ChangeCommentPinStatusResponse

Exemple

Exemple : UnPinComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.UnPinComment(context.Background(), tenantId, commentId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UnPinComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UnPinComment` : ChangeCommentPinStatusResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UnPinComment`: %v\n", resp)
26}
27

Mettre à jour un commentaire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui
contextUserIdstringqueryNon
doSpamCheckbooleanqueryNon
isLivebooleanqueryNon

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple d'UpdateComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updatableCommentParams := *openapiclient.NewUpdatableCommentParams() // UpdatableCommentParams |
15 contextUserId := "contextUserId_example" // string | (optionnel)
16 doSpamCheck := true // bool | (optionnel)
17 isLive := true // bool | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.DefaultAPI.UpdateComment(context.Background(), id).TenantId(tenantId).UpdatableCommentParams(updatableCommentParams).ContextUserId(contextUserId).DoSpamCheck(doSpamCheck).IsLive(isLive).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateComment``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `UpdateComment` : APIEmptyResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateComment`: %v\n", resp)
28}
29

Voter sur un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringpathOui
commentIdstringpathOui
urlIdstringqueryOui
broadcastIdstringqueryOui
sessionIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : VoteResponse

Exemple

Exemple de VoteComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 urlId := "urlId_example" // string |
15 broadcastId := "broadcastId_example" // string |
16 voteBodyParams := *openapiclient.NewVoteBodyParams("CommenterEmail_example", "CommenterName_example", "VoteDir_example", "Url_example") // VoteBodyParams |
17 sessionId := "sessionId_example" // string | (optionnel)
18 sso := "sso_example" // string | (optionnel)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.PublicAPI.VoteComment(context.Background(), tenantId, commentId).UrlId(urlId).BroadcastId(broadcastId).VoteBodyParams(voteBodyParams).SessionId(sessionId).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.VoteComment``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `VoteComment` : VoteResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.VoteComment`: %v\n", resp)
29}
30

Obtenir les commentaires pour un utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
userIdstringqueryNon
directionstringqueryNon
repliesToUserIdstringqueryNon
pagenumberqueryNon
includei10nbooleanqueryNon
localestringqueryNon
isCrawlerbooleanqueryNon

Réponse

Renvoie : GetCommentsForUserResponse

Exemple

Exemple GetCommentsForUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 userId := "userId_example" // string | (optionnel)
13 direction := openapiclient.SortDirections("OF") // SortDirections | (optionnel)
14 repliesToUserId := "repliesToUserId_example" // string | (optionnel)
15 page := float64(1.2) // float64 | (optionnel)
16 includei10n := true // bool | (optionnel)
17 locale := "locale_example" // string | (optionnel)
18 isCrawler := true // bool | (optionnel)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.PublicAPI.GetCommentsForUser(context.Background()).UserId(userId).Direction(direction).RepliesToUserId(repliesToUserId).Page(page).Includei10n(includei10n).Locale(locale).IsCrawler(isCrawler).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetCommentsForUser``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `GetCommentsForUser` : GetCommentsForUserResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentsForUser`: %v\n", resp)
29}
30

Ajouter une configuration de domaine Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui

Réponse

Renvoie: AddDomainConfigResponse

Exemple

Exemple d'AddDomainConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 addDomainConfigParams := *openapiclient.NewAddDomainConfigParams("Domain_example") // AddDomainConfigParams |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.AddDomainConfig(context.Background()).TenantId(tenantId).AddDomainConfigParams(addDomainConfigParams).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AddDomainConfig``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // response from `AddDomainConfig`: AddDomainConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddDomainConfig`: %v\n", resp)
24}
25

Supprimer une configuration de domaine Internal Link


Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
domainstringpathOui

Réponse

Renvoie : DeleteDomainConfigResponse

Exemple

Exemple de DeleteDomainConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 domain := "domain_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteDomainConfig(context.Background(), domain).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteDomainConfig``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteDomainConfig` : DeleteDomainConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteDomainConfig`: %v\n", resp)
24}
25

Obtenir une configuration de domaine Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryYes
domainstringpathYes

Réponse

Renvoie: GetDomainConfigResponse

Exemple

Exemple GetDomainConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 domain := "domain_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetDomainConfig(context.Background(), domain).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetDomainConfig``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetDomainConfig` : GetDomainConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetDomainConfig`: %v\n", resp)
24}
25

Obtenir les configurations de domaine Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui

Réponse

Retourne : GetDomainConfigsResponse

Exemple

Exemple GetDomainConfigs
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13
14 configuration := openapiclient.NewConfiguration()
15 apiClient := openapiclient.NewAPIClient(configuration)
16 resp, r, err := apiClient.DefaultAPI.GetDomainConfigs(context.Background()).TenantId(tenantId).Execute()
17 if err != nil {
18 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetDomainConfigs``: %v\n", err)
19 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
20 }
21 // réponse de `GetDomainConfigs` : GetDomainConfigsResponse
22 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetDomainConfigs`: %v\n", resp)
23}
24

Modifier partiellement une configuration de domaine Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
domainToUpdatestringpathOui

Réponse

Renvoie : PatchDomainConfigResponse

Exemple

Exemple de PatchDomainConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 domainToUpdate := "domainToUpdate_example" // string |
14 patchDomainConfigParams := *openapiclient.NewPatchDomainConfigParams() // PatchDomainConfigParams |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.PatchDomainConfig(context.Background(), domainToUpdate).TenantId(tenantId).PatchDomainConfigParams(patchDomainConfigParams).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchDomainConfig``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PatchDomainConfig` : PatchDomainConfigResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchDomainConfig`: %v\n", resp)
25}
26

Remplacer une configuration de domaine Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
domainToUpdatestringpathOui

Réponse

Retourne : PutDomainConfigResponse

Exemple

Exemple de PutDomainConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 domainToUpdate := "domainToUpdate_example" // string |
14 updateDomainConfigParams := *openapiclient.NewUpdateDomainConfigParams("Domain_example") // UpdateDomainConfigParams |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.PutDomainConfig(context.Background(), domainToUpdate).TenantId(tenantId).UpdateDomainConfigParams(updateDomainConfigParams).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PutDomainConfig``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PutDomainConfig` : PutDomainConfigResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PutDomainConfig`: %v\n", resp)
25}
26

Créer un modèle d'e-mail Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui

Réponse

Renvoie : CreateEmailTemplateResponse

Exemple

Exemple de CreateEmailTemplate
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createEmailTemplateBody := *openapiclient.NewCreateEmailTemplateBody("EmailTemplateId_example", "DisplayName_example", "Ejs_example") // CreateEmailTemplateBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateEmailTemplate(context.Background()).TenantId(tenantId).CreateEmailTemplateBody(createEmailTemplateBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateEmailTemplate``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateEmailTemplate`: CreateEmailTemplateResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateEmailTemplate`: %v\n", resp)
24}
25

Supprimer un modèle d'e-mail Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple de DeleteEmailTemplate
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteEmailTemplate(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteEmailTemplate``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteEmailTemplate`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteEmailTemplate`: %v\n", resp)
24}
25

Supprimer une erreur de rendu de modèle d'e-mail Internal Link


Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
errorIdstringpathOui

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple DeleteEmailTemplateRenderError
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 errorId := "errorId_example" // string |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.DeleteEmailTemplateRenderError(context.Background(), id, errorId).TenantId(tenantId).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteEmailTemplateRenderError``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteEmailTemplateRenderError` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteEmailTemplateRenderError`: %v\n", resp)
25}
26

Obtenir un modèle d'e-mail Internal Link


Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie: GetEmailTemplateResponse

Exemple

Exemple GetEmailTemplate
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetEmailTemplate(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetEmailTemplate``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetEmailTemplate` : GetEmailTemplateResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplate`: %v\n", resp)
24}
25

Obtenir les définitions de modèles d'e-mail Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui

Réponse

Renvoie: GetEmailTemplateDefinitionsResponse

Exemple

Exemple de GetEmailTemplateDefinitions
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13
14 configuration := openapiclient.NewConfiguration()
15 apiClient := openapiclient.NewAPIClient(configuration)
16 resp, r, err := apiClient.DefaultAPI.GetEmailTemplateDefinitions(context.Background()).TenantId(tenantId).Execute()
17 if err != nil {
18 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetEmailTemplateDefinitions``: %v\n", err)
19 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
20 }
21 // réponse de `GetEmailTemplateDefinitions` : GetEmailTemplateDefinitionsResponse
22 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplateDefinitions`: %v\n", resp)
23}
24

Obtenir les erreurs de rendu des modèles d'e-mail Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
skipnumberqueryNon

Réponse

Renvoie : GetEmailTemplateRenderErrorsResponse

Exemple

Exemple GetEmailTemplateRenderErrors
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 skip := float64(1.2) // float64 | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.GetEmailTemplateRenderErrors(context.Background(), id).TenantId(tenantId).Skip(skip).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetEmailTemplateRenderErrors``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetEmailTemplateRenderErrors`: GetEmailTemplateRenderErrorsResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplateRenderErrors`: %v\n", resp)
25}
26

Obtenir les modèles d'e-mail Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
skipnumberqueryNon

Réponse

Renvoie : GetEmailTemplatesResponse

Exemple

Exemple de GetEmailTemplates
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := float64(1.2) // float64 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetEmailTemplates(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetEmailTemplates``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetEmailTemplates`: GetEmailTemplatesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplates`: %v\n", resp)
24}
25

Rendre un modèle d'e-mail Internal Link


Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
localestringqueryNon

Réponse

Renvoie : RenderEmailTemplateResponse

Exemple

Exemple de RenderEmailTemplate
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 renderEmailTemplateBody := *openapiclient.NewRenderEmailTemplateBody("EmailTemplateId_example", "Ejs_example") // RenderEmailTemplateBody |
14 locale := "locale_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.RenderEmailTemplate(context.Background()).TenantId(tenantId).RenderEmailTemplateBody(renderEmailTemplateBody).Locale(locale).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RenderEmailTemplate``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `RenderEmailTemplate`: RenderEmailTemplateResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RenderEmailTemplate`: %v\n", resp)
25}
26

Mettre à jour un modèle d'e-mail Internal Link

Paramètres

NameTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple UpdateEmailTemplate
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateEmailTemplateBody := *openapiclient.NewUpdateEmailTemplateBody() // UpdateEmailTemplateBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateEmailTemplate(context.Background(), id).TenantId(tenantId).UpdateEmailTemplateBody(updateEmailTemplateBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateEmailTemplate``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // response from `UpdateEmailTemplate`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateEmailTemplate`: %v\n", resp)
25}
26

Obtenir le journal d'événements Internal Link

req tenantId urlId userIdWS

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringpathOui
urlIdstringqueryOui
userIdWSstringqueryOui
startTimeintegerqueryOui
endTimeintegerqueryNon

Réponse

Retourne: GetEventLogResponse

Exemple

Exemple de GetEventLog
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 userIdWS := "userIdWS_example" // string |
15 startTime := int64(789) // int64 |
16 endTime := int64(789) // int64 | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.GetEventLog(context.Background(), tenantId).UrlId(urlId).UserIdWS(userIdWS).StartTime(startTime).EndTime(endTime).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetEventLog``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `GetEventLog` : GetEventLogResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetEventLog`: %v\n", resp)
27}
28

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

req tenantId urlId userIdWS

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
urlIdstringqueryOui
userIdWSstringqueryOui
startTimeintegerqueryOui
endTimeintegerqueryNon

Réponse

Renvoie : GetEventLogResponse

Exemple

Exemple de GetGlobalEventLog
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 userIdWS := "userIdWS_example" // string |
15 startTime := int64(789) // int64 |
16 endTime := int64(789) // int64 | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.GetGlobalEventLog(context.Background(), tenantId).UrlId(urlId).UserIdWS(userIdWS).StartTime(startTime).EndTime(endTime).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetGlobalEventLog``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `GetGlobalEventLog` : GetEventLogResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGlobalEventLog`: %v\n", resp)
27}
28

Créer une publication Internal Link


Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
broadcastIdstringqueryNo
isLivebooleanqueryNo
doSpamCheckbooleanqueryNo
skipDupCheckbooleanqueryNo

Réponse

Renvoie: CreateFeedPostsResponse

Exemple

Exemple de CreateFeedPost
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createFeedPostParams := *openapiclient.NewCreateFeedPostParams() // CreateFeedPostParams |
14 broadcastId := "broadcastId_example" // string | (optionnel)
15 isLive := true // bool | (optionnel)
16 doSpamCheck := true // bool | (optionnel)
17 skipDupCheck := true // bool | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.DefaultAPI.CreateFeedPost(context.Background()).TenantId(tenantId).CreateFeedPostParams(createFeedPostParams).BroadcastId(broadcastId).IsLive(isLive).DoSpamCheck(doSpamCheck).SkipDupCheck(skipDupCheck).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateFeedPost``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `CreateFeedPost`: CreateFeedPostsResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateFeedPost`: %v\n", resp)
28}
29

Créer une publication publique Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Retourne: CreateFeedPostResponse

Exemple

Exemple CreateFeedPostPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createFeedPostParams := *openapiclient.NewCreateFeedPostParams() // CreateFeedPostParams |
14 broadcastId := "broadcastId_example" // string | (optionnel)
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.CreateFeedPostPublic(context.Background(), tenantId).CreateFeedPostParams(createFeedPostParams).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.CreateFeedPostPublic``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `CreateFeedPostPublic`: CreateFeedPostResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateFeedPostPublic`: %v\n", resp)
26}
27

Supprimer une publication publique Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
postIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : DeleteFeedPostPublicResponse

Exemple

Exemple de DeleteFeedPostPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 postId := "postId_example" // string |
14 broadcastId := "broadcastId_example" // string | (optionnel)
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.DeleteFeedPostPublic(context.Background(), tenantId, postId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.DeleteFeedPostPublic``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `DeleteFeedPostPublic` : DeleteFeedPostPublicResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteFeedPostPublic`: %v\n", resp)
26}
27

Obtenir des publications Internal Link

req tenantId afterId

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryYes
afterIdstringqueryNo
limitintegerqueryNo
tagsarrayqueryNo

Réponse

Renvoie : GetFeedPostsResponse

Exemple

Exemple de GetFeedPosts
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 afterId := "afterId_example" // string | (optionnel)
14 limit := int32(56) // int32 | (optionnel)
15 tags := []string{"Inner_example"} // []string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.GetFeedPosts(context.Background()).TenantId(tenantId).AfterId(afterId).Limit(limit).Tags(tags).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetFeedPosts``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetFeedPosts`: GetFeedPostsResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFeedPosts`: %v\n", resp)
26}
27

Obtenir des publications publiques Internal Link

req tenantId afterId

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
afterIdstringqueryNon
limitintegerqueryNon
tagsarrayqueryNon
ssostringqueryNon
isCrawlerbooleanqueryNon
includeUserInfobooleanqueryNon

Réponse

Renvoie: PublicFeedPostsResponse

Exemple

Exemple GetFeedPostsPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 afterId := "afterId_example" // string | (facultatif)
14 limit := int32(56) // int32 | (facultatif)
15 tags := []string{"Inner_example"} // []string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17 isCrawler := true // bool | (facultatif)
18 includeUserInfo := true // bool | (facultatif)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.PublicAPI.GetFeedPostsPublic(context.Background(), tenantId).AfterId(afterId).Limit(limit).Tags(tags).Sso(sso).IsCrawler(isCrawler).IncludeUserInfo(includeUserInfo).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetFeedPostsPublic``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `GetFeedPostsPublic`: PublicFeedPostsResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetFeedPostsPublic`: %v\n", resp)
29}
30

Obtenir les statistiques des publications Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
postIdsarrayqueryOui
ssostringqueryNon

Réponse

Renvoie : FeedPostsStatsResponse

Exemple

Exemple de GetFeedPostsStats
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 postIds := []string{"Inner_example"} // []string |
14 sso := "sso_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.GetFeedPostsStats(context.Background(), tenantId).PostIds(postIds).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetFeedPostsStats``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetFeedPostsStats`: FeedPostsStatsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetFeedPostsStats`: %v\n", resp)
25}
26

Obtenir les réactions d'un utilisateur (public) Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringcheminOui
postIdsarrayrequêteNon
ssostringrequêteNon

Réponse

Retourne : UserReactsResponse

Exemple

Exemple de GetUserReactsPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 postIds := []string{"Inner_example"} // []string | (optionnel)
14 sso := "sso_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.GetUserReactsPublic(context.Background(), tenantId).PostIds(postIds).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetUserReactsPublic``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetUserReactsPublic` : UserReactsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserReactsPublic`: %v\n", resp)
25}
26

Réagir à une publication (public) Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
postIdstringpathOui
isUndobooleanqueryNon
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie: ReactFeedPostResponse

Exemple

Exemple de ReactFeedPostPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 postId := "postId_example" // string |
14 reactBodyParams := *openapiclient.NewReactBodyParams() // ReactBodyParams |
15 isUndo := true // bool | (facultatif)
16 broadcastId := "broadcastId_example" // string | (facultatif)
17 sso := "sso_example" // string | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.ReactFeedPostPublic(context.Background(), tenantId, postId).ReactBodyParams(reactBodyParams).IsUndo(isUndo).BroadcastId(broadcastId).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ReactFeedPostPublic``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `ReactFeedPostPublic` : ReactFeedPostResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ReactFeedPostPublic`: %v\n", resp)
28}
29

Mettre à jour une publication Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de UpdateFeedPost
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 "time"
9 openapiclient "github.com/fastcomments/fastcomments-go/client"
10)
11
12func main() {
13 tenantId := "tenantId_example" // string |
14 id := "id_example" // string |
15 feedPost := *openapiclient.NewFeedPost("Id_example", "TenantId_example", time.Now()) // FeedPost |
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.UpdateFeedPost(context.Background(), id).TenantId(tenantId).FeedPost(feedPost).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateFeedPost``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UpdateFeedPost` : APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateFeedPost`: %v\n", resp)
26}
27

Mettre à jour une publication (publique) Internal Link

Paramètres

NameTypeEmplacementObligatoireDescription
tenantIdstringpathOui
postIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie: CreateFeedPostResponse

Exemple

Exemple UpdateFeedPostPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 postId := "postId_example" // string |
14 updateFeedPostParams := *openapiclient.NewUpdateFeedPostParams() // UpdateFeedPostParams |
15 broadcastId := "broadcastId_example" // string | (optionnel)
16 sso := "sso_example" // string | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.UpdateFeedPostPublic(context.Background(), tenantId, postId).UpdateFeedPostParams(updateFeedPostParams).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UpdateFeedPostPublic``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `UpdateFeedPostPublic` : CreateFeedPostResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateFeedPostPublic`: %v\n", resp)
27}
28

Signaler un commentaire (public) Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
commentIdstringpathOui
isFlaggedbooleanqueryOui
ssostringqueryNon

Réponse

Retourne: APIEmptyResponse

Exemple

Exemple de FlagCommentPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 isFlagged := true // bool |
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.FlagCommentPublic(context.Background(), commentId).TenantId(tenantId).IsFlagged(isFlagged).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.FlagCommentPublic``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `FlagCommentPublic`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.FlagCommentPublic`: %v\n", resp)
26}
27

Obtenir GIF grand Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
largeInternalURLSanitizedstringqueryOui

Réponse

Renvoie : GifGetLargeResponse

Exemple

Exemple GetGifLarge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 largeInternalURLSanitized := "largeInternalURLSanitized_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.GetGifLarge(context.Background(), tenantId).LargeInternalURLSanitized(largeInternalURLSanitized).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetGifLarge``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetGifLarge` : GifGetLargeResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifLarge`: %v\n", resp)
24}
25

Rechercher des GIFs Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringpathOui
searchstringqueryOui
localestringqueryNon
ratingstringqueryNon
pagenumberqueryNon

Réponse

Renvoie: GetGifsSearchResponse

Exemple

Exemple de GetGifsSearch
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 search := "search_example" // string |
14 locale := "locale_example" // string | (optionnel)
15 rating := "rating_example" // string | (optionnel)
16 page := float64(1.2) // float64 | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.GetGifsSearch(context.Background(), tenantId).Search(search).Locale(locale).Rating(rating).Page(page).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetGifsSearch``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `GetGifsSearch`: GetGifsSearchResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifsSearch`: %v\n", resp)
27}
28

Obtenir les GIFs tendance Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
localestringqueryNon
ratingstringqueryNon
pagenumberqueryNon

Réponse

Renvoie : GetGifsTrendingResponse

Exemple

Exemple de GetGifsTrending
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 locale := "locale_example" // string | (optionnel)
14 rating := "rating_example" // string | (optionnel)
15 page := float64(1.2) // float64 | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.GetGifsTrending(context.Background(), tenantId).Locale(locale).Rating(rating).Page(page).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetGifsTrending``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetGifsTrending`: GetGifsTrendingResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifsTrending`: %v\n", resp)
26}
27

Ajouter un hashtag Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui

Réponse

Renvoie : CreateHashTagResponse

Exemple

Exemple AddHashTag
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createHashTagBody := *openapiclient.NewCreateHashTagBody("Tag_example") // CreateHashTagBody | (facultatif)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.AddHashTag(context.Background()).TenantId(tenantId).CreateHashTagBody(createHashTagBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AddHashTag``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `AddHashTag` : CreateHashTagResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddHashTag`: %v\n", resp)
24}
25

Ajouter des hashtags en masse Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui

Réponse

Retourne : BulkCreateHashTagsResponse

Exemple

Exemple AddHashTagsBulk
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 bulkCreateHashTagsBody := *openapiclient.NewBulkCreateHashTagsBody([]openapiclient.BulkCreateHashTagsBodyTagsInner{*openapiclient.NewBulkCreateHashTagsBodyTagsInner("Tag_example")}) // BulkCreateHashTagsBody | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.AddHashTagsBulk(context.Background()).TenantId(tenantId).BulkCreateHashTagsBody(bulkCreateHashTagsBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AddHashTagsBulk``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `AddHashTagsBulk` : BulkCreateHashTagsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddHashTagsBulk`: %v\n", resp)
24}
25

Supprimer un hashtag Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
tagstringpathYes

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple DeleteHashTag
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 tag := "tag_example" // string |
14 deleteHashTagRequestBody := *openapiclient.NewDeleteHashTagRequestBody() // DeleteHashTagRequestBody | (optional)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.DeleteHashTag(context.Background(), tag).TenantId(tenantId).DeleteHashTagRequestBody(deleteHashTagRequestBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteHashTag``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteHashTag` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteHashTag`: %v\n", resp)
25}
26

Obtenir les hashtags Internal Link


Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
pagenumberqueryNon

Réponse

Retourne : GetHashTagsResponse

Exemple

Exemple de GetHashTags
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 page := float64(1.2) // float64 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetHashTags(context.Background()).TenantId(tenantId).Page(page).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetHashTags``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetHashTags` : GetHashTagsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetHashTags`: %v\n", resp)
24}
25

Modifier partiellement un hashtag Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
tagstringpathOui

Réponse

Renvoie : UpdateHashTagResponse

Exemple

Exemple de PatchHashTag
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 tag := "tag_example" // string |
14 updateHashTagBody := *openapiclient.NewUpdateHashTagBody() // UpdateHashTagBody | (optional)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.PatchHashTag(context.Background(), tag).TenantId(tenantId).UpdateHashTagBody(updateHashTagBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel de `DefaultAPI.PatchHashTag`` : %v\n", err)
21 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
22 }
23 // réponse de `PatchHashTag` : UpdateHashTagResponse
24 fmt.Fprintf(os.Stdout, "Réponse de `DefaultAPI.PatchHashTag` : %v\n", resp)
25}
26

Supprimer un vote de modération Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
voteIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie : VoteDeleteResponse

Exemple

Exemple DeleteModerationVote
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 voteId := "voteId_example" // string |
15 broadcastId := "broadcastId_example" // string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.DeleteModerationVote(context.Background(), commentId, voteId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.DeleteModerationVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `DeleteModerationVote` : VoteDeleteResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.DeleteModerationVote`: %v\n", resp)
27}
28

Obtenir les commentaires via l'API Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
pagenumberqueryNon
countnumberqueryNon
text-searchstringqueryNon
byIPFromCommentstringqueryNon
filtersstringqueryNon
searchFiltersstringqueryNon
sortsstringqueryNon
demobooleanqueryNon
ssostringqueryNon

Réponse

Renvoie : ModerationAPIGetCommentsResponse

Exemple

Exemple GetApiComments
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 page := float64(1.2) // float64 | (facultatif)
14 count := float64(1.2) // float64 | (facultatif)
15 textSearch := "textSearch_example" // string | (facultatif)
16 byIPFromComment := "byIPFromComment_example" // string | (facultatif)
17 filters := "filters_example" // string | (facultatif)
18 searchFilters := "searchFilters_example" // string | (facultatif)
19 sorts := "sorts_example" // string | (facultatif)
20 demo := true // bool | (facultatif)
21 sso := "sso_example" // string | (facultatif)
22
23 configuration := openapiclient.NewConfiguration()
24 apiClient := openapiclient.NewAPIClient(configuration)
25 resp, r, err := apiClient.ModerationAPI.GetApiComments(context.Background()).TenantId(tenantId).Page(page).Count(count).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filters(filters).SearchFilters(searchFilters).Sorts(sorts).Demo(demo).Sso(sso).Execute()
26 if err != nil {
27 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel de `ModerationAPI.GetApiComments`` : %v\n", err)
28 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
29 }
30 // réponse de `GetApiComments` : ModerationAPIGetCommentsResponse
31 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.GetApiComments` : %v\n", resp)
32}
33

Obtenir le statut d'exportation API Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
batchJobIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : ModerationExportStatusResponse

Exemple

Exemple GetApiExportStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 batchJobId := "batchJobId_example" // string | (facultatif)
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetApiExportStatus(context.Background()).TenantId(tenantId).BatchJobId(batchJobId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel de `ModerationAPI.GetApiExportStatus`` : %v\n", err)
21 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
22 }
23 // réponse de `GetApiExportStatus` : ModerationExportStatusResponse
24 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.GetApiExportStatus` : %v\n", resp)
25}
26

Obtenir les identifiants API Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
text-searchstringqueryNon
byIPFromCommentstringqueryNon
filtersstringqueryNon
searchFiltersstringqueryNon
afterIdstringqueryNon
demobooleanqueryNon
ssostringqueryNon

Réponse

Retourne : ModerationAPIGetCommentIdsResponse

Exemple

Exemple GetApiIds
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 textSearch := "textSearch_example" // string | (optionnel)
14 byIPFromComment := "byIPFromComment_example" // string | (optionnel)
15 filters := "filters_example" // string | (optionnel)
16 searchFilters := "searchFilters_example" // string | (optionnel)
17 afterId := "afterId_example" // string | (optionnel)
18 demo := true // bool | (optionnel)
19 sso := "sso_example" // string | (optionnel)
20
21 configuration := openapiclient.NewConfiguration()
22 apiClient := openapiclient.NewAPIClient(configuration)
23 resp, r, err := apiClient.ModerationAPI.GetApiIds(context.Background()).TenantId(tenantId).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filters(filters).SearchFilters(searchFilters).AfterId(afterId).Demo(demo).Sso(sso).Execute()
24 if err != nil {
25 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetApiIds``: %v\n", err)
26 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
27 }
28 // réponse de `GetApiIds` : ModerationAPIGetCommentIdsResponse
29 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetApiIds`: %v\n", resp)
30}
31

Obtenir les utilisateurs bannis d'un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
ssostringqueryNon

Réponse

Retourne : GetBannedUsersFromCommentResponse

Exemple

Exemple GetBanUsersFromComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetBanUsersFromComment(context.Background(), commentId).TenantId(tenantId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetBanUsersFromComment``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetBanUsersFromComment` : GetBannedUsersFromCommentResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetBanUsersFromComment`: %v\n", resp)
25}
26

Obtenir le statut de bannissement d'un commentaire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Réponse

Renvoie : GetCommentBanStatusResponse

Exemple

Exemple GetCommentBanStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetCommentBanStatus(context.Background(), commentId).TenantId(tenantId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetCommentBanStatus``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetCommentBanStatus` : GetCommentBanStatusResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCommentBanStatus`: %v\n", resp)
25}
26

Obtenir les réponses d'un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
ssostringqueryNon

Réponse

Renvoie : ModerationAPIChildCommentsResponse

Exemple

Exemple GetCommentChildren
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne |
13 commentId := "commentId_example" // chaîne |
14 sso := "sso_example" // chaîne | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetCommentChildren(context.Background(), commentId).TenantId(tenantId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetCommentChildren``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetCommentChildren` : ModerationAPIChildCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCommentChildren`: %v\n", resp)
25}
26

Obtenir le nombre Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filterstringqueryNo
searchFiltersstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Réponse

Renvoie : ModerationAPICountCommentsResponse

Exemple

Exemple GetCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 textSearch := "textSearch_example" // string | (optional)
14 byIPFromComment := "byIPFromComment_example" // string | (optional)
15 filter := "filter_example" // string | (optional)
16 searchFilters := "searchFilters_example" // string | (optional)
17 demo := true // bool | (optional)
18 sso := "sso_example" // string | (optional)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.ModerationAPI.GetCount(context.Background()).TenantId(tenantId).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filter(filter).SearchFilters(searchFilters).Demo(demo).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel de `ModerationAPI.GetCount`` : %v\n", err)
25 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
26 }
27 // réponse de `GetCount` : ModerationAPICountCommentsResponse
28 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.GetCount` : %v\n", resp)
29}
30

Obtenir les totaux Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
ssostringqueryNo

Réponse

Returns: GetBannedUsersCountResponse

Exemple

Exemple GetCounts
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 sso := "sso_example" // string | (facultatif)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.ModerationAPI.GetCounts(context.Background()).TenantId(tenantId).Sso(sso).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetCounts``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetCounts`: GetBannedUsersCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCounts`: %v\n", resp)
24}
25

Obtenir les journaux Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
ssostringqueryNon

Réponse

Renvoie : ModerationAPIGetLogsResponse

Exemple

Exemple GetLogs
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetLogs(context.Background(), commentId).TenantId(tenantId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetLogs``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetLogs` : ModerationAPIGetLogsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetLogs`: %v\n", resp)
25}
26

Obtenir les badges manuels Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : GetTenantManualBadgesResponse

Exemple

Exemple GetManualBadges
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 sso := "sso_example" // string | (facultatif)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.ModerationAPI.GetManualBadges(context.Background()).TenantId(tenantId).Sso(sso).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetManualBadges``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetManualBadges` : GetTenantManualBadgesResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetManualBadges`: %v\n", resp)
24}
25

Obtenir les badges manuels pour un utilisateur Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
badgesUserIdstringqueryNon
commentIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie : GetUserManualBadgesResponse

Exemple

Exemple GetManualBadgesForUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 badgesUserId := "badgesUserId_example" // string | (optionnel)
14 commentId := "commentId_example" // string | (optionnel)
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.GetManualBadgesForUser(context.Background()).TenantId(tenantId).BadgesUserId(badgesUserId).CommentId(commentId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetManualBadgesForUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetManualBadgesForUser` : GetUserManualBadgesResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetManualBadgesForUser`: %v\n", resp)
26}
27

Obtenir le commentaire de modération Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
includeEmailbooleanqueryNon
includeIPbooleanqueryNon
ssostringqueryNon

Réponse

Renvoie : ModerationAPICommentResponse

Exemple

GetModerationComment Exemple
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 includeEmail := true // bool | (facultatif)
15 includeIP := true // bool | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.GetModerationComment(context.Background(), commentId).TenantId(tenantId).IncludeEmail(includeEmail).IncludeIP(includeIP).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel `ModerationAPI.GetModerationComment``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
24 }
25 // réponse de `GetModerationComment`: ModerationAPICommentResponse
26 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.GetModerationComment`: %v\n", resp)
27}
28

Obtenir le texte du commentaire de modération Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
commentIdstringpathOui
ssostringqueryNon

Réponse

Renvoie : GetCommentTextResponse

Exemple

Exemple GetModerationCommentText
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne |
13 commentId := "commentId_example" // chaîne |
14 sso := "sso_example" // chaîne | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetModerationCommentText(context.Background(), commentId).TenantId(tenantId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetModerationCommentText``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetModerationCommentText` : GetCommentTextResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetModerationCommentText`: %v\n", resp)
25}
26

Obtenir le résumé préalable au bannissement Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryYes
commentIdstringpathYes
includeByUserIdAndEmailbooleanqueryNo
includeByIPbooleanqueryNo
includeByEmailDomainbooleanqueryNo
ssostringqueryNo

Réponse

Renvoie : PreBanSummary

Exemple

Exemple GetPreBanSummary
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne |
13 commentId := "commentId_example" // chaîne |
14 includeByUserIdAndEmail := true // booléen | (facultatif)
15 includeByIP := true // booléen | (facultatif)
16 includeByEmailDomain := true // booléen | (facultatif)
17 sso := "sso_example" // chaîne | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.ModerationAPI.GetPreBanSummary(context.Background(), commentId).TenantId(tenantId).IncludeByUserIdAndEmail(includeByUserIdAndEmail).IncludeByIP(includeByIP).IncludeByEmailDomain(includeByEmailDomain).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetPreBanSummary``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `GetPreBanSummary` : PreBanSummary
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetPreBanSummary`: %v\n", resp)
28}
29

Obtenir le résumé de recherche de commentaires Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
valuestringqueryNon
filtersstringqueryNon
searchFiltersstringqueryNon
ssostringqueryNon

Réponse

Renvoie : ModerationCommentSearchResponse

Exemple

Exemple GetSearchCommentsSummary
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 value := "value_example" // string | (facultatif)
14 filters := "filters_example" // string | (facultatif)
15 searchFilters := "searchFilters_example" // string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.GetSearchCommentsSummary(context.Background()).TenantId(tenantId).Value(value).Filters(filters).SearchFilters(searchFilters).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetSearchCommentsSummary``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `GetSearchCommentsSummary` : ModerationCommentSearchResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchCommentsSummary`: %v\n", resp)
27}
28

Obtenir les pages de recherche Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
valuestringqueryNon
ssostringqueryNon

Réponse

Renvoie : ModerationPageSearchResponse

Exemple

Exemple GetSearchPages
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 value := "value_example" // string | (facultatif)
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetSearchPages(context.Background()).TenantId(tenantId).Value(value).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetSearchPages``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetSearchPages` : ModerationPageSearchResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchPages`: %v\n", resp)
25}
26

Obtenir les sites de recherche Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
valuestringqueryNon
ssostringqueryNon

Réponse

Renvoie : ModerationSiteSearchResponse

Exemple

Exemple GetSearchSites
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 value := "value_example" // string | (optionnel)
14 sso := "sso_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetSearchSites(context.Background()).TenantId(tenantId).Value(value).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel de `ModerationAPI.GetSearchSites`` : %v\n", err)
21 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
22 }
23 // réponse de `GetSearchSites` : ModerationSiteSearchResponse
24 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.GetSearchSites` : %v\n", resp)
25}
26

Obtenir les suggestions de recherche Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
text-searchstringqueryNo
ssostringqueryNo

Réponse

Renvoie : ModerationSuggestResponse

Exemple

Exemple GetSearchSuggest
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne de caractères |
13 textSearch := "textSearch_example" // chaîne de caractères | (facultatif)
14 sso := "sso_example" // chaîne de caractères | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetSearchSuggest(context.Background()).TenantId(tenantId).TextSearch(textSearch).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetSearchSuggest``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetSearchSuggest` : ModerationSuggestResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchSuggest`: %v\n", resp)
25}
26

Obtenir les utilisateurs recherchés Internal Link

Parameters

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
valuestringqueryNon
ssostringqueryNon

Réponse

Renvoie : ModerationUserSearchResponse

Exemple

Exemple GetSearchUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 value := "value_example" // string | (facultatif)
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetSearchUsers(context.Background()).TenantId(tenantId).Value(value).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetSearchUsers``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetSearchUsers` : ModerationUserSearchResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchUsers`: %v\n", resp)
25}
26

Obtenir le facteur de confiance Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
userIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie : GetUserTrustFactorResponse

Exemple

Exemple GetTrustFactor
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (facultatif)
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetTrustFactor(context.Background()).TenantId(tenantId).UserId(userId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetTrustFactor``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetTrustFactor` : GetUserTrustFactorResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetTrustFactor`: %v\n", resp)
25}
26

Obtenir la préférence de bannissement de l'utilisateur Internal Link

Parameters

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
ssostringqueryNo

Réponse

Retourne : APIModerateGetUserBanPreferencesResponse

Exemple

Exemple GetUserBanPreference
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne de caractères |
13 sso := "sso_example" // chaîne de caractères | (facultatif)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.ModerationAPI.GetUserBanPreference(context.Background()).TenantId(tenantId).Sso(sso).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetUserBanPreference``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUserBanPreference` : APIModerateGetUserBanPreferencesResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetUserBanPreference`: %v\n", resp)
24}
25

Obtenir le profil interne de l'utilisateur Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : GetUserInternalProfileResponse

Exemple

GetUserInternalProfile Exemple
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string | (facultatif)
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetUserInternalProfile(context.Background()).TenantId(tenantId).CommentId(commentId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetUserInternalProfile``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetUserInternalProfile`: GetUserInternalProfileResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetUserInternalProfile`: %v\n", resp)
25}
26

Ajuster les votes des commentaires Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Réponse

Retourne : AdjustVotesResponse

Exemple

Exemple d'ajustement des votes de commentaire
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 adjustCommentVotesParams := *openapiclient.NewAdjustCommentVotesParams(float64(123)) // AdjustCommentVotesParams |
15 broadcastId := "broadcastId_example" // string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.PostAdjustCommentVotes(context.Background(), commentId).TenantId(tenantId).AdjustCommentVotesParams(adjustCommentVotesParams).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostAdjustCommentVotes``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `PostAdjustCommentVotes` : AdjustVotesResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostAdjustCommentVotes`: %v\n", resp)
27}
28

Lancer une exportation API Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringrequêteOui
text-searchstringrequêteNon
byIPFromCommentstringrequêteNon
filtersstringrequêteNon
searchFiltersstringrequêteNon
sortsstringrequêteNon
ssostringrequêteNon

Réponse

Retourne : ModerationExportResponse

Exemple

Exemple PostApiExport
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 textSearch := "textSearch_example" // string | (facultatif)
14 byIPFromComment := "byIPFromComment_example" // string | (facultatif)
15 filters := "filters_example" // string | (facultatif)
16 searchFilters := "searchFilters_example" // string | (facultatif)
17 sorts := "sorts_example" // string | (facultatif)
18 sso := "sso_example" // string | (facultatif)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.ModerationAPI.PostApiExport(context.Background()).TenantId(tenantId).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filters(filters).SearchFilters(searchFilters).Sorts(sorts).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostApiExport``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `PostApiExport` : ModerationExportResponse
28 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostApiExport`: %v\n", resp)
29}
30

Bannir un utilisateur depuis un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
commentIdstringpathYes
banEmailbooleanqueryNo
banEmailDomainbooleanqueryNo
banIPbooleanqueryNo
deleteAllUsersCommentsbooleanqueryNo
bannedUntilstringqueryNo
isShadowBanbooleanqueryNo
updateIdstringqueryNo
banReasonstringqueryNo
ssostringqueryNo

Réponse

Retourne : BanUserFromCommentResult

Exemple

Exemple PostBanUserFromComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 banEmail := true // bool | (optionnel)
15 banEmailDomain := true // bool | (optionnel)
16 banIP := true // bool | (optionnel)
17 deleteAllUsersComments := true // bool | (optionnel)
18 bannedUntil := "bannedUntil_example" // string | (optionnel)
19 isShadowBan := true // bool | (optionnel)
20 updateId := "updateId_example" // string | (optionnel)
21 banReason := "banReason_example" // string | (optionnel)
22 sso := "sso_example" // string | (optionnel)
23
24 configuration := openapiclient.NewConfiguration()
25 apiClient := openapiclient.NewAPIClient(configuration)
26 resp, r, err := apiClient.ModerationAPI.PostBanUserFromComment(context.Background(), commentId).TenantId(tenantId).BanEmail(banEmail).BanEmailDomain(banEmailDomain).BanIP(banIP).DeleteAllUsersComments(deleteAllUsersComments).BannedUntil(bannedUntil).IsShadowBan(isShadowBan).UpdateId(updateId).BanReason(banReason).Sso(sso).Execute()
27 if err != nil {
28 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostBanUserFromComment``: %v\n", err)
29 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
30 }
31 // réponse de `PostBanUserFromComment` : BanUserFromCommentResult
32 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostBanUserFromComment`: %v\n", resp)
33}
34

Annuler le bannissement d'un utilisateur Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
ssostringqueryNon

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple PostBanUserUndo
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 banUserUndoParams := *openapiclient.NewBanUserUndoParams(*openapiclient.NewAPIBanUserChangeLog()) // BanUserUndoParams |
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.PostBanUserUndo(context.Background()).TenantId(tenantId).BanUserUndoParams(banUserUndoParams).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostBanUserUndo``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PostBanUserUndo` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostBanUserUndo`: %v\n", resp)
25}
26

Générer un résumé préalable de bannissement en masse Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
includeByUserIdAndEmailbooleanqueryNon
includeByIPbooleanqueryNon
includeByEmailDomainbooleanqueryNon
ssostringqueryNon

Réponse

Retourne : BulkPreBanSummary

Exemple

Exemple PostBulkPreBanSummary
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 bulkPreBanParams := *openapiclient.NewBulkPreBanParams([]string{"CommentIds_example"}) // BulkPreBanParams |
14 includeByUserIdAndEmail := true // bool | (facultatif)
15 includeByIP := true // bool | (facultatif)
16 includeByEmailDomain := true // bool | (facultatif)
17 sso := "sso_example" // string | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.ModerationAPI.PostBulkPreBanSummary(context.Background()).TenantId(tenantId).BulkPreBanParams(bulkPreBanParams).IncludeByUserIdAndEmail(includeByUserIdAndEmail).IncludeByIP(includeByIP).IncludeByEmailDomain(includeByEmailDomain).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostBulkPreBanSummary``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `PostBulkPreBanSummary` : BulkPreBanSummary
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostBulkPreBanSummary`: %v\n", resp)
28}
29

Obtenir les commentaires par ID Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
ssostringqueryNo

Réponse

Retourne : ModerationAPIChildCommentsResponse

Exemple

PostCommentsByIds Exemple
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentsByIdsParams := *openapiclient.NewCommentsByIdsParams([]string{"Ids_example"}) // CommentsByIdsParams |
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.PostCommentsByIds(context.Background()).TenantId(tenantId).CommentsByIdsParams(commentsByIdsParams).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostCommentsByIds``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PostCommentsByIds` : ModerationAPIChildCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostCommentsByIds`: %v\n", resp)
25}
26

Signaler un commentaire (modération) Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple PostFlagComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string | (facultatif)
15 sso := "sso_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.PostFlagComment(context.Background(), commentId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostFlagComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PostFlagComment` : APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostFlagComment`: %v\n", resp)
26}
27

Retirer un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : PostRemoveCommentApiResponse

Exemple

Exemple de PostRemoveComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string | (facultatif)
15 sso := "sso_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.PostRemoveComment(context.Background(), commentId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostRemoveComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PostRemoveComment` : PostRemoveCommentApiResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostRemoveComment`: %v\n", resp)
26}
27

Restaurer un commentaire supprimé Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de PostRestoreDeletedComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string | (optionnel)
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.PostRestoreDeletedComment(context.Background(), commentId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostRestoreDeletedComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PostRestoreDeletedComment` : APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostRestoreDeletedComment`: %v\n", resp)
26}
27

Définir le statut d'approbation d'un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
approvedbooleanqueryNon
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie : SetCommentApprovedResponse

Exemple

Exemple PostSetCommentApprovalStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 approved := true // bool | (facultatif)
15 broadcastId := "broadcastId_example" // string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.PostSetCommentApprovalStatus(context.Background(), commentId).TenantId(tenantId).Approved(approved).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostSetCommentApprovalStatus``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `PostSetCommentApprovalStatus` : SetCommentApprovedResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentApprovalStatus`: %v\n", resp)
27}
28

Définir le statut de révision d'un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
reviewedbooleanqueryNon
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple PostSetCommentReviewStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 reviewed := true // bool | (facultatif)
15 broadcastId := "broadcastId_example" // string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.PostSetCommentReviewStatus(context.Background(), commentId).TenantId(tenantId).Reviewed(reviewed).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostSetCommentReviewStatus``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `PostSetCommentReviewStatus` : APIEmptyResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentReviewStatus`: %v\n", resp)
27}
28

Définir le statut de spam d'un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
spambooleanqueryNon
permNotSpambooleanqueryNon
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie : APIEmptyResponse

Exemple

PostSetCommentSpamStatus Exemple
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 spam := true // bool | (facultatif)
15 permNotSpam := true // bool | (facultatif)
16 broadcastId := "broadcastId_example" // string | (facultatif)
17 sso := "sso_example" // string | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.ModerationAPI.PostSetCommentSpamStatus(context.Background(), commentId).TenantId(tenantId).Spam(spam).PermNotSpam(permNotSpam).BroadcastId(broadcastId).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostSetCommentSpamStatus``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `PostSetCommentSpamStatus` : APIEmptyResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentSpamStatus`: %v\n", resp)
28}
29

Définir le texte d'un commentaire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Returns: SetCommentTextResponse

Exemple

Exemple PostSetCommentText
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 setCommentTextParams := *openapiclient.NewSetCommentTextParams("Comment_example") // SetCommentTextParams |
15 broadcastId := "broadcastId_example" // string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.PostSetCommentText(context.Background(), commentId).TenantId(tenantId).SetCommentTextParams(setCommentTextParams).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostSetCommentText``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `PostSetCommentText` : SetCommentTextResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentText`: %v\n", resp)
27}
28

Retirer le signalement d'un commentaire (modération) Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringpathOui
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple PostUnFlagComment
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string | (facultatif)
15 sso := "sso_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.PostUnFlagComment(context.Background(), commentId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostUnFlagComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PostUnFlagComment` : APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostUnFlagComment`: %v\n", resp)
26}
27

Publier un vote Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
commentIdstringpathYes
directionstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Réponse

Returns: VoteResponse

Exemple

Exemple PostVote
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne |
13 commentId := "commentId_example" // chaîne |
14 direction := "direction_example" // chaîne | (optionnel)
15 broadcastId := "broadcastId_example" // chaîne | (optionnel)
16 sso := "sso_example" // chaîne | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.PostVote(context.Background(), commentId).TenantId(tenantId).Direction(direction).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel de `ModerationAPI.PostVote`` : %v\n", err)
23 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
24 }
25 // réponse de `PostVote` : VoteResponse
26 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.PostVote` : %v\n", resp)
27}
28

Attribuer un badge Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
badgeIdstringqueryOui
userIdstringqueryNon
commentIdstringqueryNon
broadcastIdstringqueryNon
ssostringqueryNon

Réponse

Retourne : AwardUserBadgeResponse

Exemple

Exemple PutAwardBadge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 badgeId := "badgeId_example" // string |
14 userId := "userId_example" // string | (optionnel)
15 commentId := "commentId_example" // string | (optionnel)
16 broadcastId := "broadcastId_example" // string | (optionnel)
17 sso := "sso_example" // string | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.ModerationAPI.PutAwardBadge(context.Background()).TenantId(tenantId).BadgeId(badgeId).UserId(userId).CommentId(commentId).BroadcastId(broadcastId).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Erreur lors de l'appel `ModerationAPI.PutAwardBadge`` : %v\n", err)
24 fmt.Fprintf(os.Stderr, "Réponse HTTP complète : %v\n", r)
25 }
26 // réponse de `PutAwardBadge` : AwardUserBadgeResponse
27 fmt.Fprintf(os.Stdout, "Réponse de `ModerationAPI.PutAwardBadge` : %v\n", resp)
28}
29

Fermer un fil Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
urlIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple PutCloseThread
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 sso := "sso_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.PutCloseThread(context.Background()).TenantId(tenantId).UrlId(urlId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PutCloseThread``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PutCloseThread` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutCloseThread`: %v\n", resp)
25}
26

Retirer un badge Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Réponse

Renvoie : RemoveUserBadgeResponse

Exemple

Exemple PutRemoveBadge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 badgeId := "badgeId_example" // string |
14 userId := "userId_example" // string | (facultatif)
15 commentId := "commentId_example" // string | (facultatif)
16 broadcastId := "broadcastId_example" // string | (facultatif)
17 sso := "sso_example" // string | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.ModerationAPI.PutRemoveBadge(context.Background()).TenantId(tenantId).BadgeId(badgeId).UserId(userId).CommentId(commentId).BroadcastId(broadcastId).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PutRemoveBadge``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `PutRemoveBadge` : RemoveUserBadgeResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutRemoveBadge`: %v\n", resp)
28}
29

Rouvrir un fil Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
urlIdstringqueryOui
ssostringqueryNon

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple PutReopenThread
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne de caractères |
13 urlId := "urlId_example" // chaîne de caractères |
14 sso := "sso_example" // chaîne de caractères | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.PutReopenThread(context.Background()).TenantId(tenantId).UrlId(urlId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PutReopenThread``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PutReopenThread` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutReopenThread`: %v\n", resp)
25}
26

Définir le facteur de confiance Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
userIdstringqueryNon
trustFactorstringqueryNon
ssostringqueryNon

Réponse

Renvoie : SetUserTrustFactorResponse

Exemple

Exemple SetTrustFactor
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (optionnel)
14 trustFactor := "trustFactor_example" // string | (optionnel)
15 sso := "sso_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.SetTrustFactor(context.Background()).TenantId(tenantId).UserId(userId).TrustFactor(trustFactor).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.SetTrustFactor``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `SetTrustFactor` : SetUserTrustFactorResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.SetTrustFactor`: %v\n", resp)
26}
27

Créer un modérateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui

Réponse

Retourne: CreateModeratorResponse

Exemple

Exemple de CreateModerator
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createModeratorBody := *openapiclient.NewCreateModeratorBody("Name_example", "Email_example") // CreateModeratorBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateModerator(context.Background()).TenantId(tenantId).CreateModeratorBody(createModeratorBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateModerator``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateModerator`: CreateModeratorResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateModerator`: %v\n", resp)
24}
25

Supprimer un modérateur Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
sendEmailstringqueryNon

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple DeleteModerator
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 sendEmail := "sendEmail_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.DeleteModerator(context.Background(), id).TenantId(tenantId).SendEmail(sendEmail).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteModerator``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteModerator`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteModerator`: %v\n", resp)
25}
26

Obtenir un modérateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne : GetModeratorResponse

Exemple

Exemple GetModerator
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetModerator(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetModerator``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetModerator`: GetModeratorResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetModerator`: %v\n", resp)
24}
25

Obtenir les modérateurs Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
skipnumberqueryNon

Réponse

Renvoie : GetModeratorsResponse

Exemple

Exemple de GetModerators
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := float64(1.2) // float64 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetModerators(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetModerators``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetModerators` : GetModeratorsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetModerators`: %v\n", resp)
24}
25

Envoyer une invitation Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
fromNamestringqueryOui

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple de SendInvite
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 fromName := "fromName_example" // string |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.SendInvite(context.Background(), id).TenantId(tenantId).FromName(fromName).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.SendInvite``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `SendInvite` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SendInvite`: %v\n", resp)
25}
26

Mettre à jour un modérateur Internal Link

Paramètres

NomTypeLocationRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple UpdateModerator
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateModeratorBody := *openapiclient.NewUpdateModeratorBody() // UpdateModeratorBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateModerator(context.Background(), id).TenantId(tenantId).UpdateModeratorBody(updateModeratorBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateModerator``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `UpdateModerator`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateModerator`: %v\n", resp)
25}
26

Supprimer le nombre de notifications Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de DeleteNotificationCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteNotificationCount(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteNotificationCount``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteNotificationCount` : APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteNotificationCount`: %v\n", resp)
24}
25

Obtenir le nombre de notifications mis en cache Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne : GetCachedNotificationCountResponse

Exemple

Exemple de GetCachedNotificationCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetCachedNotificationCount(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetCachedNotificationCount``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetCachedNotificationCount`: GetCachedNotificationCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetCachedNotificationCount`: %v\n", resp)
24}
25

Obtenir le nombre de notifications Internal Link

Paramètres

NameTypeEmplacementRequisDescription
tenantIdstringqueryOui
userIdstringqueryNon
urlIdstringqueryNon
fromCommentIdstringqueryNon
viewedbooleanqueryNon
typestringqueryNon

Réponse

Renvoie : GetNotificationCountResponse

Exemple

Exemple GetNotificationCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (facultatif)
14 urlId := "urlId_example" // string | (facultatif)
15 fromCommentId := "fromCommentId_example" // string | (facultatif)
16 viewed := true // bool | (facultatif)
17 type_ := "type__example" // string | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.DefaultAPI.GetNotificationCount(context.Background()).TenantId(tenantId).UserId(userId).UrlId(urlId).FromCommentId(fromCommentId).Viewed(viewed).Type_(type_).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetNotificationCount``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `GetNotificationCount`: GetNotificationCountResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetNotificationCount`: %v\n", resp)
28}
29

Obtenir les notifications Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
userIdstringqueryNon
urlIdstringqueryNon
fromCommentIdstringqueryNon
viewedbooleanqueryNon
typestringqueryNon
skipnumberqueryNon

Réponse

Renvoie : GetNotificationsResponse

Exemple

Exemple de GetNotifications
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (optionnel)
14 urlId := "urlId_example" // string | (optionnel)
15 fromCommentId := "fromCommentId_example" // string | (optionnel)
16 viewed := true // bool | (optionnel)
17 type_ := "type__example" // string | (optionnel)
18 skip := float64(1.2) // float64 | (optionnel)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.DefaultAPI.GetNotifications(context.Background()).TenantId(tenantId).UserId(userId).UrlId(urlId).FromCommentId(fromCommentId).Viewed(viewed).Type_(type_).Skip(skip).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetNotifications``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `GetNotifications` : GetNotificationsResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetNotifications`: %v\n", resp)
29}
30

Mettre à jour une notification Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple d'UpdateNotification
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateNotificationBody := *openapiclient.NewUpdateNotificationBody() // UpdateNotificationBody |
15 userId := "userId_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.UpdateNotification(context.Background(), id).TenantId(tenantId).UpdateNotificationBody(updateNotificationBody).UserId(userId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateNotification``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UpdateNotification`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateNotification`: %v\n", resp)
26}
27

Créer une réaction de page V1 Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
urlIdstringqueryOui
titlestringqueryNon

Réponse

Renvoie: CreateV1PageReact

Exemple

Exemple CreateV1PageReact
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 title := "title_example" // string | (facultatif)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.CreateV1PageReact(context.Background(), tenantId).UrlId(urlId).Title(title).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.CreateV1PageReact``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `CreateV1PageReact`: CreateV1PageReact
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateV1PageReact`: %v\n", resp)
25}
26

Créer une réaction de page V2 Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
urlIdstringqueryOui
idstringqueryOui
titlestringqueryNon

Réponse

Renvoie : CreateV1PageReact

Exemple

Exemple de CreateV2PageReact
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 id := "id_example" // string |
15 title := "title_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.CreateV2PageReact(context.Background(), tenantId).UrlId(urlId).Id(id).Title(title).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.CreateV2PageReact``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `CreateV2PageReact`: CreateV1PageReact
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateV2PageReact`: %v\n", resp)
26}
27

Supprimer une réaction de page V1 Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
urlIdstringqueryOui

Réponse

Retourne : CreateV1PageReact

Exemple

Exemple de DeleteV1PageReact
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.DeleteV1PageReact(context.Background(), tenantId).UrlId(urlId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.DeleteV1PageReact``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteV1PageReact`: CreateV1PageReact
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteV1PageReact`: %v\n", resp)
24}
25

Supprimer une réaction de page V2 Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringcheminOui
urlIdstringrequêteOui
idstringrequêteOui

Réponse

Retourne: CreateV1PageReact

Exemple

Exemple de DeleteV2PageReact
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 id := "id_example" // string |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.DeleteV2PageReact(context.Background(), tenantId).UrlId(urlId).Id(id).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.DeleteV2PageReact``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteV2PageReact` : CreateV1PageReact
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteV2PageReact`: %v\n", resp)
25}
26

Obtenir les likes V1 de la page Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathOui
urlIdstringqueryOui

Réponse

Renvoie: GetV1PageLikes

Exemple

Exemple de GetV1PageLikes
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.GetV1PageLikes(context.Background(), tenantId).UrlId(urlId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetV1PageLikes``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetV1PageLikes`: GetV1PageLikes
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetV1PageLikes`: %v\n", resp)
24}
25

Obtenir les réactions V2 de la page Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringcheminOui
urlIdstringrequêteOui

Réponse

Retourne: GetV2PageReacts

Exemple

Exemple de GetV2PageReacts
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.GetV2PageReacts(context.Background(), tenantId).UrlId(urlId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetV2PageReacts``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetV2PageReacts`: GetV2PageReacts
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetV2PageReacts`: %v\n", resp)
24}
25

Obtenir les utilisateurs ayant réagi V2 de la page Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringpathOui
urlIdstringqueryOui
idstringqueryOui

Réponse

Renvoie : GetV2PageReactUsersResponse

Exemple

Exemple de GetV2PageReactUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 id := "id_example" // string |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.GetV2PageReactUsers(context.Background(), tenantId).UrlId(urlId).Id(id).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetV2PageReactUsers``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetV2PageReactUsers`: GetV2PageReactUsersResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetV2PageReactUsers`: %v\n", resp)
25}
26

Ajouter une page Internal Link

Paramètres

NomTypeLocationRequisDescription
tenantIdstringqueryOui

Réponse

Retourne: AddPageAPIResponse

Exemple

Exemple AddPage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createAPIPageData := *openapiclient.NewCreateAPIPageData("Title_example", "Url_example", "UrlId_example") // CreateAPIPageData |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.AddPage(context.Background()).TenantId(tenantId).CreateAPIPageData(createAPIPageData).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AddPage``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `AddPage`: AddPageAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddPage`: %v\n", resp)
24}
25

Supprimer une page Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : DeletePageAPIResponse

Exemple

Exemple de DeletePage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeletePage(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeletePage``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeletePage` : DeletePageAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeletePage`: %v\n", resp)
24}
25

Obtenir les utilisateurs hors ligne Internal Link


Auteurs de commentaires précédents sur la page qui ne sont pas actuellement en ligne. Triés par displayName. Utilisez ceci après avoir épuisé /users/online pour afficher une section « Membres ». Pagination par curseur sur commenterName : le serveur parcourt l'index partiel {tenantId, urlId, commenterName} à partir de afterName vers l'avant via $gt, sans coût de $skip.

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathYes
urlIdstringqueryYesIdentifiant d'URL de la page (nettoyé côté serveur).
afterNamestringqueryNoCurseur : transmettre nextAfterName de la réponse précédente.
afterUserIdstringqueryNoDésambiguïsateur du curseur : transmettre nextAfterUserId de la réponse précédente. Requis lorsque afterName est défini afin que les égalités de nom n'entraînent pas la suppression d'entrées.

Réponse

Renvoie : PageUsersOfflineResponse

Exemple

Exemple GetOfflineUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string | Identifiant d'URL de la page (nettoyé côté serveur).
14 afterName := "afterName_example" // string | Curseur : transmettre nextAfterName de la réponse précédente. (optionnel)
15 afterUserId := "afterUserId_example" // string | Désambiguïsateur du curseur : transmettre nextAfterUserId de la réponse précédente. Requis lorsque afterName est défini afin que les égalités de nom n'entraînent pas la suppression d'entrées. (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.GetOfflineUsers(context.Background(), tenantId).UrlId(urlId).AfterName(afterName).AfterUserId(afterUserId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetOfflineUsers``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // response from `GetOfflineUsers`: PageUsersOfflineResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetOfflineUsers`: %v\n", resp)
26}
27

Obtenir les utilisateurs en ligne Internal Link

Visiteurs actuellement en ligne d'une page: personnes dont la session websocket est abonnée à la page en ce moment. Renvoie anonCount + totalCount (abonnés de la salle, y compris les visiteurs anonymes que nous n'énumérons pas).

Parameters

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
urlIdstringqueryOuiIdentificateur d'URL de la page (nettoyé côté serveur).
afterNamestringqueryNonCurseur : transmettre nextAfterName de la réponse précédente.
afterUserIdstringqueryNonDesempteur de curseur : transmettre nextAfterUserId de la réponse précédente. Requis lorsque afterName est défini afin que des égalités de nom n'entraînent pas la suppression d'entrées.

Réponse

Renvoie: PageUsersOnlineResponse

Exemple

Exemple GetOnlineUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string | Identificateur d'URL de la page (nettoyé côté serveur).
14 afterName := "afterName_example" // string | Curseur : transmettre nextAfterName de la réponse précédente. (optionnel)
15 afterUserId := "afterUserId_example" // string | Desempteur de curseur : transmettre nextAfterUserId de la réponse précédente. Requis lorsque afterName est défini afin que des égalités de nom n'entraînent pas la suppression d'entrées. (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.GetOnlineUsers(context.Background(), tenantId).UrlId(urlId).AfterName(afterName).AfterUserId(afterUserId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetOnlineUsers``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetOnlineUsers`: PageUsersOnlineResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetOnlineUsers`: %v\n", resp)
26}
27

Obtenir une page par URL/ID Internal Link


Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringparamètre de requêteOui
urlIdstringparamètre de requêteOui

Réponse

Renvoie : GetPageByURLIdAPIResponse

Exemple

Exemple pour GetPageByURLId
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetPageByURLId(context.Background()).TenantId(tenantId).UrlId(urlId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetPageByURLId``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetPageByURLId`: GetPageByURLIdAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPageByURLId`: %v\n", resp)
24}
25

Obtenir les pages Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui

Réponse

Retourne: GetPagesAPIResponse

Exemple

Exemple GetPages
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne |
13
14 configuration := openapiclient.NewConfiguration()
15 apiClient := openapiclient.NewAPIClient(configuration)
16 resp, r, err := apiClient.DefaultAPI.GetPages(context.Background()).TenantId(tenantId).Execute()
17 if err != nil {
18 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetPages``: %v\n", err)
19 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
20 }
21 // réponse de `GetPages` : GetPagesAPIResponse
22 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPages`: %v\n", resp)
23}
24

Obtenir les pages publiques Internal Link

Liste les pages pour un locataire. Utilisé par le client de bureau FChat pour remplir sa liste de salons. Nécessite enableFChat à true dans la configuration personnalisée résolue pour chaque page. Les pages nécessitant SSO sont filtrées en fonction des accès de groupe de l'utilisateur demandeur.

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringpathOui
cursorstringqueryNonCurseur de pagination opaque renvoyé comme nextCursor à partir d'une requête précédente. Lié au même sortBy.
limitintegerqueryNon1..200, par défaut 50
qstringqueryNonFiltre optionnel sur le préfixe du titre, insensible à la casse.
sortBystringqueryNonOrdre de tri. updatedAt (par défaut, les plus récents en premier), commentCount (les plus commentés en premier), ou title (alphabétique).
hasCommentsbooleanqueryNonSi true, ne retourner que les pages ayant au moins un commentaire.

Réponse

Renvoie: GetPublicPagesResponse

Exemple

Exemple GetPagesPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 cursor := "cursor_example" // string | Curseur opaque de pagination renvoyé comme `nextCursor` à partir d'une requête précédente. Lié au même `sortBy`. (optionnel)
14 limit := int32(56) // int32 | 1..200, par défaut 50 (optionnel)
15 q := "q_example" // string | Filtre optionnel sur le préfixe du titre, insensible à la casse. (optionnel)
16 sortBy := openapiclient.PagesSortBy("updatedAt") // PagesSortBy | Ordre de tri. `updatedAt` (par défaut, les plus récents en premier), `commentCount` (les plus commentés en premier), ou `title` (alphabétique). (optionnel)
17 hasComments := true // bool | Si true, ne retourner que les pages ayant au moins un commentaire. (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.GetPagesPublic(context.Background(), tenantId).Cursor(cursor).Limit(limit).Q(q).SortBy(sortBy).HasComments(hasComments).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetPagesPublic``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `GetPagesPublic`: GetPublicPagesResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetPagesPublic`: %v\n", resp)
28}
29

Obtenir les informations des utilisateurs Internal Link

Infos utilisateur en masse pour un locataire. Étant donné des userIds, renvoie les informations d’affichage depuis User / SSOUser. Utilisé par le widget de commentaires pour enrichir les utilisateurs qui viennent d’apparaître via un événement de présence. Pas de contexte de page : la confidentialité est appliquée de manière uniforme (les profils privés sont masqués).

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringpathOui
idsstringqueryOuiIdentifiants d'utilisateur délimités par des virgules.

Réponse

Renvoie : PageUsersInfoResponse

Exemple

Exemple GetUsersInfo
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 ids := "ids_example" // string | Identifiants d'utilisateur délimités par des virgules.
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.GetUsersInfo(context.Background(), tenantId).Ids(ids).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetUsersInfo``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUsersInfo` : PageUsersInfoResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUsersInfo`: %v\n", resp)
24}
25

Modifier partiellement une page Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne: PatchPageAPIResponse

Exemple

Exemple de PatchPage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateAPIPageData := *openapiclient.NewUpdateAPIPageData() // UpdateAPIPageData |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.PatchPage(context.Background(), id).TenantId(tenantId).UpdateAPIPageData(updateAPIPageData).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchPage``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `PatchPage` : PatchPageAPIResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchPage`: %v\n", resp)
25}
26

Supprimer un événement webhook en attente Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de DeletePendingWebhookEvent
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeletePendingWebhookEvent(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeletePendingWebhookEvent``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeletePendingWebhookEvent` : APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeletePendingWebhookEvent`: %v\n", resp)
24}
25

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

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
commentIdstringqueryNon
externalIdstringqueryNon
eventTypestringqueryNon
typestringqueryNon
domainstringqueryNon
attemptCountGTnumberqueryNon

Réponse

Renvoie : GetPendingWebhookEventCountResponse

Exemple

Exemple GetPendingWebhookEventCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string | (optionnel)
14 externalId := "externalId_example" // string | (optionnel)
15 eventType := "eventType_example" // string | (optionnel)
16 type_ := "type__example" // string | (optionnel)
17 domain := "domain_example" // string | (optionnel)
18 attemptCountGT := float64(1.2) // float64 | (optionnel)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.DefaultAPI.GetPendingWebhookEventCount(context.Background()).TenantId(tenantId).CommentId(commentId).ExternalId(externalId).EventType(eventType).Type_(type_).Domain(domain).AttemptCountGT(attemptCountGT).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetPendingWebhookEventCount``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `GetPendingWebhookEventCount` : GetPendingWebhookEventCountResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPendingWebhookEventCount`: %v\n", resp)
29}
30

Obtenir les événements webhook en attente Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
commentIdstringqueryNon
externalIdstringqueryNon
eventTypestringqueryNon
typestringqueryNon
domainstringqueryNon
attemptCountGTnumberqueryNon
skipnumberqueryNon

Réponse

Retourne: GetPendingWebhookEventsResponse

Exemple

Exemple GetPendingWebhookEvents
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string | (optionnel)
14 externalId := "externalId_example" // string | (optionnel)
15 eventType := "eventType_example" // string | (optionnel)
16 type_ := "type__example" // string | (optionnel)
17 domain := "domain_example" // string | (optionnel)
18 attemptCountGT := float64(1.2) // float64 | (optionnel)
19 skip := float64(1.2) // float64 | (optionnel)
20
21 configuration := openapiclient.NewConfiguration()
22 apiClient := openapiclient.NewAPIClient(configuration)
23 resp, r, err := apiClient.DefaultAPI.GetPendingWebhookEvents(context.Background()).TenantId(tenantId).CommentId(commentId).ExternalId(externalId).EventType(eventType).Type_(type_).Domain(domain).AttemptCountGT(attemptCountGT).Skip(skip).Execute()
24 if err != nil {
25 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetPendingWebhookEvents``: %v\n", err)
26 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
27 }
28 // réponse de `GetPendingWebhookEvents`: GetPendingWebhookEventsResponse
29 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPendingWebhookEvents`: %v\n", resp)
30}
31

Créer une configuration de question Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui

Réponse

Retourne : CreateQuestionConfigResponse

Exemple

Exemple de CreateQuestionConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createQuestionConfigBody := *openapiclient.NewCreateQuestionConfigBody("Name_example", "Question_example", "Type_example", float64(123)) // CreateQuestionConfigBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateQuestionConfig(context.Background()).TenantId(tenantId).CreateQuestionConfigBody(createQuestionConfigBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateQuestionConfig``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateQuestionConfig`: CreateQuestionConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateQuestionConfig`: %v\n", resp)
24}
25

Supprimer une configuration de question Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de DeleteQuestionConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteQuestionConfig(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteQuestionConfig``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteQuestionConfig` : APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteQuestionConfig`: %v\n", resp)
24}
25

Obtenir une configuration de question Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringrequêteOui
idstringcheminOui

Réponse

Renvoie : GetQuestionConfigResponse

Exemple

Exemple de GetQuestionConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetQuestionConfig(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetQuestionConfig``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetQuestionConfig`: GetQuestionConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionConfig`: %v\n", resp)
24}
25

Obtenir les configurations de question Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
skipnumberqueryNon

Réponse

Retourne: GetQuestionConfigsResponse

Exemple

Exemple de GetQuestionConfigs
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := float64(1.2) // float64 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetQuestionConfigs(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetQuestionConfigs``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetQuestionConfigs`: GetQuestionConfigsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionConfigs`: %v\n", resp)
24}
25

Mettre à jour une configuration de question Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple de UpdateQuestionConfig
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateQuestionConfigBody := *openapiclient.NewUpdateQuestionConfigBody() // UpdateQuestionConfigBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateQuestionConfig(context.Background(), id).TenantId(tenantId).UpdateQuestionConfigBody(updateQuestionConfigBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateQuestionConfig``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `UpdateQuestionConfig`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateQuestionConfig`: %v\n", resp)
25}
26

Créer un résultat de question Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui

Réponse

Renvoie : CreateQuestionResultResponse

Exemple

Exemple de CreateQuestionResult
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createQuestionResultBody := *openapiclient.NewCreateQuestionResultBody("UrlId_example", float64(123), "QuestionId_example") // CreateQuestionResultBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateQuestionResult(context.Background()).TenantId(tenantId).CreateQuestionResultBody(createQuestionResultBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateQuestionResult``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateQuestionResult` : CreateQuestionResultResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateQuestionResult`: %v\n", resp)
24}
25

Supprimer un résultat de question Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple de DeleteQuestionResult
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteQuestionResult(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteQuestionResult``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteQuestionResult`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteQuestionResult`: %v\n", resp)
24}
25

Obtenir un résultat de question Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne: GetQuestionResultResponse

Exemple

Exemple de GetQuestionResult
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetQuestionResult(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetQuestionResult``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetQuestionResult`: GetQuestionResultResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionResult`: %v\n", resp)
24}
25

Obtenir les résultats de question Internal Link


Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
urlIdstringqueryNon
userIdstringqueryNon
startDatestringqueryNon
questionIdstringqueryNon
questionIdsstringqueryNon
skipnumberqueryNon

Réponse

Renvoie: GetQuestionResultsResponse

Exemple

Exemple GetQuestionResults
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string | (facultatif)
14 userId := "userId_example" // string | (facultatif)
15 startDate := "startDate_example" // string | (facultatif)
16 questionId := "questionId_example" // string | (facultatif)
17 questionIds := "questionIds_example" // string | (facultatif)
18 skip := float64(1.2) // float64 | (facultatif)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.DefaultAPI.GetQuestionResults(context.Background()).TenantId(tenantId).UrlId(urlId).UserId(userId).StartDate(startDate).QuestionId(questionId).QuestionIds(questionIds).Skip(skip).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetQuestionResults``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `GetQuestionResults`: GetQuestionResultsResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionResults`: %v\n", resp)
29}
30

Mettre à jour un résultat de question Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de UpdateQuestionResult
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateQuestionResultBody := *openapiclient.NewUpdateQuestionResultBody() // UpdateQuestionResultBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateQuestionResult(context.Background(), id).TenantId(tenantId).UpdateQuestionResultBody(updateQuestionResultBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateQuestionResult``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `UpdateQuestionResult` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateQuestionResult`: %v\n", resp)
25}
26

Agréger les résultats des questions Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
questionIdstringqueryNon
questionIdsarrayqueryNon
urlIdstringqueryNon
timeBucketstringqueryNon
startDatestringqueryNon
forceRecalculatebooleanqueryNon

Réponse

Retourne : AggregateQuestionResultsResponse

Exemple

Exemple d'AggregateQuestionResults
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 "time"
9 openapiclient "github.com/fastcomments/fastcomments-go/client"
10)
11
12func main() {
13 tenantId := "tenantId_example" // string |
14 questionId := "questionId_example" // string | (optionnel)
15 questionIds := []string{"Inner_example"} // []string | (optionnel)
16 urlId := "urlId_example" // string | (optionnel)
17 timeBucket := openapiclient.AggregateTimeBucket("day") // AggregateTimeBucket | (optionnel)
18 startDate := time.Now() // time.Time | (optionnel)
19 forceRecalculate := true // bool | (optionnel)
20
21 configuration := openapiclient.NewConfiguration()
22 apiClient := openapiclient.NewAPIClient(configuration)
23 resp, r, err := apiClient.DefaultAPI.AggregateQuestionResults(context.Background()).TenantId(tenantId).QuestionId(questionId).QuestionIds(questionIds).UrlId(urlId).TimeBucket(timeBucket).StartDate(startDate).ForceRecalculate(forceRecalculate).Execute()
24 if err != nil {
25 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AggregateQuestionResults``: %v\n", err)
26 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
27 }
28 // réponse de `AggregateQuestionResults`: AggregateQuestionResultsResponse
29 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AggregateQuestionResults`: %v\n", resp)
30}
31

Agrégation en masse des résultats des questions Internal Link


Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
forceRecalculatebooleanqueryNon

Réponse

Renvoie : BulkAggregateQuestionResultsResponse

Exemple

Exemple de BulkAggregateQuestionResults
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 bulkAggregateQuestionResultsRequest := *openapiclient.NewBulkAggregateQuestionResultsRequest([]openapiclient.BulkAggregateQuestionItem{*openapiclient.NewBulkAggregateQuestionItem("AggId_example")}) // BulkAggregateQuestionResultsRequest |
14 forceRecalculate := true // bool | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.BulkAggregateQuestionResults(context.Background()).TenantId(tenantId).BulkAggregateQuestionResultsRequest(bulkAggregateQuestionResultsRequest).ForceRecalculate(forceRecalculate).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.BulkAggregateQuestionResults``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // response from `BulkAggregateQuestionResults`: BulkAggregateQuestionResultsResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.BulkAggregateQuestionResults`: %v\n", resp)
25}
26

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

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
questionIdstringqueryNon
questionIdsarrayqueryNon
urlIdstringqueryNon
startDatestringqueryNon
forceRecalculatebooleanqueryNon
minValuenumberqueryNon
maxValuenumberqueryNon
limitnumberqueryNon

Réponse

Retourne: CombineQuestionResultsWithCommentsResponse

Exemple

Exemple de CombineCommentsWithQuestionResults
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 "time"
9 openapiclient "github.com/fastcomments/fastcomments-go/client"
10)
11
12func main() {
13 tenantId := "tenantId_example" // string |
14 questionId := "questionId_example" // string | (optionnel)
15 questionIds := []string{"Inner_example"} // []string | (optionnel)
16 urlId := "urlId_example" // string | (optionnel)
17 startDate := time.Now() // time.Time | (optionnel)
18 forceRecalculate := true // bool | (optionnel)
19 minValue := float64(1.2) // float64 | (optionnel)
20 maxValue := float64(1.2) // float64 | (optionnel)
21 limit := float64(1.2) // float64 | (optionnel)
22
23 configuration := openapiclient.NewConfiguration()
24 apiClient := openapiclient.NewAPIClient(configuration)
25 resp, r, err := apiClient.DefaultAPI.CombineCommentsWithQuestionResults(context.Background()).TenantId(tenantId).QuestionId(questionId).QuestionIds(questionIds).UrlId(urlId).StartDate(startDate).ForceRecalculate(forceRecalculate).MinValue(minValue).MaxValue(maxValue).Limit(limit).Execute()
26 if err != nil {
27 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CombineCommentsWithQuestionResults``: %v\n", err)
28 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
29 }
30 // réponse de `CombineCommentsWithQuestionResults`: CombineQuestionResultsWithCommentsResponse
31 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CombineCommentsWithQuestionResults`: %v\n", resp)
32}
33

Ajouter un utilisateur SSO Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui

Réponse

Retourne : AddSSOUserAPIResponse

Exemple

Exemple AddSSOUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createAPISSOUserData := *openapiclient.NewCreateAPISSOUserData("Email_example", "Username_example", "Id_example") // CreateAPISSOUserData |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.AddSSOUser(context.Background()).TenantId(tenantId).CreateAPISSOUserData(createAPISSOUserData).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AddSSOUser``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `AddSSOUser`: AddSSOUserAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddSSOUser`: %v\n", resp)
24}
25

Supprimer un utilisateur SSO Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
deleteCommentsbooleanqueryNon
commentDeleteModestringqueryNon

Réponse

Renvoie : DeleteSSOUserAPIResponse

Exemple

Exemple de DeleteSSOUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 deleteComments := true // bool | (optionnel)
15 commentDeleteMode := "commentDeleteMode_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.DeleteSSOUser(context.Background(), id).TenantId(tenantId).DeleteComments(deleteComments).CommentDeleteMode(commentDeleteMode).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteSSOUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `DeleteSSOUser` : DeleteSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteSSOUser`: %v\n", resp)
26}
27

Obtenir un utilisateur SSO par courriel Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
emailstringpathOui

Réponse

Renvoie: GetSSOUserByEmailAPIResponse

Exemple

Exemple GetSSOUserByEmail
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 email := "email_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetSSOUserByEmail(context.Background(), email).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetSSOUserByEmail``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetSSOUserByEmail`: GetSSOUserByEmailAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUserByEmail`: %v\n", resp)
24}
25

Obtenir un utilisateur SSO par ID Internal Link

Paramètres

NomTypeLocationRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne: GetSSOUserByIdAPIResponse

Exemple

Exemple de GetSSOUserById
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetSSOUserById(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetSSOUserById``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetSSOUserById`: GetSSOUserByIdAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUserById`: %v\n", resp)
24}
25

Obtenir les utilisateurs SSO Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
skipintegerqueryNon

Réponse

Retourne: GetSSOUsersResponse

Exemple

Exemple GetSSOUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := int32(56) // int32 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetSSOUsers(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetSSOUsers``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetSSOUsers` : GetSSOUsersResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUsers`: %v\n", resp)
24}
25

Modifier partiellement un utilisateur SSO Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
updateCommentsbooleanqueryNon

Réponse

Renvoie : PatchSSOUserAPIResponse

Exemple

Exemple de PatchSSOUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateAPISSOUserData := *openapiclient.NewUpdateAPISSOUserData() // UpdateAPISSOUserData |
15 updateComments := true // bool | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.PatchSSOUser(context.Background(), id).TenantId(tenantId).UpdateAPISSOUserData(updateAPISSOUserData).UpdateComments(updateComments).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchSSOUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PatchSSOUser`: PatchSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchSSOUser`: %v\n", resp)
26}
27

Remplacer un utilisateur SSO Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
updateCommentsbooleanqueryNon

Réponse

Retourne: PutSSOUserAPIResponse

Exemple

Exemple PutSSOUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateAPISSOUserData := *openapiclient.NewUpdateAPISSOUserData() // UpdateAPISSOUserData |
15 updateComments := true // bool | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.PutSSOUser(context.Background(), id).TenantId(tenantId).UpdateAPISSOUserData(updateAPISSOUserData).UpdateComments(updateComments).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PutSSOUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `PutSSOUser`: PutSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PutSSOUser`: %v\n", resp)
26}
27

Créer un abonnement Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui

Réponse

Renvoie : CreateSubscriptionAPIResponse

Exemple

Exemple de CreateSubscription
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createAPIUserSubscriptionData := *openapiclient.NewCreateAPIUserSubscriptionData("UrlId_example") // CreateAPIUserSubscriptionData |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateSubscription(context.Background()).TenantId(tenantId).CreateAPIUserSubscriptionData(createAPIUserSubscriptionData).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateSubscription``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateSubscription` : CreateSubscriptionAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateSubscription`: %v\n", resp)
24}
25

Supprimer un abonnement Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon

Réponse

Retourne: DeleteSubscriptionAPIResponse

Exemple

Exemple DeleteSubscription
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 userId := "userId_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.DeleteSubscription(context.Background(), id).TenantId(tenantId).UserId(userId).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteSubscription``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteSubscription` : DeleteSubscriptionAPIResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteSubscription`: %v\n", resp)
25}
26

Obtenir les abonnements Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
userIdstringqueryNon

Réponse

Retourne: GetSubscriptionsAPIResponse

Exemple

Exemple de GetSubscriptions
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetSubscriptions(context.Background()).TenantId(tenantId).UserId(userId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetSubscriptions``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetSubscriptions`: GetSubscriptionsAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSubscriptions`: %v\n", resp)
24}
25

Mettre à jour un abonnement Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon

Réponse

Retourne: UpdateSubscriptionAPIResponse

Exemple

Exemple UpdateSubscription
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateAPIUserSubscriptionData := *openapiclient.NewUpdateAPIUserSubscriptionData() // UpdateAPIUserSubscriptionData |
15 userId := "userId_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.UpdateSubscription(context.Background(), id).TenantId(tenantId).UpdateAPIUserSubscriptionData(updateAPIUserSubscriptionData).UserId(userId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateSubscription``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // response from `UpdateSubscription`: UpdateSubscriptionAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateSubscription`: %v\n", resp)
26}
27

Obtenir l'utilisation quotidienne du locataire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
yearNumbernumberqueryNon
monthNumbernumberqueryNon
dayNumbernumberqueryNon
skipnumberqueryNon

Réponse

Retourne: GetTenantDailyUsagesResponse

Exemple

Exemple de GetTenantDailyUsages
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 yearNumber := float64(1.2) // float64 | (facultatif)
14 monthNumber := float64(1.2) // float64 | (facultatif)
15 dayNumber := float64(1.2) // float64 | (facultatif)
16 skip := float64(1.2) // float64 | (facultatif)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.DefaultAPI.GetTenantDailyUsages(context.Background()).TenantId(tenantId).YearNumber(yearNumber).MonthNumber(monthNumber).DayNumber(dayNumber).Skip(skip).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenantDailyUsages``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `GetTenantDailyUsages`: GetTenantDailyUsagesResponse
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantDailyUsages`: %v\n", resp)
27}
28

Créer un forfait pour locataire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryYes

Réponse

Renvoie : CreateTenantPackageResponse

Exemple

Exemple de CreateTenantPackage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // chaîne |
13 createTenantPackageBody := *openapiclient.NewCreateTenantPackageBody("Name_example", float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), false, "ForWhoText_example", []string{"FeatureTaglines_example"}, false) // CreateTenantPackageBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateTenantPackage(context.Background()).TenantId(tenantId).CreateTenantPackageBody(createTenantPackageBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateTenantPackage``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateTenantPackage`: CreateTenantPackageResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTenantPackage`: %v\n", resp)
24}
25

Supprimer un forfait pour locataire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie: APIEmptyResponse

Exemple

Exemple d'utilisation de DeleteTenantPackage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteTenantPackage(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteTenantPackage``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteTenantPackage`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteTenantPackage`: %v\n", resp)
24}
25

Obtenir un forfait pour locataire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringrequêteOui
idstringcheminOui

Réponse

Renvoie : GetTenantPackageResponse

Exemple

Exemple de GetTenantPackage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetTenantPackage(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenantPackage``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetTenantPackage`: GetTenantPackageResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantPackage`: %v\n", resp)
24}
25

Obtenir les forfaits du locataire Internal Link


Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
skipnumberqueryNon

Réponse

Retourne: GetTenantPackagesResponse

Exemple

Exemple de GetTenantPackages
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := float64(1.2) // float64 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetTenantPackages(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenantPackages``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetTenantPackages`: GetTenantPackagesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantPackages`: %v\n", resp)
24}
25

Remplacer un forfait du locataire Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de ReplaceTenantPackage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 replaceTenantPackageBody := *openapiclient.NewReplaceTenantPackageBody("Name_example", float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), float64(123), false, "ForWhoText_example", []string{"FeatureTaglines_example"}, false) // ReplaceTenantPackageBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.ReplaceTenantPackage(context.Background(), id).TenantId(tenantId).ReplaceTenantPackageBody(replaceTenantPackageBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ReplaceTenantPackage``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `ReplaceTenantPackage` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ReplaceTenantPackage`: %v\n", resp)
25}
26

Mettre à jour un forfait du locataire Internal Link

Parameters

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple de UpdateTenantPackage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateTenantPackageBody := *openapiclient.NewUpdateTenantPackageBody() // UpdateTenantPackageBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateTenantPackage(context.Background(), id).TenantId(tenantId).UpdateTenantPackageBody(updateTenantPackageBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateTenantPackage``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `UpdateTenantPackage`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateTenantPackage`: %v\n", resp)
25}
26

Créer un utilisateur du locataire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui

Réponse

Renvoie: CreateTenantUserResponse

Exemple

Exemple de CreateTenantUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createTenantUserBody := *openapiclient.NewCreateTenantUserBody("Username_example", "Email_example") // CreateTenantUserBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateTenantUser(context.Background()).TenantId(tenantId).CreateTenantUserBody(createTenantUserBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateTenantUser``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // response from `CreateTenantUser`: CreateTenantUserResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTenantUser`: %v\n", resp)
24}
25

Supprimer un utilisateur du locataire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
deleteCommentsstringqueryNon
commentDeleteModestringqueryNon

Réponse

Retourne: APIEmptyResponse

Exemple

Exemple de DeleteTenantUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 deleteComments := "deleteComments_example" // string | (optionnel)
15 commentDeleteMode := "commentDeleteMode_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.DeleteTenantUser(context.Background(), id).TenantId(tenantId).DeleteComments(deleteComments).CommentDeleteMode(commentDeleteMode).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteTenantUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `DeleteTenantUser`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteTenantUser`: %v\n", resp)
26}
27

Obtenir un utilisateur du locataire Internal Link


Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Retourne : GetTenantUserResponse

Exemple

Exemple de GetTenantUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetTenantUser(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenantUser``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetTenantUser`: GetTenantUserResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantUser`: %v\n", resp)
24}
25

Obtenir les utilisateurs du locataire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
skipnumberqueryNon

Réponse

Renvoie: GetTenantUsersResponse

Exemple

Exemple GetTenantUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := float64(1.2) // float64 | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetTenantUsers(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenantUsers``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetTenantUsers`: GetTenantUsersResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantUsers`: %v\n", resp)
24}
25

Remplacer un utilisateur du locataire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
updateCommentsstringqueryNon

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple ReplaceTenantUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 replaceTenantUserBody := *openapiclient.NewReplaceTenantUserBody("Username_example", "Email_example") // ReplaceTenantUserBody |
15 updateComments := "updateComments_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.ReplaceTenantUser(context.Background(), id).TenantId(tenantId).ReplaceTenantUserBody(replaceTenantUserBody).UpdateComments(updateComments).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ReplaceTenantUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `ReplaceTenantUser`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ReplaceTenantUser`: %v\n", resp)
26}
27

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui
redirectURLstringqueryNon

Réponse

Retourne : APIEmptyResponse

Exemple

Exemple SendLoginLink
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 redirectURL := "redirectURL_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.SendLoginLink(context.Background(), id).TenantId(tenantId).RedirectURL(redirectURL).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.SendLoginLink``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `SendLoginLink` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SendLoginLink`: %v\n", resp)
25}
26

Mettre à jour un utilisateur du locataire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
updateCommentsstringqueryNon

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple UpdateTenantUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateTenantUserBody := *openapiclient.NewUpdateTenantUserBody() // UpdateTenantUserBody |
15 updateComments := "updateComments_example" // string | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.UpdateTenantUser(context.Background(), id).TenantId(tenantId).UpdateTenantUserBody(updateTenantUserBody).UpdateComments(updateComments).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateTenantUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UpdateTenantUser`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateTenantUser`: %v\n", resp)
26}
27

Créer un locataire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringrequêteOui

Réponse

Retourne: CreateTenantResponse

Exemple

Exemple de CreateTenant
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 "time"
9 openapiclient "github.com/fastcomments/fastcomments-go/client"
10)
11
12func main() {
13 tenantId := "tenantId_example" // string |
14 createTenantBody := *openapiclient.NewCreateTenantBody("Name_example", []openapiclient.APIDomainConfiguration{*openapiclient.NewAPIDomainConfiguration("Id_example", "Domain_example", time.Now())}) // CreateTenantBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.CreateTenant(context.Background()).TenantId(tenantId).CreateTenantBody(createTenantBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateTenant``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `CreateTenant`: CreateTenantResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTenant`: %v\n", resp)
25}
26

Supprimer un locataire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringrequêteOui
idstringcheminOui
surestringrequêteNon

Réponse

Retourne: APIEmptyResponse

Exemple

Exemple de DeleteTenant
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 sure := "sure_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.DeleteTenant(context.Background(), id).TenantId(tenantId).Sure(sure).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteTenant``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteTenant`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteTenant`: %v\n", resp)
25}
26

Obtenir un locataire Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie: GetTenantResponse

Exemple

Exemple de GetTenant
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetTenant(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenant``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetTenant` : GetTenantResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenant`: %v\n", resp)
24}
25

Obtenir les locataires Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
metastringqueryNon
skipnumberqueryNon

Réponse

Renvoie: GetTenantsResponse

Exemple

Exemple de GetTenants
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 meta := "meta_example" // string | (optionnel)
14 skip := float64(1.2) // float64 | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.GetTenants(context.Background()).TenantId(tenantId).Meta(meta).Skip(skip).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTenants``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetTenants`: GetTenantsResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenants`: %v\n", resp)
25}
26

Mettre à jour un locataire Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIEmptyResponse

Exemple

Exemple de UpdateTenant
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateTenantBody := *openapiclient.NewUpdateTenantBody() // UpdateTenantBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateTenant(context.Background(), id).TenantId(tenantId).UpdateTenantBody(updateTenantBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateTenant``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `UpdateTenant` : APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateTenant`: %v\n", resp)
25}
26

Changer l'état d'un ticket Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
userIdstringqueryOui
idstringpathOui

Réponse

Renvoie : ChangeTicketStateResponse

Exemple

Exemple de ChangeTicketState
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string |
14 id := "id_example" // string |
15 changeTicketStateBody := *openapiclient.NewChangeTicketStateBody(int32(123)) // ChangeTicketStateBody |
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.ChangeTicketState(context.Background(), id).TenantId(tenantId).UserId(userId).ChangeTicketStateBody(changeTicketStateBody).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ChangeTicketState``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `ChangeTicketState` : ChangeTicketStateResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ChangeTicketState`: %v\n", resp)
26}
27

Créer un ticket Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
userIdstringqueryOui

Réponse

Renvoie : CreateTicketResponse

Exemple

Exemple de CreateTicket
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string |
14 createTicketBody := *openapiclient.NewCreateTicketBody("Subject_example") // CreateTicketBody |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.CreateTicket(context.Background()).TenantId(tenantId).UserId(userId).CreateTicketBody(createTicketBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateTicket``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `CreateTicket`: CreateTicketResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTicket`: %v\n", resp)
25}
26

Obtenir un ticket Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui
userIdstringqueryNon

Réponse

Renvoie : GetTicketResponse

Exemple

Exemple de GetTicket
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 userId := "userId_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.GetTicket(context.Background(), id).TenantId(tenantId).UserId(userId).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTicket``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // response from `GetTicket`: GetTicketResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTicket`: %v\n", resp)
25}
26

Obtenir les tickets Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryYes
userIdstringqueryNo
statenumberqueryNo
skipnumberqueryNo
limitnumberqueryNo

Réponse

Retourne : GetTicketsResponse

Exemple

Exemple GetTickets
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (optionnel)
14 state := float64(1.2) // float64 | (optionnel)
15 skip := float64(1.2) // float64 | (optionnel)
16 limit := float64(1.2) // float64 | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.DefaultAPI.GetTickets(context.Background()).TenantId(tenantId).UserId(userId).State(state).Skip(skip).Limit(limit).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetTickets``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `GetTickets`: GetTicketsResponse
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTickets`: %v\n", resp)
27}
28

Obtenir les traductions Internal Link

Paramètres

NameTypeLocationRequiredDescription
namespacestringpathOui
componentstringpathOui
localestringqueryNon
useFullTranslationIdsbooleanqueryNon

Réponse

Retourne : GetTranslationsResponse

Exemple

Exemple de GetTranslations
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 namespace := "namespace_example" // string |
13 component := "component_example" // string |
14 locale := "locale_example" // string | (optionnel)
15 useFullTranslationIds := true // bool | (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.GetTranslations(context.Background(), namespace, component).Locale(locale).UseFullTranslationIds(useFullTranslationIds).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetTranslations``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetTranslations` : GetTranslationsResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetTranslations`: %v\n", resp)
26}
27

Téléverser une image Internal Link


Téléverser et redimensionner une image

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringpathYes
sizePresetstringqueryNoPréréglage de taille : "Default" (1000x1000px) ou "CrossPlatform" (crée des tailles pour les appareils populaires)
urlIdstringqueryNoID de la page à partir de laquelle le téléversement est effectué, pour la configuration

Réponse

Renvoie : UploadImageResponse

Exemple

Exemple UploadImage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 file := os.NewFile(1234, "some_file") // *os.File |
14 sizePreset := openapiclient.SizePreset("Default") // SizePreset | Préréglage de taille : \"Default\" (1000x1000px) ou \"CrossPlatform\" (crée des tailles pour les appareils populaires) (optionnel)
15 urlId := "urlId_example" // string | ID de la page à partir de laquelle le téléversement est effectué, pour la configuration (optionnel)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.UploadImage(context.Background(), tenantId).File(file).SizePreset(sizePreset).UrlId(urlId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UploadImage``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UploadImage`: UploadImageResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UploadImage`: %v\n", resp)
26}
27

Obtenir la progression du badge utilisateur par ID Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : APIGetUserBadgeProgressResponse

Exemple

Exemple de GetUserBadgeProgressById
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetUserBadgeProgressById(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUserBadgeProgressById``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUserBadgeProgressById` : APIGetUserBadgeProgressResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadgeProgressById`: %v\n", resp)
24}
25

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

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
userIdstringpathOui

Réponse

Renvoie: APIGetUserBadgeProgressResponse

Exemple

Exemple GetUserBadgeProgressByUserId
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetUserBadgeProgressByUserId(context.Background(), userId).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUserBadgeProgressByUserId``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUserBadgeProgressByUserId`: APIGetUserBadgeProgressResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadgeProgressByUserId`: %v\n", resp)
24}
25

Obtenir la liste de progression des badges utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
userIdstringqueryNon
limitnumberqueryNon
skipnumberqueryNon

Réponse

Renvoie : APIGetUserBadgeProgressListResponse

Exemple

Exemple de GetUserBadgeProgressList
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (facultatif)
14 limit := float64(1.2) // float64 | (facultatif)
15 skip := float64(1.2) // float64 | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.GetUserBadgeProgressList(context.Background()).TenantId(tenantId).UserId(userId).Limit(limit).Skip(skip).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUserBadgeProgressList``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetUserBadgeProgressList`: APIGetUserBadgeProgressListResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadgeProgressList`: %v\n", resp)
26}
27

Créer un badge utilisateur Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui

Réponse

Renvoie : APICreateUserBadgeResponse

Exemple

Exemple de CreateUserBadge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 createUserBadgeParams := *openapiclient.NewCreateUserBadgeParams("UserId_example", "BadgeId_example") // CreateUserBadgeParams |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateUserBadge(context.Background()).TenantId(tenantId).CreateUserBadgeParams(createUserBadgeParams).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateUserBadge``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `CreateUserBadge`: APICreateUserBadgeResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateUserBadge`: %v\n", resp)
24}
25

Supprimer un badge utilisateur Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie: APIEmptySuccessResponse

Exemple

Exemple d'utilisation de DeleteUserBadge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.DeleteUserBadge(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteUserBadge``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `DeleteUserBadge` : APIEmptySuccessResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteUserBadge`: %v\n", resp)
24}
25

Obtenir un badge utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryYes
idstringpathYes

Réponse

Renvoie : APIGetUserBadgeResponse

Exemple

Exemple de GetUserBadge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetUserBadge(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUserBadge``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUserBadge` : APIGetUserBadgeResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadge`: %v\n", resp)
24}
25

Obtenir les badges utilisateur Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
userIdstringqueryNon
badgeIdstringqueryNon
typenumberqueryNon
displayedOnCommentsbooleanqueryNon
limitnumberqueryNon
skipnumberqueryNon

Réponse

Renvoie : APIGetUserBadgesResponse

Exemple

Exemple de GetUserBadges
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 userId := "userId_example" // string | (facultatif)
14 badgeId := "badgeId_example" // string | (facultatif)
15 type_ := float64(1.2) // float64 | (facultatif)
16 displayedOnComments := true // bool | (facultatif)
17 limit := float64(1.2) // float64 | (facultatif)
18 skip := float64(1.2) // float64 | (facultatif)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.DefaultAPI.GetUserBadges(context.Background()).TenantId(tenantId).UserId(userId).BadgeId(badgeId).Type_(type_).DisplayedOnComments(displayedOnComments).Limit(limit).Skip(skip).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUserBadges``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `GetUserBadges`: APIGetUserBadgesResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadges`: %v\n", resp)
29}
30

Mettre à jour un badge utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringrequêteOui
idstringcheminOui

Réponse

Renvoie : APIEmptySuccessResponse

Exemple

Exemple de UpdateUserBadge
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 updateUserBadgeParams := *openapiclient.NewUpdateUserBadgeParams() // UpdateUserBadgeParams |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.UpdateUserBadge(context.Background(), id).TenantId(tenantId).UpdateUserBadgeParams(updateUserBadgeParams).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.UpdateUserBadge``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `UpdateUserBadge` : APIEmptySuccessResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateUserBadge`: %v\n", resp)
25}
26

Obtenir le nombre de notifications d'un utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : GetUserNotificationCountResponse

Exemple

Exemple de GetUserNotificationCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 sso := "sso_example" // string | (facultatif)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.GetUserNotificationCount(context.Background()).TenantId(tenantId).Sso(sso).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetUserNotificationCount``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUserNotificationCount`: GetUserNotificationCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserNotificationCount`: %v\n", resp)
24}
25

Obtenir les notifications utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
urlIdstringqueryNonUtilisé pour déterminer si la page actuelle est abonnée.
pageSizeintegerqueryNon
afterIdstringqueryNon
includeContextbooleanqueryNon
afterCreatedAtintegerqueryNon
unreadOnlybooleanqueryNon
dmOnlybooleanqueryNon
noDmbooleanqueryNon
includeTranslationsbooleanqueryNon
includeTenantNotificationsbooleanqueryNon
ssostringqueryNon

Réponse

Retourne: GetMyNotificationsResponse

Exemple

Exemple de GetUserNotifications
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string | Utilisé pour déterminer si la page actuelle est abonnée. (optionnel)
14 pageSize := int32(56) // int32 | (optionnel)
15 afterId := "afterId_example" // string | (optionnel)
16 includeContext := true // bool | (optionnel)
17 afterCreatedAt := int64(789) // int64 | (optionnel)
18 unreadOnly := true // bool | (optionnel)
19 dmOnly := true // bool | (optionnel)
20 noDm := true // bool | (optionnel)
21 includeTranslations := true // bool | (optionnel)
22 includeTenantNotifications := true // bool | (optionnel)
23 sso := "sso_example" // string | (optionnel)
24
25 configuration := openapiclient.NewConfiguration()
26 apiClient := openapiclient.NewAPIClient(configuration)
27 resp, r, err := apiClient.PublicAPI.GetUserNotifications(context.Background()).TenantId(tenantId).UrlId(urlId).PageSize(pageSize).AfterId(afterId).IncludeContext(includeContext).AfterCreatedAt(afterCreatedAt).UnreadOnly(unreadOnly).DmOnly(dmOnly).NoDm(noDm).IncludeTranslations(includeTranslations).IncludeTenantNotifications(includeTenantNotifications).Sso(sso).Execute()
28 if err != nil {
29 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetUserNotifications``: %v\n", err)
30 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
31 }
32 // réponse de `GetUserNotifications` : GetMyNotificationsResponse
33 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserNotifications`: %v\n", resp)
34}
35

Réinitialiser le nombre de notifications d'un utilisateur Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : ResetUserNotificationsResponse

Exemple

Exemple de ResetUserNotificationCount
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 sso := "sso_example" // string | (optionnel)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.PublicAPI.ResetUserNotificationCount(context.Background()).TenantId(tenantId).Sso(sso).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ResetUserNotificationCount``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `ResetUserNotificationCount` : ResetUserNotificationsResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ResetUserNotificationCount`: %v\n", resp)
24}
25

Réinitialiser les notifications d'un utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
afterIdstringqueryNon
afterCreatedAtintegerqueryNon
unreadOnlybooleanqueryNon
dmOnlybooleanqueryNon
noDmbooleanqueryNon
ssostringqueryNon

Réponse

Renvoie : ResetUserNotificationsResponse

Exemple

Exemple ResetUserNotifications
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 afterId := "afterId_example" // string | (optionnel)
14 afterCreatedAt := int64(789) // int64 | (optionnel)
15 unreadOnly := true // bool | (optionnel)
16 dmOnly := true // bool | (optionnel)
17 noDm := true // bool | (optionnel)
18 sso := "sso_example" // string | (optionnel)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.PublicAPI.ResetUserNotifications(context.Background()).TenantId(tenantId).AfterId(afterId).AfterCreatedAt(afterCreatedAt).UnreadOnly(unreadOnly).DmOnly(dmOnly).NoDm(noDm).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.ResetUserNotifications``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // réponse de `ResetUserNotifications`: ResetUserNotificationsResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ResetUserNotifications`: %v\n", resp)
29}
30

Mettre à jour le statut d'abonnement aux commentaires pour les notifications utilisateur Internal Link


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

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
notificationIdstringpathOui
optedInOrOutstringpathOui
commentIdstringqueryOui
ssostringqueryNon

Réponse

Renvoie : UpdateUserNotificationCommentSubscriptionStatusResponse

Exemple

Exemple de UpdateUserNotificationCommentSubscriptionStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 notificationId := "notificationId_example" // string |
14 optedInOrOut := "optedInOrOut_example" // string |
15 commentId := "commentId_example" // string |
16 sso := "sso_example" // string | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.UpdateUserNotificationCommentSubscriptionStatus(context.Background(), notificationId, optedInOrOut).TenantId(tenantId).CommentId(commentId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UpdateUserNotificationCommentSubscriptionStatus``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // response from `UpdateUserNotificationCommentSubscriptionStatus`: UpdateUserNotificationCommentSubscriptionStatusResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateUserNotificationCommentSubscriptionStatus`: %v\n", resp)
27}
28

Mettre à jour le statut d'abonnement aux pages pour les notifications utilisateur Internal Link

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

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
urlIdstringqueryOui
urlstringqueryOui
pageTitlestringqueryOui
subscribedOrUnsubscribedstringpathOui
ssostringqueryNon

Réponse

Renvoie : UpdateUserNotificationPageSubscriptionStatusResponse

Exemple

Exemple UpdateUserNotificationPageSubscriptionStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 url := "url_example" // string |
15 pageTitle := "pageTitle_example" // string |
16 subscribedOrUnsubscribed := "subscribedOrUnsubscribed_example" // string |
17 sso := "sso_example" // string | (optionnel)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.UpdateUserNotificationPageSubscriptionStatus(context.Background(), subscribedOrUnsubscribed).TenantId(tenantId).UrlId(urlId).Url(url).PageTitle(pageTitle).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UpdateUserNotificationPageSubscriptionStatus``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `UpdateUserNotificationPageSubscriptionStatus`: UpdateUserNotificationPageSubscriptionStatusResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateUserNotificationPageSubscriptionStatus`: %v\n", resp)
28}
29

Mettre à jour le statut d'une notification utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
notificationIdstringpathOui
newStatusstringpathOui
ssostringqueryNon

Réponse

Renvoie : UpdateUserNotificationStatusResponse

Exemple

Exemple de UpdateUserNotificationStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 notificationId := "notificationId_example" // string |
14 newStatus := "newStatus_example" // string |
15 sso := "sso_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.UpdateUserNotificationStatus(context.Background(), notificationId, newStatus).TenantId(tenantId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UpdateUserNotificationStatus``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `UpdateUserNotificationStatus` : UpdateUserNotificationStatusResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateUserNotificationStatus`: %v\n", resp)
26}
27

Obtenir les statuts de présence utilisateur Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
urlIdWSstringqueryYes
userIdsstringqueryYes

Réponse

Renvoie : GetUserPresenceStatusesResponse

Exemple

Exemple de GetUserPresenceStatuses
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlIdWS := "urlIdWS_example" // string |
14 userIds := "userIds_example" // string |
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.GetUserPresenceStatuses(context.Background()).TenantId(tenantId).UrlIdWS(urlIdWS).UserIds(userIds).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetUserPresenceStatuses``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `GetUserPresenceStatuses` : GetUserPresenceStatusesResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserPresenceStatuses`: %v\n", resp)
25}
26

Rechercher des utilisateurs Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringcheminOui
urlIdstringrequêteOui
usernameStartsWithstringrequêteNon
mentionGroupIdsarrayrequêteNon
ssostringrequêteNon
searchSectionstringrequêteNon

Réponse

Renvoie : SearchUsersResult

Exemple

Exemple SearchUsers
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 usernameStartsWith := "usernameStartsWith_example" // string | (facultatif)
15 mentionGroupIds := []string{"Inner_example"} // []string | (facultatif)
16 sso := "sso_example" // string | (facultatif)
17 searchSection := "searchSection_example" // string | (facultatif)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.SearchUsers(context.Background(), tenantId).UrlId(urlId).UsernameStartsWith(usernameStartsWith).MentionGroupIds(mentionGroupIds).Sso(sso).SearchSection(searchSection).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.SearchUsers``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // réponse de `SearchUsers` : SearchUsersResult
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.SearchUsers`: %v\n", resp)
28}
29

Obtenir un utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui

Réponse

Renvoie : GetUserResponse

Exemple

Exemple de GetUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetUser(context.Background(), id).TenantId(tenantId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUser``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetUser`: GetUserResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUser`: %v\n", resp)
24}
25

Créer un vote Internal Link

Paramètres

NomTypeEmplacementObligatoireDescription
tenantIdstringqueryOui
commentIdstringqueryOui
directionstringqueryOui
userIdstringqueryNon
anonUserIdstringqueryNon

Renvoie

Renvoie: VoteResponse

Exemple

Exemple de CreateVote
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 direction := "direction_example" // string |
15 userId := "userId_example" // string | (optionnel)
16 anonUserId := "anonUserId_example" // string | (optionnel)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.DefaultAPI.CreateVote(context.Background()).TenantId(tenantId).CommentId(commentId).Direction(direction).UserId(userId).AnonUserId(anonUserId).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // réponse de `CreateVote`: VoteResponse
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateVote`: %v\n", resp)
27}
28

Supprimer un vote Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
idstringpathOui
editKeystringqueryNon

Réponse

Renvoie : VoteDeleteResponse

Exemple

Exemple DeleteVote
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 id := "id_example" // string |
14 editKey := "editKey_example" // string | (optionnel)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.DeleteVote(context.Background(), id).TenantId(tenantId).EditKey(editKey).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteVote``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // réponse de `DeleteVote`: VoteDeleteResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteVote`: %v\n", resp)
25}
26

Obtenir les votes Internal Link

Paramètres

NameTypeLocationRequiredDescription
tenantIdstringqueryOui
urlIdstringqueryOui

Réponse

Renvoie: GetVotesResponse

Exemple

Exemple de GetVotes
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetVotes(context.Background()).TenantId(tenantId).UrlId(urlId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetVotes``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // réponse de `GetVotes` : GetVotesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetVotes`: %v\n", resp)
24}
25

Obtenir les votes pour un utilisateur Internal Link

Paramètres

NomTypeEmplacementRequisDescription
tenantIdstringqueryOui
urlIdstringqueryOui
userIdstringqueryNon
anonUserIdstringqueryNon

Réponse

Renvoie: GetVotesForUserResponse

Exemple

Exemple de GetVotesForUser
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string |
14 userId := "userId_example" // string | (facultatif)
15 anonUserId := "anonUserId_example" // string | (facultatif)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.DefaultAPI.GetVotesForUser(context.Background()).TenantId(tenantId).UrlId(urlId).UserId(userId).AnonUserId(anonUserId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetVotesForUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // réponse de `GetVotesForUser` : GetVotesForUserResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetVotesForUser`: %v\n", resp)
26}
27

Besoin d'aide ?

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

Contribuer

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