FastComments.com

FastComments SDK для Go


Це офіційний Go SDK для FastComments.

Офіційний Go SDK для FastComments API

Репозиторій

Переглянути на GitHub


Встановлення Internal Link

go get github.com/fastcomments/fastcomments-go

Використання клієнта API

Публічний API (без автентифікації)

PublicAPI дозволяє доступ без автентифікації до публічних кінцевих точок:

package main

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

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

    // Отримати коментарі за допомогою PublicAPI
    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 (вимагає API ключа)

DefaultAPI вимагає автентифікації за допомогою вашого API ключа:

package main

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

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

    // Створити автентифікований контекст за допомогою API ключа
    auth := context.WithValue(
        context.Background(),
        client.ContextAPIKeys,
        map[string]client.APIKey{
            "api_key": {Key: "your-api-key-here"},
        },
    )

    // Отримати коментарі за допомогою автентифікованого DefaultAPI
    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 (панель модератора)

ModerationAPI надає широке набор живих та швидких модераційних API. Усі методи модерації приймають параметр sso і можуть автентифікуватися через SSO або сесійну cookie FastComments.com:

package main

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

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

    // Перелічити коментарі для модерації за допомогою ModerationAPI
    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)
}

Використання Internal Link


Простий SSO

package main

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

func main() {
    // Створення токена простого SSO
    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)

    // Використайте SSO токен для виконання автентифікованого виклику API
    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

package main

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

func main() {
    // Створення токена захищеного SSO
    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)

    // Використайте SSO токен для виконання автентифікованого виклику API
    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)
}

Агрегація Internal Link

Агрегує документи, групуючи їх (якщо надано groupBy) та застосовуючи кілька операцій. Підтримуються різні операції (наприклад sum, countDistinct, avg тощо).

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
parentTenantIdstringqueryНі
includeStatsbooleanqueryНі

Відповідь

Повертає: AggregateResponse

Приклад

Приклад агрегації
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 | (необов'язково)
15 includeStats := true // bool | (необов'язково)
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 // відповідь від `Aggregate`: AggregateResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.Aggregate`: %v\n", resp)
26}
27

Отримати журнали аудиту Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
limitnumberqueryНі
skipnumberqueryНі
orderstringqueryНі
afternumberqueryНі
beforenumberqueryНі

Відповідь

Повертає: GetAuditLogsResponse

Приклад

Приклад 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 | (необов'язково)
14 skip := float64(1.2) // float64 | (необов'язково)
15 order := openapiclient.SORT_DIR("ASC") // SORTDIR | (необов'язково)
16 after := float64(1.2) // float64 | (необов'язково)
17 before := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetAuditLogs`: GetAuditLogsResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetAuditLogs`: %v\n", resp)
28}
29

Вихід (публічно) Internal Link

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `LogoutPublic`: APIEmptyResponse
21 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.LogoutPublic`: %v\n", resp)
22}
23

Заблокувати за коментарем (публічно) Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
commentIdstringpathТак
ssostringqueryНі

Відповідь

Повертає: BlockSuccess

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `BlockFromCommentPublic`: BlockSuccess
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.BlockFromCommentPublic`: %v\n", resp)
26}
27

Розблокувати коментар (публічно) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
commentIdstringpathТак
ssostringqueryНі

Відповідь

Повертає: UnblockSuccess

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UnBlockCommentPublic`: UnblockSuccess
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UnBlockCommentPublic`: %v\n", resp)
26}
27

Перевірка заблокованих коментарів Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
commentIdsstringqueryТакСписок ідентифікаторів коментарів, розділених комами.
ssostringqueryНі

Відповідь

Повертає: CheckBlockedCommentsResponse

Приклад

Приклад 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 | Список ідентифікаторів коментарів, розділених комами.
14 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `CheckedCommentsForBlocked`: CheckBlockedCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CheckedCommentsForBlocked`: %v\n", resp)
25}
26

Заблокувати користувача за коментарем Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі
anonUserIdstringqueryНі

Відповідь

Повертає: BlockSuccess

Приклад

Приклад 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 | (необов'язково)
16 anonUserId := "anonUserId_example" // string | (необов'язково)
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 // відповідь від `BlockUserFromComment`: BlockSuccess
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.BlockUserFromComment`: %v\n", resp)
27}
28

Створити коментар (публічно) Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
urlIdstringqueryТак
broadcastIdstringqueryТак
sessionIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: SaveCommentsResponseWithPresence

Приклад

Приклад 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 | (необов'язково)
17 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `CreateCommentPublic`: SaveCommentsResponseWithPresence
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateCommentPublic`: %v\n", resp)
28}
29

Видалити коментар Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак
contextUserIdstringqueryНі
isLivebooleanqueryНі

Відповідь

Повертає: DeleteCommentResult

Приклад

Приклад 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 | (необов'язково)
15 isLive := true // bool | (необов'язково)
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 // відповідь від `DeleteComment`: DeleteCommentResult
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteComment`: %v\n", resp)
26}
27

Видалити коментар (публічно) Internal Link

Parameters

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringpathТак
commentIdstringpathТак
broadcastIdstringqueryТак
editKeystringqueryНі
ssostringqueryНі

Response

Повертає: PublicAPIDeleteCommentResponse

Приклад

Приклад 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 | (необов'язково)
16 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `DeleteCommentPublic`: PublicAPIDeleteCommentResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteCommentPublic`: %v\n", resp)
27}
28

Видалити голос за коментар Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringpathТак
commentIdstringpathТак
voteIdstringpathТак
urlIdstringqueryТак
broadcastIdstringqueryТак
editKeystringqueryНі
ssostringqueryНі

Відповідь

Повертає: VoteDeleteResponse

Приклад

Приклад 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 | (необов'язково)
18 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `DeleteCommentVote`: VoteDeleteResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteCommentVote`: %v\n", resp)
29}
30

Поскаржитися на коментар Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі
anonUserIdstringqueryНі

Відповідь

Повертає: FlagCommentResponse

Приклад

Приклад 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 | (необов'язково)
15 anonUserId := "anonUserId_example" // string | (необов'язково)
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 // відповідь від `FlagComment`: FlagCommentResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.FlagComment`: %v\n", resp)
26}
27

Отримати коментар Internal Link


Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIGetCommentResponse

Приклад

Приклад 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 // відповідь від `GetComment`: APIGetCommentResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetComment`: %v\n", resp)
24}
25

Отримати коментарі Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
pageintegerqueryНі
limitintegerqueryНі
skipintegerqueryНі
asTreebooleanqueryНі
skipChildrenintegerqueryНі
limitChildrenintegerqueryНі
maxTreeDepthintegerqueryНі
urlIdstringqueryНі
userIdstringqueryНі
anonUserIdstringqueryНі
contextUserIdstringqueryНі
hashTagstringqueryНі
parentIdstringqueryНі
directionstringqueryНі
fromDateintegerqueryНі
toDateintegerqueryНі

Відповідь

Повертає: APIGetCommentsResponse

Приклад

Приклад 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 | (необов'язково)
14 limit := int32(56) // int32 | (необов'язково)
15 skip := int32(56) // int32 | (необов'язково)
16 asTree := true // bool | (необов'язково)
17 skipChildren := int32(56) // int32 | (необов'язково)
18 limitChildren := int32(56) // int32 | (необов'язково)
19 maxTreeDepth := int32(56) // int32 | (необов'язково)
20 urlId := "urlId_example" // string | (необов'язково)
21 userId := "userId_example" // string | (необов'язково)
22 anonUserId := "anonUserId_example" // string | (необов'язково)
23 contextUserId := "contextUserId_example" // string | (необов'язково)
24 hashTag := "hashTag_example" // string | (необов'язково)
25 parentId := "parentId_example" // string | (необов'язково)
26 direction := openapiclient.SortDirections("OF") // SortDirections | (необов'язково)
27 fromDate := int64(789) // int64 | (необов'язково)
28 toDate := int64(789) // int64 | (необов'язково)
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 // відповідь від `GetComments`: APIGetCommentsResponse
38 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetComments`: %v\n", resp)
39}
40

Отримати коментарі (публічно) Internal Link

обов'язкові tenantId urlId

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
urlIdstringqueryТак
pageintegerqueryНі
directionstringqueryНі
ssostringqueryНі
skipintegerqueryНі
skipChildrenintegerqueryНі
limitintegerqueryНі
limitChildrenintegerqueryНі
countChildrenbooleanqueryНі
fetchPageForCommentIdstringqueryНі
includeConfigbooleanqueryНі
countAllbooleanqueryНі
includei10nbooleanqueryНі
localestringqueryНі
modulesstringqueryНі
isCrawlerbooleanqueryНі
includeNotificationCountbooleanqueryНі
asTreebooleanqueryНі
maxTreeDepthintegerqueryНі
useFullTranslationIdsbooleanqueryНі
parentIdstringqueryНі
searchTextstringqueryНі
hashTagsarrayqueryНі
userIdstringqueryНі
customConfigStrstringqueryНі
afterCommentIdstringqueryНі
beforeCommentIdstringqueryНі

Відповідь

Повертає: GetCommentsResponseWithPresencePublicComment

Приклад

Приклад 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 | (необов'язково)
15 direction := openapiclient.SortDirections("OF") // SortDirections | (необов'язково)
16 sso := "sso_example" // string | (необов'язково)
17 skip := int32(56) // int32 | (необов'язково)
18 skipChildren := int32(56) // int32 | (необов'язково)
19 limit := int32(56) // int32 | (необов'язково)
20 limitChildren := int32(56) // int32 | (необов'язково)
21 countChildren := true // bool | (необов'язково)
22 fetchPageForCommentId := "fetchPageForCommentId_example" // string | (необов'язково)
23 includeConfig := true // bool | (необов'язково)
24 countAll := true // bool | (необов'язково)
25 includei10n := true // bool | (необов'язково)
26 locale := "locale_example" // string | (необов'язково)
27 modules := "modules_example" // string | (необов'язково)
28 isCrawler := true // bool | (необов'язково)
29 includeNotificationCount := true // bool | (необов'язково)
30 asTree := true // bool | (необов'язково)
31 maxTreeDepth := int32(56) // int32 | (необов'язково)
32 useFullTranslationIds := true // bool | (необов'язково)
33 parentId := "parentId_example" // string | (необов'язково)
34 searchText := "searchText_example" // string | (необов'язково)
35 hashTags := []string{"Inner_example"} // []string | (необов'язково)
36 userId := "userId_example" // string | (необов'язково)
37 customConfigStr := "customConfigStr_example" // string | (необов'язково)
38 afterCommentId := "afterCommentId_example" // string | (необов'язково)
39 beforeCommentId := "beforeCommentId_example" // string | (необов'язково)
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 // відповідь від `GetCommentsPublic`: GetCommentsResponseWithPresencePublicComment
49 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentsPublic`: %v\n", resp)
50}
51

Отримати текст коментаря Internal Link

Параметри

NameТипLocationОбов'язковоОпис
tenantIdstringpathТак
commentIdstringpathТак
editKeystringqueryНі
ssostringqueryНі

Відповідь

Повертає: PublicAPIGetCommentTextResponse

Приклад

Приклад 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 | (необов'язково)
15 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `GetCommentText`: PublicAPIGetCommentTextResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentText`: %v\n", resp)
26}
27

Отримати імена користувачів, які голосували за коментар Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringpathТак
commentIdstringpathТак
dirintegerqueryТак
ssostringqueryНі

Відповідь

Повертає: GetCommentVoteUserNamesSuccessResponse

Приклад

Приклад 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 | (необов'язковий)
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 // відповідь від `GetCommentVoteUserNames`: GetCommentVoteUserNamesSuccessResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentVoteUserNames`: %v\n", resp)
26}
27

Заблокувати коментар Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
commentIdstringpathТак
broadcastIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `LockComment`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.LockComment`: %v\n", resp)
26}
27

Закріпити коментар Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

Відповідь

Повертає: ChangeCommentPinStatusResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `PinComment`: ChangeCommentPinStatusResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.PinComment`: %v\n", resp)
26}
27

Зберегти коментар Internal Link


Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
isLivebooleanqueryНі
doSpamCheckbooleanqueryНі
sendEmailsbooleanqueryНі
populateNotificationsbooleanqueryНі

Відповідь

Повертає: APISaveCommentResponse

Приклад

Приклад 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 | (необов'язково)
15 doSpamCheck := true // bool | (необов'язково)
16 sendEmails := true // bool | (необов'язково)
17 populateNotifications := true // bool | (необов'язково)
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 // відповідь від `SaveComment`: APISaveCommentResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SaveComment`: %v\n", resp)
28}
29

Масове збереження коментарів Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
isLivebooleanqueryНі
doSpamCheckbooleanqueryНі
sendEmailsbooleanqueryНі
populateNotificationsbooleanqueryНі

Відповідь

Повертає: []SaveCommentsBulkResponse

Приклад

Приклад 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 | (необов'язково)
15 doSpamCheck := true // bool | (необов'язково)
16 sendEmails := true // bool | (необов'язково)
17 populateNotifications := true // bool | (необов'язково)
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 // відповідь від `SaveCommentsBulk`: []SaveCommentsBulkResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SaveCommentsBulk`: %v\n", resp)
28}
29

Встановити текст коментаря Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
commentIdstringpathТак
broadcastIdstringqueryТак
editKeystringqueryНі
ssostringqueryНі

Відповідь

Повертає: PublicAPISetCommentTextResponse

Приклад

Приклад 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 | (необов'язково)
17 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `SetCommentText`: PublicAPISetCommentTextResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.SetCommentText`: %v\n", resp)
28}
29

Розблокувати користувача за коментарем Internal Link

Параметри

НазваTypeLocationОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі
anonUserIdstringqueryНі

Відповідь

Повертає: UnblockSuccess

Приклад

Приклад 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 | (необов'язково)
16 anonUserId := "anonUserId_example" // string | (необов'язково)
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 // відповідь від `UnBlockUserFromComment`: UnblockSuccess
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UnBlockUserFromComment`: %v\n", resp)
27}
28

Зняти позначку зі скарги на коментар Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo
anonUserIdstringqueryNo

Відповідь

Повертає: FlagCommentResponse

Приклад

Приклад 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 | (необов'язково)
15 anonUserId := "anonUserId_example" // string | (необов'язково)
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 // відповідь від `UnFlagComment`: FlagCommentResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UnFlagComment`: %v\n", resp)
26}
27

Розблокувати коментар Internal Link


Параметри

НазваТипLocationОбов'язковийОпис
tenantIdstringpathТак
commentIdstringpathТак
broadcastIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UnLockComment`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UnLockComment`: %v\n", resp)
26}
27

Зняти закріплення коментаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringpathТак
commentIdstringpathТак
broadcastIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: ChangeCommentPinStatusResponse

Приклад

Приклад 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 | (необов'язковий)
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 // відповідь від `UnPinComment`: ChangeCommentPinStatusResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UnPinComment`: %v\n", resp)
26}
27

Оновити коментар Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
idstringpathТак
contextUserIdstringqueryНі
doSpamCheckbooleanqueryНі
isLivebooleanqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
16 doSpamCheck := true // bool | (необов'язково)
17 isLive := true // bool | (необов'язково)
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 // відповідь від `UpdateComment`: APIEmptyResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateComment`: %v\n", resp)
28}
29

Проголосувати за коментар Internal Link


Параметри

НазваТипLocationОбов'язковеОпис
tenantIdstringpathТак
commentIdstringpathТак
urlIdstringqueryТак
broadcastIdstringqueryТак
sessionIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: VoteResponse

Приклад

Приклад 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 | (необов'язково)
18 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `VoteComment`: VoteResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.VoteComment`: %v\n", resp)
29}
30

Отримати коментарі користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
userIdstringqueryНі
directionstringqueryНі
repliesToUserIdstringqueryНі
pagenumberqueryНі
includei10nbooleanqueryНі
localestringqueryНі
isCrawlerbooleanqueryНі

Відповідь

Повертає: GetCommentsForUserResponse

Приклад

Приклад 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 | (необов'язково)
13 direction := openapiclient.SortDirections("OF") // SortDirections | (необов'язково)
14 repliesToUserId := "repliesToUserId_example" // string | (необов'язково)
15 page := float64(1.2) // float64 | (необов'язково)
16 includei10n := true // bool | (необов'язково)
17 locale := "locale_example" // string | (необов'язково)
18 isCrawler := true // bool | (необов'язково)
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 // відповідь від `GetCommentsForUser`: GetCommentsForUserResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetCommentsForUser`: %v\n", resp)
29}
30

Додати конфігурацію домену Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак

Response

Повертає: AddDomainConfigResponse

Приклад

Приклад 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 // відповідь від `AddDomainConfig`: AddDomainConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddDomainConfig`: %v\n", resp)
24}
25

Видалити конфігурацію домену Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
domainstringpathТак

Відповідь

Повертає: DeleteDomainConfigResponse

Приклад

Приклад 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 // відповідь від `DeleteDomainConfig`: DeleteDomainConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteDomainConfig`: %v\n", resp)
24}
25

Отримати конфігурацію домену Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
domainstringpathТак

Відповідь

Повертає: GetDomainConfigResponse

Приклад

Приклад 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 // відповідь від `GetDomainConfig`: GetDomainConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetDomainConfig`: %v\n", resp)
24}
25

Отримати конфігурації домену Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак

Відповідь

Повертає: GetDomainConfigsResponse

Приклад

Приклад 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 // відповідь від `GetDomainConfigs`: GetDomainConfigsResponse
22 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetDomainConfigs`: %v\n", resp)
23}
24

Частково оновити конфігурацію домену Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
domainToUpdatestringpathТак

Відповідь

Повертає: PatchDomainConfigResponse

Приклад

Приклад 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 // відповідь від `PatchDomainConfig`: PatchDomainConfigResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchDomainConfig`: %v\n", resp)
25}
26

Замінити конфігурацію домену Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
domainToUpdatestringpathТак

Відповідь

Повертає: PutDomainConfigResponse

Приклад

Приклад 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 // відповідь від `PutDomainConfig`: PutDomainConfigResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PutDomainConfig`: %v\n", resp)
25}
26

Створити шаблон електронного листа Internal Link


Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак

Відповідь

Повертає: CreateEmailTemplateResponse

Приклад

Приклад 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 // відповідь від `CreateEmailTemplate`: CreateEmailTemplateResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateEmailTemplate`: %v\n", resp)
24}
25

Видалити шаблон електронного листа Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteEmailTemplate`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteEmailTemplate`: %v\n", resp)
24}
25

Видалити помилку рендерингу шаблона листа Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
errorIdstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteEmailTemplateRenderError`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteEmailTemplateRenderError`: %v\n", resp)
25}
26

Отримати шаблон електронного листа Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetEmailTemplateResponse

Приклад

Приклад 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 // відповідь від `GetEmailTemplate`: GetEmailTemplateResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplate`: %v\n", resp)
24}
25

Отримати визначення шаблонів листів Internal Link


Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак

Відповідь

Повертає: GetEmailTemplateDefinitionsResponse

Приклад

Приклад 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 // відповідь від `GetEmailTemplateDefinitions`: GetEmailTemplateDefinitionsResponse
22 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplateDefinitions`: %v\n", resp)
23}
24

Отримати помилки рендерингу шаблонів листів Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак
skipnumberqueryНі

Відповідь

Повертає: GetEmailTemplateRenderErrorsResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetEmailTemplateRenderErrors`: GetEmailTemplateRenderErrorsResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplateRenderErrors`: %v\n", resp)
25}
26

Отримати шаблони електронних листів Internal Link


Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
skipnumberqueryНі

Відповідь

Повертає: GetEmailTemplatesResponse

Приклад

Приклад 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 | (необов'язково)
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 // response from `GetEmailTemplates`: GetEmailTemplatesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplates`: %v\n", resp)
24}
25

Відрендерити шаблон електронного листа Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
localestringqueryNo

Відповідь

Повертає: RenderEmailTemplateResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `RenderEmailTemplate`: RenderEmailTemplateResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RenderEmailTemplate`: %v\n", resp)
25}
26

Оновити шаблон електронного листа Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `UpdateEmailTemplate`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateEmailTemplate`: %v\n", resp)
25}
26

Отримати журнал подій Internal Link

req tenantId urlId userIdWS

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
urlIdstringqueryТак
userIdWSstringqueryТак
startTimeintegerqueryТак
endTimeintegerqueryНі

Відповідь

Повертає: GetEventLogResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetEventLog`: GetEventLogResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetEventLog`: %v\n", resp)
27}
28

Отримати глобальний журнал подій Internal Link

req tenantId urlId userIdWS

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
urlIdstringqueryТак
userIdWSstringqueryТак
startTimeintegerqueryТак
endTimeintegerqueryНі

Відповідь

Повертає: GetEventLogResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetGlobalEventLog`: GetEventLogResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGlobalEventLog`: %v\n", resp)
27}
28

Створити пост стрічки Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
broadcastIdstringqueryНі
isLivebooleanqueryНі
doSpamCheckbooleanqueryНі
skipDupCheckbooleanqueryНі

Відповідь

Повертає: CreateFeedPostsResponse

Приклад

Приклад 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 | (необов'язково)
15 isLive := true // bool | (необов'язково)
16 doSpamCheck := true // bool | (необов'язково)
17 skipDupCheck := true // bool | (необов'язково)
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 // response from `CreateFeedPost`: CreateFeedPostsResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateFeedPost`: %v\n", resp)
28}
29

Створити пост стрічки (публічно) Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: CreateFeedPostResponse

Приклад

Приклад 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 | (необов'язково)
15 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `CreateFeedPostPublic`: CreateFeedPostResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateFeedPostPublic`: %v\n", resp)
26}
27

Видалити пост стрічки (публічно) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
postIdstringpathТак
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: DeleteFeedPostPublicResponse

Приклад

Приклад 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 | (необов'язково)
15 sso := "sso_example" // string | (необов'язково)
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 // response from `DeleteFeedPostPublic`: DeleteFeedPostPublicResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteFeedPostPublic`: %v\n", resp)
26}
27

Отримати пости стрічки Internal Link

req tenantId afterId

Параметри

НазваTypeLocationRequiredОпис
tenantIdstringqueryТак
afterIdstringqueryНі
limitintegerqueryНі
tagsarrayqueryНі

Відповідь

Повертає: GetFeedPostsResponse

Приклад

Приклад 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 | (необов'язковий)
14 limit := int32(56) // int32 | (необов'язковий)
15 tags := []string{"Inner_example"} // []string | (необов'язковий)
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 // відповідь від `GetFeedPosts`: GetFeedPostsResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFeedPosts`: %v\n", resp)
26}
27

Отримати пости стрічки (публічно) Internal Link

запит tenantId afterId

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
afterIdstringqueryНі
limitintegerqueryНі
tagsarrayqueryНі
ssostringqueryНі
isCrawlerbooleanqueryНі
includeUserInfobooleanqueryНі

Відповідь

Повертає: PublicFeedPostsResponse

Приклад

Приклад 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 | (необов'язково)
14 limit := int32(56) // int32 | (необов'язково)
15 tags := []string{"Inner_example"} // []string | (необов'язково)
16 sso := "sso_example" // string | (необов'язково)
17 isCrawler := true // bool | (необов'язково)
18 includeUserInfo := true // bool | (необов'язково)
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 // відповідь від `GetFeedPostsPublic`: PublicFeedPostsResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetFeedPostsPublic`: %v\n", resp)
29}
30

Отримати статистику постів стрічки Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
postIdsarrayqueryТак
ssostringqueryНі

Відповідь

Повертає: FeedPostsStatsResponse

Приклад

Приклад 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 | (необов'язковий)
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 // відповідь від `GetFeedPostsStats`: FeedPostsStatsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetFeedPostsStats`: %v\n", resp)
25}
26

Отримати реакції користувача (публічно) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
postIdsarrayqueryНі
ssostringqueryНі

Відповідь

Повертає: UserReactsResponse

Приклад

Приклад 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 | (необов'язково)
14 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `GetUserReactsPublic`: UserReactsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserReactsPublic`: %v\n", resp)
25}
26

Поставити реакцію посту (публічно) Internal Link

Параметри

Ім'яТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
postIdstringpathТак
isUndobooleanqueryНі
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: ReactFeedPostResponse

Приклад

Приклад 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 | (необов'язково)
16 broadcastId := "broadcastId_example" // string | (необов'язково)
17 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `ReactFeedPostPublic`: ReactFeedPostResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ReactFeedPostPublic`: %v\n", resp)
28}
29

Оновити пост стрічки Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // response from `UpdateFeedPost`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateFeedPost`: %v\n", resp)
26}
27

Оновити пост стрічки (публічно) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
postIdstringpathТак
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: CreateFeedPostResponse

Приклад

Приклад 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 | (необов'язково)
16 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `UpdateFeedPostPublic`: CreateFeedPostResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateFeedPostPublic`: %v\n", resp)
27}
28

Поскаржитися на коментар (публічно) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
commentIdstringpathТак
isFlaggedbooleanqueryТак
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `FlagCommentPublic`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.FlagCommentPublic`: %v\n", resp)
26}
27

Отримати великий GIF Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringpathТак
largeInternalURLSanitizedstringqueryТак

Відповідь

Повертає: GifGetLargeResponse

Приклад

Приклад 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 // відповідь від `GetGifLarge`: GifGetLargeResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifLarge`: %v\n", resp)
24}
25

Пошук GIF Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
searchstringqueryТак
localestringqueryНі
ratingstringqueryНі
pagenumberqueryНі

Відповідь

Повертає: GetGifsSearchResponse

Приклад

Приклад 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 | (необов'язково)
15 rating := "rating_example" // string | (необов'язково)
16 page := float64(1.2) // float64 | (необов'язково)
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 // response from `GetGifsSearch`: GetGifsSearchResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifsSearch`: %v\n", resp)
27}
28

Трендові GIF Internal Link

Параметри

НазваТипLocationОбов'язковоОпис
tenantIdstringpathТак
localestringqueryНі
ratingstringqueryНі
pagenumberqueryНі

Відповідь

Повертає: GetGifsTrendingResponse

Приклад

Приклад 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 | (необов'язково)
14 rating := "rating_example" // string | (необов'язково)
15 page := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetGifsTrending`: GetGifsTrendingResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifsTrending`: %v\n", resp)
26}
27

Додати хештег Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes

Відповідь

Повертає: CreateHashTagResponse

Приклад

Приклад 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 | (опційно)
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 // відповідь від `AddHashTag`: CreateHashTagResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddHashTag`: %v\n", resp)
24}
25

Масове додавання хештегів Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes

Відповідь

Повертає: BulkCreateHashTagsResponse

Приклад

Приклад 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 | (необов’язково)
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 // відповідь від `AddHashTagsBulk`: BulkCreateHashTagsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddHashTagsBulk`: %v\n", resp)
24}
25

Видалити хештег Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
tagstringpathYes

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteHashTag`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteHashTag`: %v\n", resp)
25}
26

Отримати хештеги Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
pagenumberqueryНі

Відповідь

Повертає: GetHashTagsResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetHashTags`: GetHashTagsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetHashTags`: %v\n", resp)
24}
25

Частково оновити хештег Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
tagstringpathYes

Відповідь

Повертає: UpdateHashTagResponse

Приклад

Приклад 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 | (необов'язково)
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, "Error when calling `DefaultAPI.PatchHashTag``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // відповідь від `PatchHashTag`: UpdateHashTagResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchHashTag`: %v\n", resp)
25}
26

Видалити голос модерації Internal Link

Параметри

Ім'яТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
commentIdstringpathYes
voteIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: VoteDeleteResponse

Приклад

Приклад 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 | (необов’язково)
16 sso := "sso_example" // string | (необов’язково)
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, "Помилка при виклику `ModerationAPI.DeleteModerationVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Повна HTTP відповідь: %v\n", r)
24 }
25 // відповідь від `DeleteModerationVote`: VoteDeleteResponse
26 fmt.Fprintf(os.Stdout, "Відповідь від `ModerationAPI.DeleteModerationVote`: %v\n", resp)
27}
28

Отримати API коментарі Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
pagenumberqueryNo
countnumberqueryNo
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
sortsstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Відповідь

Повертає: ModerationAPIGetCommentsResponse

Приклад

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 | (необов’язковий)
14 count := float64(1.2) // float64 | (необов’язковий)
15 textSearch := "textSearch_example" // string | (необов’язковий)
16 byIPFromComment := "byIPFromComment_example" // string | (необов’язковий)
17 filters := "filters_example" // string | (необов’язковий)
18 searchFilters := "searchFilters_example" // string | (необов’язковий)
19 sorts := "sorts_example" // string | (необов’язковий)
20 demo := true // bool | (необов’язковий)
21 sso := "sso_example" // string | (необов’язковий)
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, "Error when calling `ModerationAPI.GetApiComments``: %v\n", err)
28 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
29 }
30 // відповідь від `GetApiComments`: ModerationAPIGetCommentsResponse
31 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetApiComments`: %v\n", resp)
32}
33

Отримати статус експорту API Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
batchJobIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: ModerationExportStatusResponse

Приклад

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 | (optional)
14 sso := "sso_example" // string | (optional)
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, "Error when calling `ModerationAPI.GetApiExportStatus``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // відповідь від `GetApiExportStatus`: ModerationExportStatusResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetApiExportStatus`: %v\n", resp)
25}
26

Отримати API ідентифікатори Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
afterIdstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Response

Повертає: ModerationAPIGetCommentIdsResponse

Приклад

Приклад 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 | (необов'язково)
14 byIPFromComment := "byIPFromComment_example" // string | (необов'язково)
15 filters := "filters_example" // string | (необов'язково)
16 searchFilters := "searchFilters_example" // string | (необов'язково)
17 afterId := "afterId_example" // string | (необов'язково)
18 demo := true // bool | (необов'язково)
19 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `GetApiIds`: ModerationAPIGetCommentIdsResponse
29 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetApiIds`: %v\n", resp)
30}
31

Отримати заблокованих користувачів за коментарем Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryТак
commentIdstringpathТак
ssostringqueryНі

Відповідь

Повертає: GetBannedUsersFromCommentResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetBanUsersFromComment`: GetBannedUsersFromCommentResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetBanUsersFromComment`: %v\n", resp)
25}
26

Отримати статус бану коментаря Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Відповідь

Повертає: GetCommentBanStatusResponse

Приклад

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 | (необов’язково)
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 // response from `GetCommentBanStatus`: GetCommentBanStatusResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCommentBanStatus`: %v\n", resp)
25}
26

Отримати дочірні коментарі Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryТак
commentIdstringpathТак
ssostringqueryНі

Відповідь

Повертає: ModerationAPIChildCommentsResponse

Приклад

Приклад 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" // string |
13 commentId := "commentId_example" // string |
14 sso := "sso_example" // string | (необов'язковий)
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 // response from `GetCommentChildren`: ModerationAPIChildCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCommentChildren`: %v\n", resp)
25}
26

Отримати лічильник Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
text-searchstringqueryНі
byIPFromCommentstringqueryНі
filterstringqueryНі
searchFiltersstringqueryНі
demobooleanqueryНі
ssostringqueryНі

Відповідь

Повертає: ModerationAPICountCommentsResponse

Приклад

Приклад 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 | (необов'язковий)
14 byIPFromComment := "byIPFromComment_example" // string | (необов'язковий)
15 filter := "filter_example" // string | (необов'язковий)
16 searchFilters := "searchFilters_example" // string | (необов'язковий)
17 demo := true // bool | (необов'язковий)
18 sso := "sso_example" // string | (необов'язковий)
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, "Error when calling `ModerationAPI.GetCount``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // відповідь від `GetCount`: ModerationAPICountCommentsResponse
28 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCount`: %v\n", resp)
29}
30

Отримати лічильники Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
ssostringqueryNo

Відповідь

Повертає: GetBannedUsersCountResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetCounts`: GetBannedUsersCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCounts`: %v\n", resp)
24}
25

Отримати журнали Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Відповідь

Повертає: ModerationAPIGetLogsResponse

Приклад

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 | (необов'язково)
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 // відповідь від `GetLogs`: ModerationAPIGetLogsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetLogs`: %v\n", resp)
25}
26

Отримати ручні бейджі Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
ssostringqueryNo

Відповідь

Повертає: GetTenantManualBadgesResponse

Приклад

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 | (необов’язково)
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 // відповідь від `GetManualBadges`: GetTenantManualBadgesResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetManualBadges`: %v\n", resp)
24}
25

Отримати ручні бейджі для користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
badgesUserIdstringqueryНі
commentIdstringqueryНі
ssostringqueryНі

Відповідь

Returns: GetUserManualBadgesResponse

Приклад

Приклад 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" // рядок |
13 badgesUserId := "badgesUserId_example" // рядок | (необов'язково)
14 commentId := "commentId_example" // рядок | (необов'язково)
15 sso := "sso_example" // рядок | (необов'язково)
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 // відповідь від `GetManualBadgesForUser`: GetUserManualBadgesResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetManualBadgesForUser`: %v\n", resp)
26}
27

Отримати коментар для модерації Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
commentIdstringpathYes
includeEmailbooleanqueryNo
includeIPbooleanqueryNo
ssostringqueryNo

Відповідь

Returns: ModerationAPICommentResponse

Приклад

Приклад GetModerationComment
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" // рядок |
13 commentId := "commentId_example" // рядок |
14 includeEmail := true // булевий | (необов’язковий)
15 includeIP := true // булевий | (необов’язковий)
16 sso := "sso_example" // рядок | (необов’язковий)
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, "Error when calling `ModerationAPI.GetModerationComment``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // відповідь від `GetModerationComment`: ModerationAPICommentResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetModerationComment`: %v\n", resp)
27}
28

Отримати текст коментаря для модерації Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryТак
commentIdstringpathТак
ssostringqueryНі

Відповідь

Повертає: GetCommentTextResponse

Приклад

Приклад 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" // string |
13 commentId := "commentId_example" // string |
14 sso := "sso_example" // string | (необов’язковий)
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 // response from `GetModerationCommentText`: GetCommentTextResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetModerationCommentText`: %v\n", resp)
25}
26

Отримати попередню зведену інформацію про бан Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
commentIdstringpathYes
includeByUserIdAndEmailbooleanqueryNo
includeByIPbooleanqueryNo
includeByEmailDomainbooleanqueryNo
ssostringqueryNo

Відповідь

Повертає: PreBanSummary

Приклад

Приклад 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" // string |
13 commentId := "commentId_example" // string |
14 includeByUserIdAndEmail := true // bool | (необов’язково)
15 includeByIP := true // bool | (необов’язково)
16 includeByEmailDomain := true // bool | (необов’язково)
17 sso := "sso_example" // string | (необов’язково)
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 // відповідь від `GetPreBanSummary`: PreBanSummary
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetPreBanSummary`: %v\n", resp)
28}
29

Отримати зведення пошукових коментарів Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
valuestringqueryНі
filtersstringqueryНі
searchFiltersstringqueryНі
ssostringqueryНі

Відповідь

Повертає: ModerationCommentSearchResponse

Приклад

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 | (необов'язковий)
14 filters := "filters_example" // string | (необов'язковий)
15 searchFilters := "searchFilters_example" // string | (необов'язковий)
16 sso := "sso_example" // string | (необов'язковий)
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 // response from `GetSearchCommentsSummary`: ModerationCommentSearchResponse
26 // відповідь від `GetSearchCommentsSummary`: ModerationCommentSearchResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchCommentsSummary`: %v\n", resp)
28}
29

Отримати пошук сторінок Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
valuestringqueryNo
ssostringqueryNo

Відповідь

Returns: ModerationPageSearchResponse

Приклад

Приклад 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 | (необов’язково)
14 sso := "sso_example" // string | (необов’язково)
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 // response from `GetSearchPages`: ModerationPageSearchResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchPages`: %v\n", resp)
25}
26

Отримати пошук сайтів Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
valuestringqueryNo
ssostringqueryNo

Відповідь

Повертає: ModerationSiteSearchResponse

Приклад

Приклад 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 | (необов'язково)
14 sso := "sso_example" // string | (необов'язково)
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, "Error when calling `ModerationAPI.GetSearchSites``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // відповідь від `GetSearchSites`: ModerationSiteSearchResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchSites`: %v\n", resp)
25}
26

Отримати підказки пошуку Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryТак
text-searchstringqueryНі
ssostringqueryНі

Відповідь

Повертає: ModerationSuggestResponse

Приклад

Приклад 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" // string |
13 textSearch := "textSearch_example" // string | (необов'язково)
14 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `GetSearchSuggest`: ModerationSuggestResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchSuggest`: %v\n", resp)
25}
26

Пошук користувачів Internal Link

Параметри

НазваТипМісцеОбов’язковоОпис
tenantIdstringqueryТак
valuestringqueryНі
ssostringqueryНі

Відповідь

Returns: ModerationUserSearchResponse

Приклад

Приклад 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 | (необов’язково)
14 sso := "sso_example" // string | (необов’язково)
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 // відповідь від `GetSearchUsers`: ModerationUserSearchResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchUsers`: %v\n", resp)
25}
26

Отримати коефіцієнт довіри Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryТак
userIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: GetUserTrustFactorResponse

Приклад

Приклад 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 | (необов’язково)
14 sso := "sso_example" // string | (необов’язково)
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 // відповідь від `GetTrustFactor`: GetUserTrustFactorResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetTrustFactor`: %v\n", resp)
25}
26

Отримати налаштування бану користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: APIModerateGetUserBanPreferencesResponse

Приклад

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" // string |
13 sso := "sso_example" // string | (необов'язково)
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 // відповідь з `GetUserBanPreference`: APIModerateGetUserBanPreferencesResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetUserBanPreference`: %v\n", resp)
24}
25

Отримати внутрішній профіль користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: GetUserInternalProfileResponse

Приклад

GetUserInternalProfile Приклад
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 | (необов'язковий)
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 // відповідь від `GetUserInternalProfile`: GetUserInternalProfileResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetUserInternalProfile`: %v\n", resp)
25}
26

Налаштувати голоси коментарів Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: AdjustVotesResponse

Приклад

Приклад PostAdjustCommentVotes
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 | (необов’язково)
16 sso := "sso_example" // string | (необов’язково)
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 // відповідь від `PostAdjustCommentVotes`: AdjustVotesResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostAdjustCommentVotes`: %v\n", resp)
27}
28

Запустити експорт API Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
sortsstringqueryNo
ssostringqueryNo

Відповідь

Returns: ModerationExportResponse

Приклад

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" // рядок |
13 textSearch := "textSearch_example" // рядок | (необов’язково)
14 byIPFromComment := "byIPFromComment_example" // рядок | (необов’язково)
15 filters := "filters_example" // рядок | (необов’язково)
16 searchFilters := "searchFilters_example" // рядок | (необов’язково)
17 sorts := "sorts_example" // рядок | (необов’язково)
18 sso := "sso_example" // рядок | (необов’язково)
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, "Помилка під час виклику `ModerationAPI.PostApiExport``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Повна HTTP відповідь: %v\n", r)
26 }
27 // відповідь від `PostApiExport`: ModerationExportResponse
28 fmt.Fprintf(os.Stdout, "Відповідь від `ModerationAPI.PostApiExport`: %v\n", resp)
29}
30

Забанити користувача за коментар Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
commentIdstringpathYes
banEmailbooleanqueryNo
banEmailDomainbooleanqueryNo
banIPbooleanqueryNo
deleteAllUsersCommentsbooleanqueryNo
bannedUntilstringqueryNo
isShadowBanbooleanqueryNo
updateIdstringqueryNo
banReasonstringqueryNo
ssostringqueryNo

Відповідь

Повертає: BanUserFromCommentResult

Приклад

Приклад 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 | (необов’язково)
15 banEmailDomain := true // bool | (необов’язково)
16 banIP := true // bool | (необов’язково)
17 deleteAllUsersComments := true // bool | (необов’язково)
18 bannedUntil := "bannedUntil_example" // string | (необов’язково)
19 isShadowBan := true // bool | (необов’язково)
20 updateId := "updateId_example" // string | (необов’язково)
21 banReason := "banReason_example" // string | (необов’язково)
22 sso := "sso_example" // string | (необов’язково)
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 // відповідь від `PostBanUserFromComment`: BanUserFromCommentResult
32 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostBanUserFromComment`: %v\n", resp)
33}
34

Скасувати бан користувача Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
ssostringqueryNo

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов’язково)
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 // відповідь з `PostBanUserUndo`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostBanUserUndo`: %v\n", resp)
25}
26

Масове попереднє зведення про бан Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
includeByUserIdAndEmailbooleanqueryНі
includeByIPbooleanqueryНі
includeByEmailDomainbooleanqueryНі
ssostringqueryНі

Відповідь

Повертає: BulkPreBanSummary

Приклад

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 | (необов'язково)
15 includeByIP := true // bool | (необов'язково)
16 includeByEmailDomain := true // bool | (необов'язково)
17 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `PostBulkPreBanSummary`: BulkPreBanSummary
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostBulkPreBanSummary`: %v\n", resp)
28}
29

Отримати коментарі за ідентифікаторами Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
ssostringqueryNo

Відповідь

Returns: ModerationAPIChildCommentsResponse

Приклад

PostCommentsByIds Приклад
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 | (необов'язково)
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 // відповідь від `PostCommentsByIds`: ModerationAPIChildCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostCommentsByIds`: %v\n", resp)
25}
26

Поскаржитися на коментар (модерація) Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: APIEmptyResponse

Приклад

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" // рядок |
13 commentId := "commentId_example" // рядок |
14 broadcastId := "broadcastId_example" // рядок | (необов’язково)
15 sso := "sso_example" // рядок | (необов’язково)
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 // відповідь від `PostFlagComment`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostFlagComment`: %v\n", resp)
26}
27

Вилучити коментар Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: PostRemoveCommentApiResponse

Приклад

Приклад 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 | (optional)
15 sso := "sso_example" // string | (optional)
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 // відповідь від `PostRemoveComment`: PostRemoveCommentApiResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostRemoveComment`: %v\n", resp)
26}
27

Відновити видалений коментар Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (optional) // (необов'язковий)
15 sso := "sso_example" // string | (optional) // (необов'язковий)
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 // response from `PostRestoreDeletedComment`: APIEmptyResponse
25 // відповідь від `PostRestoreDeletedComment`: APIEmptyResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostRestoreDeletedComment`: %v\n", resp)
27}
28

Встановити статус затвердження коментаря Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryТак
commentIdstringpathТак
approvedbooleanqueryНі
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: SetCommentApprovedResponse

Приклад

Приклад 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 | (необов'язково)
15 broadcastId := "broadcastId_example" // string | (необов'язково)
16 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `PostSetCommentApprovalStatus`: SetCommentApprovedResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentApprovalStatus`: %v\n", resp)
27}
28

Встановити статус перевірки коментаря Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryТак
commentIdstringpathТак
reviewedbooleanqueryНі
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

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" // рядок |
13 commentId := "commentId_example" // рядок |
14 reviewed := true // логічний | (необов’язковий)
15 broadcastId := "broadcastId_example" // рядок | (необов’язковий)
16 sso := "sso_example" // рядок | (необов’язковий)
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, "Помилка під час виклику `ModerationAPI.PostSetCommentReviewStatus``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // відповідь від `PostSetCommentReviewStatus`: APIEmptyResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentReviewStatus`: %v\n", resp)
27}
28

Встановити статус спаму коментаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
commentIdstringpathТак
spambooleanqueryНі
permNotSpambooleanqueryНі
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад PostSetCommentSpamStatus
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 | (необов'язково)
15 permNotSpam := true // bool | (необов'язково)
16 broadcastId := "broadcastId_example" // string | (необов'язково)
17 sso := "sso_example" // string | (необов'язково)
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 // response from `PostSetCommentSpamStatus`: APIEmptyResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentSpamStatus`: %v\n", resp)
28}
29

Встановити текст коментаря (модерація) Internal Link

Параметри

НазваТипРозташуванняОбов’язковоОпис
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Returns: SetCommentTextResponse

Приклад

Приклад 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 | (необов’язково)
16 sso := "sso_example" // string | (необов’язково)
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, "Помилка під час виклику `ModerationAPI.PostSetCommentText``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Повна HTTP відповідь: %v\n", r)
24 }
25 // відповідь від `PostSetCommentText`: SetCommentTextResponse
26 fmt.Fprintf(os.Stdout, "Відповідь від `ModerationAPI.PostSetCommentText`: %v\n", resp)
27}
28

Зняти скаргу на коментар Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryТак
commentIdstringpathТак
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

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 | (optional) // string | (опціонально)
15 sso := "sso_example" // string | (optional) // string | (опціонально)
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 // response from `PostUnFlagComment`: APIEmptyResponse // відповідь від `PostUnFlagComment`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostUnFlagComment`: %v\n", resp)
26}
27

Проголосувати (модерація) Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
commentIdstringpathТак
directionstringqueryНі
broadcastIdstringqueryНі
ssostringqueryНі

Відповідь

Повертає: VoteResponse

Приклад

Приклад 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" // string |
13 commentId := "commentId_example" // string |
14 direction := "direction_example" // string | (необов'язковий)
15 broadcastId := "broadcastId_example" // string | (необов'язковий)
16 sso := "sso_example" // string | (необов'язковий)
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, "Error when calling `ModerationAPI.PostVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // response from `PostVote`: VoteResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostVote`: %v\n", resp)
27}
28

Нагородити бейдж Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: AwardUserBadgeResponse

Приклад

Приклад 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 | (необов'язково)
15 commentId := "commentId_example" // string | (необов'язково)
16 broadcastId := "broadcastId_example" // string | (необов'язково)
17 sso := "sso_example" // string | (необов'язково)
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, "Error when calling `ModerationAPI.PutAwardBadge``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // response from `PutAwardBadge`: AwardUserBadgeResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutAwardBadge`: %v\n", resp)
28}
29

Закрити тему Internal Link

Параметри

НазваТипМісцеОбов’язковийОпис
tenantIdstringqueryТак
urlIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов’язково)
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 // відповідь від `PutCloseThread`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutCloseThread`: %v\n", resp)
25}
26

Зняти бейдж Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Відповідь

Повертає: RemoveUserBadgeResponse

Приклад

Приклад 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" // рядок |
13 badgeId := "badgeId_example" // рядок |
14 userId := "userId_example" // рядок | (необов'язково)
15 commentId := "commentId_example" // рядок | (необов'язково)
16 broadcastId := "broadcastId_example" // рядок | (необов'язково)
17 sso := "sso_example" // рядок | (необов'язково)
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 // відповідь від `PutRemoveBadge`: RemoveUserBadgeResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutRemoveBadge`: %v\n", resp)
28}
29

Відкрити тему Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
urlIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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" // string |
13 urlId := "urlId_example" // string |
14 sso := "sso_example" // string | (необов'язковий)
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 // відповідь від `PutReopenThread`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutReopenThread`: %v\n", resp)
25}
26

Встановити коефіцієнт довіри Internal Link

Параметри

НазваТипРозташуванняОбов’язковийОпис
tenantIdstringqueryYes
userIdstringqueryNo
trustFactorstringqueryNo
ssostringqueryNo

Відповідь

Повертає: SetUserTrustFactorResponse

Приклад

Приклад 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 | (необов'язково)
14 trustFactor := "trustFactor_example" // string | (необов'язково)
15 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `SetTrustFactor`: SetUserTrustFactorResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.SetTrustFactor`: %v\n", resp)
26}
27

Створити модератора Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак

Відповідь

Повертає: CreateModeratorResponse

Приклад

Приклад 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 // відповідь від `CreateModerator`: CreateModeratorResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateModerator`: %v\n", resp)
24}
25

Видалити модератора Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак
sendEmailstringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язковий)
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 // відповідь від `DeleteModerator`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteModerator`: %v\n", resp)
25}
26

Отримати модератора Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetModeratorResponse

Приклад

Приклад 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 // відповідь від `GetModerator`: GetModeratorResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetModerator`: %v\n", resp)
24}
25

Отримати модераторів Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
skipnumberqueryНі

Відповідь

Повертає: GetModeratorsResponse

Приклад

Приклад 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 | (необов'язково)
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 // response from `GetModerators`: GetModeratorsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetModerators`: %v\n", resp)
24}
25

Відправити запрошення Internal Link

Параметри

Ім'яТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
idstringpathYes
fromNamestringqueryYes

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // response from `SendInvite`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SendInvite`: %v\n", resp)
25}
26

Оновити модератора Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `UpdateModerator`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateModerator`: %v\n", resp)
25}
26

Видалити кількість сповіщень Internal Link

Параметри

Ім'яТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
idstringpathYes

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteNotificationCount`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteNotificationCount`: %v\n", resp)
24}
25

Отримати кешовану кількість сповіщень Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
idstringpathYes

Відповідь

Повертає: GetCachedNotificationCountResponse

Приклад

Приклад 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 // відповідь від `GetCachedNotificationCount`: GetCachedNotificationCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetCachedNotificationCount`: %v\n", resp)
24}
25

Отримати кількість сповіщень Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
userIdstringqueryНі
urlIdstringqueryНі
fromCommentIdstringqueryНі
viewedbooleanqueryНі
typestringqueryНі

Відповідь

Повертає: GetNotificationCountResponse

Приклад

Приклад 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 | (необов'язково)
14 urlId := "urlId_example" // string | (необов'язково)
15 fromCommentId := "fromCommentId_example" // string | (необов'язково)
16 viewed := true // bool | (необов'язково)
17 type_ := "type__example" // string | (необов'язково)
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 // відповідь від `GetNotificationCount`: GetNotificationCountResponse
27 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetNotificationCount`: %v\n", resp)
28}
29

Отримати сповіщення Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
userIdstringqueryНі
urlIdstringqueryНі
fromCommentIdstringqueryНі
viewedbooleanqueryНі
typestringqueryНі
skipnumberqueryНі

Відповідь

Повертає: GetNotificationsResponse

Приклад

Приклад 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 | (необов'язково)
14 urlId := "urlId_example" // string | (необов'язково)
15 fromCommentId := "fromCommentId_example" // string | (необов'язково)
16 viewed := true // bool | (необов'язково)
17 type_ := "type__example" // string | (необов'язково)
18 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetNotifications`: GetNotificationsResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetNotifications`: %v\n", resp)
29}
30

Оновити сповіщення Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UpdateNotification`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateNotification`: %v\n", resp)
26}
27

Створити реакцію сторінки v1 Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
urlIdstringqueryТак
titlestringqueryНі

Відповідь

Повертає: CreateV1PageReact

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `CreateV1PageReact`: CreateV1PageReact
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateV1PageReact`: %v\n", resp)
25}
26

Створити реакцію сторінки v2 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringшляхТак
urlIdstringпараметр запитуТак
idstringпараметр запитуТак
titlestringпараметр запитуНі

Відповідь

Повертає: CreateV1PageReact

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `CreateV2PageReact`: CreateV1PageReact
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CreateV2PageReact`: %v\n", resp)
26}
27

Видалити реакцію сторінки v1 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
urlIdstringqueryТак

Відповідь

Повертає: CreateV1PageReact

Приклад

Приклад 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 // відповідь від `DeleteV1PageReact`: CreateV1PageReact
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteV1PageReact`: %v\n", resp)
24}
25

Видалити реакцію сторінки v2 Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
urlIdstringqueryТак
idstringqueryТак

Відповідь

Повертає: CreateV1PageReact

Приклад

Приклад 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 // відповідь від `DeleteV2PageReact`: CreateV1PageReact
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteV2PageReact`: %v\n", resp)
25}
26

Отримати лайки сторінки v1 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
urlIdstringqueryТак

Відповідь

Повертає: GetV1PageLikes

Приклад

Приклад 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 // відповідь від `GetV1PageLikes`: GetV1PageLikes
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetV1PageLikes`: %v\n", resp)
24}
25

Отримати реакції сторінки v2 Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
urlIdstringqueryТак

Відповідь

Повертає: GetV2PageReacts

Приклад

Приклад 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 // відповідь від `GetV2PageReacts`: GetV2PageReacts
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetV2PageReacts`: %v\n", resp)
24}
25

Отримати користувачів реакцій сторінки v2 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathТак
urlIdstringqueryТак
idstringqueryТак

Відповідь

Повертає: GetV2PageReactUsersResponse

Приклад

Приклад 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 // відповідь від `GetV2PageReactUsers`: GetV2PageReactUsersResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetV2PageReactUsers`: %v\n", resp)
25}
26

Додати сторінку Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes

Відповідь

Повертає: AddPageAPIResponse

Приклад

Приклад 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 // відповідь від `AddPage`: AddPageAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddPage`: %v\n", resp)
24}
25

Видалити сторінку Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes

Відповідь

Повертає: DeletePageAPIResponse

Приклад

Приклад 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 // відповідь із `DeletePage`: DeletePageAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeletePage`: %v\n", resp)
24}
25

Отримати офлайн-користувачів Internal Link

Попередні коментатори на сторінці, які НЕ зараз в мережі. Відсортовано за displayName. Використовуйте це після вичерпання /users/online, щоб відобразити розділ "Учасники". Пагінація курсором за commenterName: сервер проходить частковий індекс {tenantId, urlId, commenterName} від afterName уперед за допомогою $gt, без витрат $skip.

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathYes
urlIdstringqueryYesPage URL identifier (cleaned server-side).
afterNamestringqueryNoКурсор: передайте nextAfterName з попередньої відповіді.
afterUserIdstringqueryNoКурсор-тайбрекер: передайте nextAfterUserId з попередньої відповіді. Обов'язково, коли afterName встановлено, щоб зв'язки за іменем не призводили до втрати записів.

Відповідь

Повертає: PageUsersOfflineResponse

Приклад

Приклад 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 | Ідентифікатор URL сторінки (очищається на сервері).
14 afterName := "afterName_example" // string | Курсор: передайте nextAfterName з попередньої відповіді. (необов'язково)
15 afterUserId := "afterUserId_example" // string | Курсор-тайбрекер: передайте nextAfterUserId з попередньої відповіді. Обов'язково, коли afterName встановлено, щоб зв'язки за іменем не призводили до втрати записів. (необов'язково)
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 // відповідь від `GetOfflineUsers`: PageUsersOfflineResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetOfflineUsers`: %v\n", resp)
26}
27

Отримати онлайн-користувачів Internal Link

Користувачі, які зараз онлайн на сторінці: люди, чиї websocket-сесії зараз підписані на цю сторінку. Повертає anonCount + totalCount (підписники на кімнату, включаючи анонімних глядачів, яких ми не перераховуємо).

Parameters

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathYes
urlIdstringqueryYesІдентифікатор URL сторінки (очищено на сервері).
afterNamestringqueryNoКурсор: передайте nextAfterName з попередньої відповіді.
afterUserIdstringqueryNoДодатковий курсор для розв'язання однакових імен: передайте nextAfterUserId з попередньої відповіді. Необхідно, коли встановлено afterName, щоб записи з однаковими іменами не втрачалися.

Response

Повертає: PageUsersOnlineResponse

Приклад

Приклад 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 | Ідентифікатор URL сторінки (очищено на сервері).
14 afterName := "afterName_example" // string | Курсор: передайте nextAfterName з попередньої відповіді. (необов'язково)
15 afterUserId := "afterUserId_example" // string | Додатковий курсор для розв'язання однакових імен: передайте nextAfterUserId з попередньої відповіді. Необхідно, коли встановлено afterName, щоб записи з однаковими іменами не втрачалися. (необов'язково)
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 // відповідь від `GetOnlineUsers`: PageUsersOnlineResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetOnlineUsers`: %v\n", resp)
26}
27

Отримати сторінку за URL/ID Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
urlIdstringqueryТак

Відповідь

Повертає: GetPageByURLIdAPIResponse

Приклад

Приклад 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 // відповідь від `GetPageByURLId`: GetPageByURLIdAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPageByURLId`: %v\n", resp)
24}
25

Отримати сторінки Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак

Відповідь

Повертає: GetPagesAPIResponse

Приклад

Приклад 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" // string |
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 // відповідь від `GetPages`: GetPagesAPIResponse
22 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPages`: %v\n", resp)
23}
24

Отримати сторінки (публічно) Internal Link

Перелік сторінок для орендаря. Використовується десктоп-клієнтом FChat для заповнення списку його кімнат. Потрібно, щоб enableFChat був true у визначеній кастомній конфігурації для кожної сторінки. Сторінки, що потребують SSO, фільтруються згідно з груповим доступом користувача, який виконує запит.

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringpathТак
cursorstringqueryНіНепрозорий курсор пагінації, який повертається як nextCursor у попередньому запиті. Пов'язаний із тим самим sortBy.
limitintegerqueryНі1..200, за замовчуванням 50
qstringqueryНіНеобов'язковий фільтр префіксу заголовка без урахування регістру.
sortBystringqueryНіПорядок сортування. updatedAt (за замовчуванням, спочатку найновіші), commentCount (спочатку сторінки з найбільшою кількістю коментарів), або title (за абеткою).
hasCommentsbooleanqueryНіЯкщо true, повертати лише сторінки з принаймні одним коментарем.

Відповідь

Повертає: GetPublicPagesResponse

Приклад

Приклад 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 | Непрозорий курсор пагінації, який повертається як `nextCursor` у попередньому запиті. Пов'язаний із тим самим `sortBy`. (необов'язково)
14 limit := int32(56) // int32 | 1..200, за замовчуванням 50 (необов'язково)
15 q := "q_example" // string | Необов'язковий фільтр префіксу заголовка без урахування регістру. (необов'язково)
16 sortBy := openapiclient.PagesSortBy("updatedAt") // PagesSortBy | Порядок сортування. `updatedAt` (за замовчуванням, спочатку найновіші), `commentCount` (спочатку сторінки з найбільшою кількістю коментарів), або `title` (за абеткою). (необов'язково)
17 hasComments := true // bool | Якщо true, повертати лише сторінки з принаймні одним коментарем. (необов'язково)
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 // відповідь від `GetPagesPublic`: GetPublicPagesResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetPagesPublic`: %v\n", resp)
28}
29

Отримати інформацію про користувачів Internal Link

Масова інформація про користувачів для тенанта. За заданими userIds повертає відображувану інформацію з User / SSOUser. Використовується віджетом коментарів для доповнення користувачів, які щойно з'явилися через подію присутності. Без контексту сторінки: приватність застосовується однаково (приватні профілі приховані).

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathТак
idsstringqueryТакuserIds, розділені комою.

Response

Повертає: PageUsersInfoResponse

Приклад

Приклад використання 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 | userIds, розділені комою.
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 // відповідь від `GetUsersInfo`: PageUsersInfoResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUsersInfo`: %v\n", resp)
24}
25

Частково оновити сторінку Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: PatchPageAPIResponse

Приклад

Приклад 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 // відповідь від `PatchPage`: PatchPageAPIResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchPage`: %v\n", resp)
25}
26

Видалити очікувану подію вебхука Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeletePendingWebhookEvent`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeletePendingWebhookEvent`: %v\n", resp)
24}
25

Отримати кількість очікуваних подій вебхука Internal Link

Параметри

НазваТипLocationОбов'язковоОпис
tenantIdstringqueryТак
commentIdstringqueryНі
externalIdstringqueryНі
eventTypestringqueryНі
typestringqueryНі
domainstringqueryНі
attemptCountGTnumberqueryНі

Відповідь

Повертає: GetPendingWebhookEventCountResponse

Приклад

Приклад 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 | (необов'язковий)
14 externalId := "externalId_example" // string | (необов'язковий)
15 eventType := "eventType_example" // string | (необов'язковий)
16 type_ := "type__example" // string | (необов'язковий)
17 domain := "domain_example" // string | (необов'язковий)
18 attemptCountGT := float64(1.2) // float64 | (необов'язковий)
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 // відповідь від `GetPendingWebhookEventCount`: GetPendingWebhookEventCountResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPendingWebhookEventCount`: %v\n", resp)
29}
30

Отримати очікувані події вебхука Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
commentIdstringqueryНі
externalIdstringqueryНі
eventTypestringqueryНі
typestringqueryНі
domainstringqueryНі
attemptCountGTnumberqueryНі
skipnumberqueryНі

Відповідь

Повертає: GetPendingWebhookEventsResponse

Приклад

Приклад 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 | (необов'язково)
14 externalId := "externalId_example" // string | (необов'язково)
15 eventType := "eventType_example" // string | (необов'язково)
16 type_ := "type__example" // string | (необов'язково)
17 domain := "domain_example" // string | (необов'язково)
18 attemptCountGT := float64(1.2) // float64 | (необов'язково)
19 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetPendingWebhookEvents`: GetPendingWebhookEventsResponse
29 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetPendingWebhookEvents`: %v\n", resp)
30}
31

Створити конфігурацію питання Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringпараметр запитуТак

Відповідь

Повертає: CreateQuestionConfigResponse

Приклад

Приклад 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 // відповідь від `CreateQuestionConfig`: CreateQuestionConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateQuestionConfig`: %v\n", resp)
24}
25

Видалити конфігурацію питання Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteQuestionConfig`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteQuestionConfig`: %v\n", resp)
24}
25

Отримати конфігурацію питання Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetQuestionConfigResponse

Приклад

Приклад 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 // відповідь від `GetQuestionConfig`: GetQuestionConfigResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionConfig`: %v\n", resp)
24}
25

Отримати конфігурації питань Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
skipnumberqueryНі

Відповідь

Повертає: GetQuestionConfigsResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetQuestionConfigs`: GetQuestionConfigsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionConfigs`: %v\n", resp)
24}
25

Оновити конфігурацію питання Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `UpdateQuestionConfig`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateQuestionConfig`: %v\n", resp)
25}
26

Створити результат питання Internal Link


Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак

Відповідь

Повертає: CreateQuestionResultResponse

Приклад

Приклад 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 // відповідь від `CreateQuestionResult`: CreateQuestionResultResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateQuestionResult`: %v\n", resp)
24}
25

Видалити результат питання Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteQuestionResult`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteQuestionResult`: %v\n", resp)
24}
25

Отримати результат питання Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetQuestionResultResponse

Приклад

Приклад 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 // відповідь від `GetQuestionResult`: GetQuestionResultResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionResult`: %v\n", resp)
24}
25

Отримати результати запитань Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
urlIdstringqueryНі
userIdstringqueryНі
startDatestringqueryНі
questionIdstringqueryНі
questionIdsstringqueryНі
skipnumberqueryНі

Відповідь

Повертає: GetQuestionResultsResponse

Приклад

Приклад 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 | (необов'язково)
14 userId := "userId_example" // string | (необов'язково)
15 startDate := "startDate_example" // string | (необов'язково)
16 questionId := "questionId_example" // string | (необов'язково)
17 questionIds := "questionIds_example" // string | (необов'язково)
18 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetQuestionResults`: GetQuestionResultsResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetQuestionResults`: %v\n", resp)
29}
30

Оновити результат питання Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `UpdateQuestionResult`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateQuestionResult`: %v\n", resp)
25}
26

Агрегувати результати запитань Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
questionIdstringqueryНі
questionIdsarrayqueryНі
urlIdstringqueryНі
timeBucketstringqueryНі
startDatestringqueryНі
forceRecalculatebooleanqueryНі

Відповідь

Повертає: AggregateQuestionResultsResponse

Приклад

Приклад 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 | (необов'язково)
15 questionIds := []string{"Inner_example"} // []string | (необов'язково)
16 urlId := "urlId_example" // string | (необов'язково)
17 timeBucket := openapiclient.AggregateTimeBucket("day") // AggregateTimeBucket | (необов'язково)
18 startDate := time.Now() // time.Time | (необов'язково)
19 forceRecalculate := true // bool | (необов'язково)
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 // відповідь з `AggregateQuestionResults`: AggregateQuestionResultsResponse
29 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AggregateQuestionResults`: %v\n", resp)
30}
31

Масова агрегація результатів запитань Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
forceRecalculatebooleanqueryНі

Відповідь

Повертає: BulkAggregateQuestionResultsResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `BulkAggregateQuestionResults`: BulkAggregateQuestionResultsResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.BulkAggregateQuestionResults`: %v\n", resp)
25}
26

Поєднати коментарі з результатами запитань Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
questionIdstringqueryНі
questionIdsarrayqueryНі
urlIdstringqueryНі
startDatestringqueryНі
forceRecalculatebooleanqueryНі
minValuenumberqueryНі
maxValuenumberqueryНі
limitnumberqueryНі

Відповідь

Повертає: CombineQuestionResultsWithCommentsResponse

Приклад

Приклад 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 | (необов'язково)
15 questionIds := []string{"Inner_example"} // []string | (необов'язково)
16 urlId := "urlId_example" // string | (необов'язково)
17 startDate := time.Now() // time.Time | (необов'язково)
18 forceRecalculate := true // bool | (необов'язково)
19 minValue := float64(1.2) // float64 | (необов'язково)
20 maxValue := float64(1.2) // float64 | (необов'язково)
21 limit := float64(1.2) // float64 | (необов'язково)
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 // response from `CombineCommentsWithQuestionResults`: CombineQuestionResultsWithCommentsResponse
31 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CombineCommentsWithQuestionResults`: %v\n", resp)
32}
33

Додати SSO користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак

Відповідь

Повертає: AddSSOUserAPIResponse

Приклад

Приклад 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 // відповідь від `AddSSOUser`: AddSSOUserAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddSSOUser`: %v\n", resp)
24}
25

Видалити SSO користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
deleteCommentsbooleanqueryНі
commentDeleteModestringqueryНі

Відповідь

Повертає: DeleteSSOUserAPIResponse

Приклад

Приклад 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 | (необов'язково)
15 commentDeleteMode := "commentDeleteMode_example" // string | (необов'язково)
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 // відповідь від `DeleteSSOUser`: DeleteSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteSSOUser`: %v\n", resp)
26}
27

Отримати SSO користувача за емейлом Internal Link


Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
emailstringpathТак

Відповідь

Повертає: GetSSOUserByEmailAPIResponse

Приклад

Приклад 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 // відповідь від `GetSSOUserByEmail`: GetSSOUserByEmailAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUserByEmail`: %v\n", resp)
24}
25

Отримати SSO користувача за ID Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetSSOUserByIdAPIResponse

Приклад

Приклад 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 // відповідь від `GetSSOUserById`: GetSSOUserByIdAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUserById`: %v\n", resp)
24}
25

Отримати SSO користувачів Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
skipintegerqueryНі

Відповідь

Повертає: GetSSOUsersResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetSSOUsers`: GetSSOUsersResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUsers`: %v\n", resp)
24}
25

Частково оновити SSO користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак
updateCommentsbooleanqueryНі

Відповідь

Повертає: PatchSSOUserAPIResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `PatchSSOUser`: PatchSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchSSOUser`: %v\n", resp)
26}
27

Замінити SSO користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
updateCommentsbooleanqueryНі

Відповідь

Повертає: PutSSOUserAPIResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `PutSSOUser`: PutSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PutSSOUser`: %v\n", resp)
26}
27

Створити підписку Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак

Відповідь

Повертає: CreateSubscriptionAPIResponse

Приклад

Приклад 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 // відповідь від `CreateSubscription`: CreateSubscriptionAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateSubscription`: %v\n", resp)
24}
25

Видалити підписку Internal Link

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі

Відповідь

Повертає: DeleteSubscriptionAPIResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `DeleteSubscription`: DeleteSubscriptionAPIResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteSubscription`: %v\n", resp)
25}
26

Отримати підписки Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
userIdstringqueryНі

Відповідь

Повертає: GetSubscriptionsAPIResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetSubscriptions`: GetSubscriptionsAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSubscriptions`: %v\n", resp)
24}
25

Оновити підписку Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі

Відповідь

Повертає: UpdateSubscriptionAPIResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UpdateSubscription`: UpdateSubscriptionAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateSubscription`: %v\n", resp)
26}
27

Отримати щоденне використання орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
yearNumbernumberqueryНі
monthNumbernumberqueryНі
dayNumbernumberqueryНі
skipnumberqueryНі

Відповідь

Повертає: GetTenantDailyUsagesResponse

Приклад

Приклад 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 | (необов'язково)
14 monthNumber := float64(1.2) // float64 | (необов'язково)
15 dayNumber := float64(1.2) // float64 | (необов'язково)
16 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetTenantDailyUsages`: GetTenantDailyUsagesResponse
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantDailyUsages`: %v\n", resp)
27}
28

Створити пакет орендаря Internal Link


Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак

Відповідь

Повертає: CreateTenantPackageResponse

Приклад

Приклад 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" // string |
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 // відповідь від `CreateTenantPackage`: CreateTenantPackageResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTenantPackage`: %v\n", resp)
24}
25

Видалити пакет орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `DeleteTenantPackage`: APIEmptyResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteTenantPackage`: %v\n", resp)
24}
25

Отримати пакет орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetTenantPackageResponse

Приклад

Приклад 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 // відповідь від `GetTenantPackage`: GetTenantPackageResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantPackage`: %v\n", resp)
24}
25

Отримати пакети орендаря Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
skipnumberqueryНі

Відповідь

Повертає: GetTenantPackagesResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetTenantPackages`: GetTenantPackagesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantPackages`: %v\n", resp)
24}
25

Замінити пакет орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryYes
idstringpathYes

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `ReplaceTenantPackage`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ReplaceTenantPackage`: %v\n", resp)
25}
26

Оновити пакет орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `UpdateTenantPackage`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateTenantPackage`: %v\n", resp)
25}
26

Створити користувача орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак

Відповідь

Повертає: CreateTenantUserResponse

Приклад

Приклад 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 // відповідь від `CreateTenantUser`: CreateTenantUserResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTenantUser`: %v\n", resp)
24}
25

Видалити користувача орендаря Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак
deleteCommentsstringqueryНі
commentDeleteModestringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язковий)
15 commentDeleteMode := "commentDeleteMode_example" // string | (необов'язковий)
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 // відповідь від `DeleteTenantUser`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteTenantUser`: %v\n", resp)
26}
27

Отримати користувача орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetTenantUserResponse

Приклад

Приклад 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 // відповідь від `GetTenantUser`: GetTenantUserResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantUser`: %v\n", resp)
24}
25

Отримати користувачів орендаря Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
skipnumberqueryNo

Відповідь

Повертає: GetTenantUsersResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetTenantUsers`: GetTenantUsersResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenantUsers`: %v\n", resp)
24}
25

Замінити користувача орендаря Internal Link


Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
updateCommentsstringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // response from `ReplaceTenantUser`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ReplaceTenantUser`: %v\n", resp)
26}
27

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
redirectURLstringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // response from `SendLoginLink`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SendLoginLink`: %v\n", resp)
25}
26

Оновити користувача орендаря Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак
updateCommentsstringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UpdateTenantUser`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateTenantUser`: %v\n", resp)
26}
27

Створити орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак

Відповідь

Повертає: CreateTenantResponse

Приклад

Приклад 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 // відповідь від `CreateTenant`: CreateTenantResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTenant`: %v\n", resp)
25}
26

Видалити орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
surestringqueryНі

Відповідь

Повертає: APIEmptyResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `DeleteTenant`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteTenant`: %v\n", resp)
25}
26

Отримати орендаря Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetTenantResponse

Приклад

Приклад 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 // відповідь від `GetTenant`: GetTenantResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenant`: %v\n", resp)
24}
25

Отримати орендарів Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
metastringqueryНі
skipnumberqueryНі

Відповідь

Повертає: GetTenantsResponse

Приклад

Приклад 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 | (необов'язково)
14 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetTenants`: GetTenantsResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTenants`: %v\n", resp)
25}
26

Оновити орендаря Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Повертає

Returns: APIEmptyResponse

Приклад

Приклад 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 // відповідь від `UpdateTenant`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateTenant`: %v\n", resp)
25}
26

Змінити стан тикета Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
userIdstringqueryТак
idstringpathТак

Відповідь

Повертає: ChangeTicketStateResponse

Приклад

Приклад 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 // response from `ChangeTicketState`: ChangeTicketStateResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ChangeTicketState`: %v\n", resp)
26}
27

Створити тикет Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
userIdstringqueryТак

Відповідь

Повертає: CreateTicketResponse

Приклад

Приклад 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 // відповідь від `CreateTicket`: CreateTicketResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateTicket`: %v\n", resp)
25}
26

Отримати тикет Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак
userIdstringqueryНі

Відповідь

Повертає: GetTicketResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetTicket`: GetTicketResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTicket`: %v\n", resp)
25}
26

Отримати тикети Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
userIdstringqueryНі
statenumberqueryНі
skipnumberqueryНі
limitnumberqueryНі

Відповідь

Повертає: GetTicketsResponse

Приклад

Приклад 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 | (необов'язково)
14 state := float64(1.2) // float64 | (необов'язково)
15 skip := float64(1.2) // float64 | (необов'язково)
16 limit := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetTickets`: GetTicketsResponse
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetTickets`: %v\n", resp)
27}
28

Отримати переклади Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
namespacestringpathТак
componentstringpathТак
localestringqueryНі
useFullTranslationIdsbooleanqueryНі

Відповідь

Повертає: GetTranslationsResponse

Приклад

Приклад 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 | (необов'язково)
15 useFullTranslationIds := true // bool | (необов'язково)
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 // відповідь від `GetTranslations`: GetTranslationsResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetTranslations`: %v\n", resp)
26}
27

Завантажити зображення Internal Link

Завантажити та змінити розмір зображення

Параметри

НазваТипРозташуванняОбов'язковеОпис
tenantIdstringpathYes
sizePresetstringqueryNoПресет розміру: "Default" (1000x1000px) або "CrossPlatform" (створює розміри для популярних пристроїв)
urlIdstringqueryNoІдентифікатор сторінки, з якої відбувається завантаження, для конфігурації

Відповідь

Повертає: UploadImageResponse

Приклад

Приклад 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 | Пресет розміру: \"Default\" (1000x1000px) або \"CrossPlatform\" (створює розміри для популярних пристроїв) (необов'язково)
15 urlId := "urlId_example" // string | Ідентифікатор сторінки, з якої відбувається завантаження, для конфігурації (необов'язково)
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 // відповідь від `UploadImage`: UploadImageResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UploadImage`: %v\n", resp)
26}
27

Отримати прогрес бейджа користувача за ID Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIGetUserBadgeProgressResponse

Приклад

Приклад 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 // відповідь від `GetUserBadgeProgressById`: APIGetUserBadgeProgressResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadgeProgressById`: %v\n", resp)
24}
25

Отримати прогрес бейджа користувача за ID користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
userIdstringpathТак

Відповідь

Повертає: APIGetUserBadgeProgressResponse

Приклад

Приклад 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 // відповідь від `GetUserBadgeProgressByUserId`: APIGetUserBadgeProgressResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadgeProgressByUserId`: %v\n", resp)
24}
25

Отримати список прогресу бейджів користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
userIdstringqueryНі
limitnumberqueryНі
skipnumberqueryНі

Відповідь

Повертає: APIGetUserBadgeProgressListResponse

Приклад

Приклад 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 | (необов'язково)
14 limit := float64(1.2) // float64 | (необов'язково)
15 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetUserBadgeProgressList`: APIGetUserBadgeProgressListResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadgeProgressList`: %v\n", resp)
26}
27

Створити бейдж користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак

Відповідь

Повертає: APICreateUserBadgeResponse

Приклад

Приклад 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 // відповідь від `CreateUserBadge`: APICreateUserBadgeResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateUserBadge`: %v\n", resp)
24}
25

Видалити бейдж користувача Internal Link


Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptySuccessResponse

Приклад

Приклад 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 // відповідь від `DeleteUserBadge`: APIEmptySuccessResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteUserBadge`: %v\n", resp)
24}
25

Отримати бейдж користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIGetUserBadgeResponse

Приклад

Приклад 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 // відповідь від `GetUserBadge`: APIGetUserBadgeResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadge`: %v\n", resp)
24}
25

Отримати бейджі користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
userIdstringqueryНі
badgeIdstringqueryНі
typenumberqueryНі
displayedOnCommentsbooleanqueryНі
limitnumberqueryНі
skipnumberqueryНі

Відповідь

Повертає: APIGetUserBadgesResponse

Приклад

Приклад 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 | (необов'язково)
14 badgeId := "badgeId_example" // string | (необов'язково)
15 type_ := float64(1.2) // float64 | (необов'язково)
16 displayedOnComments := true // bool | (необов'язково)
17 limit := float64(1.2) // float64 | (необов'язково)
18 skip := float64(1.2) // float64 | (необов'язково)
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 // відповідь від `GetUserBadges`: APIGetUserBadgesResponse
28 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUserBadges`: %v\n", resp)
29}
30

Оновити бейдж користувача Internal Link

Параметри

НазваТипLocationОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: APIEmptySuccessResponse

Приклад

Приклад 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 // відповідь від `UpdateUserBadge`: APIEmptySuccessResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UpdateUserBadge`: %v\n", resp)
25}
26

Отримати кількість сповіщень користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: GetUserNotificationCountResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `GetUserNotificationCount`: GetUserNotificationCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserNotificationCount`: %v\n", resp)
24}
25

Отримати сповіщення користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
urlIdstringqueryНіВикористовується для визначення, чи підписана поточна сторінка.
pageSizeintegerqueryНі
afterIdstringqueryНі
includeContextbooleanqueryНі
afterCreatedAtintegerqueryНі
unreadOnlybooleanqueryНі
dmOnlybooleanqueryНі
noDmbooleanqueryНі
includeTranslationsbooleanqueryНі
includeTenantNotificationsbooleanqueryНі
ssostringqueryНі

Відповідь

Повертає: GetMyNotificationsResponse

Приклад

Приклад 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 | Використовується для визначення, чи підписана поточна сторінка. (необов'язково)
14 pageSize := int32(56) // int32 | (необов'язково)
15 afterId := "afterId_example" // string | (необов'язково)
16 includeContext := true // bool | (необов'язково)
17 afterCreatedAt := int64(789) // int64 | (необов'язково)
18 unreadOnly := true // bool | (необов'язково)
19 dmOnly := true // bool | (необов'язково)
20 noDm := true // bool | (необов'язково)
21 includeTranslations := true // bool | (необов'язково)
22 includeTenantNotifications := true // bool | (необов'язково)
23 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `GetUserNotifications`: GetMyNotificationsResponse
33 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserNotifications`: %v\n", resp)
34}
35

Скинути кількість сповіщень користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
ssostringqueryНі

Відповідь

Повертає: ResetUserNotificationsResponse

Приклад

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 | (необов'язково)
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 // відповідь від `ResetUserNotificationCount`: ResetUserNotificationsResponse
23 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ResetUserNotificationCount`: %v\n", resp)
24}
25

Скинути сповіщення користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковийОпис
tenantIdstringqueryТак
afterIdstringqueryНі
afterCreatedAtintegerqueryНі
unreadOnlybooleanqueryНі
dmOnlybooleanqueryНі
noDmbooleanqueryНі
ssostringqueryНі

Відповідь

Повертає: ResetUserNotificationsResponse

Приклад

Приклад 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 | (необов'язково)
14 afterCreatedAt := int64(789) // int64 | (необов'язково)
15 unreadOnly := true // bool | (необов'язково)
16 dmOnly := true // bool | (необов'язково)
17 noDm := true // bool | (необов'язково)
18 sso := "sso_example" // string | (необов'язково)
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 // відповідь від `ResetUserNotifications`: ResetUserNotificationsResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.ResetUserNotifications`: %v\n", resp)
29}
30

Оновити статус підписки на коментарі користувача Internal Link

Увімкнути або вимкнути повідомлення для конкретного коментаря.

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
notificationIdstringpathYes
optedInOrOutstringpathYes
commentIdstringqueryYes
ssostringqueryNo

Відповідь

Повертає: UpdateUserNotificationCommentSubscriptionStatusResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UpdateUserNotificationCommentSubscriptionStatus`: UpdateUserNotificationCommentSubscriptionStatusResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateUserNotificationCommentSubscriptionStatus`: %v\n", resp)
27}
28

Оновити статус підписки на сторінку користувача Internal Link

Увімкнути або вимкнути сповіщення для сторінки. Коли користувачі підписані на сторінку, створюються сповіщення для нових кореневих коментарів, а також

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
urlIdstringqueryТак
urlstringqueryТак
pageTitlestringqueryТак
subscribedOrUnsubscribedstringpathТак
ssostringqueryНі

Відповідь

Повертає: UpdateUserNotificationPageSubscriptionStatusResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UpdateUserNotificationPageSubscriptionStatus`: UpdateUserNotificationPageSubscriptionStatusResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateUserNotificationPageSubscriptionStatus`: %v\n", resp)
28}
29

Оновити статус сповіщення користувача Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
notificationIdstringpathТак
newStatusstringpathТак
ssostringqueryНі

Відповідь

Повертає: UpdateUserNotificationStatusResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `UpdateUserNotificationStatus`: UpdateUserNotificationStatusResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UpdateUserNotificationStatus`: %v\n", resp)
26}
27

Отримати статуси присутності користувачів Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
urlIdWSstringqueryТак
userIdsstringqueryТак

Відповідь

Повертає: GetUserPresenceStatusesResponse

Приклад

Приклад 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 // відповідь від `GetUserPresenceStatuses`: GetUserPresenceStatusesResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserPresenceStatuses`: %v\n", resp)
25}
26

Пошук користувачів Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathYes
urlIdstringqueryYes
usernameStartsWithstringqueryNo
mentionGroupIdsarrayqueryNo
ssostringqueryNo
searchSectionstringqueryNo

Відповідь

Повертає: SearchUsersResult

Приклад

Приклад 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 | (необов'язково)
15 mentionGroupIds := []string{"Inner_example"} // []string | (необов'язково)
16 sso := "sso_example" // string | (необов'язково)
17 searchSection := "searchSection_example" // string | (необов'язково)
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 // відповідь від `SearchUsers`: SearchUsersResult
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.SearchUsers`: %v\n", resp)
28}
29

Отримати користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
idstringpathТак

Відповідь

Повертає: GetUserResponse

Приклад

Приклад 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 // відповідь від `GetUser`: GetUserResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUser`: %v\n", resp)
24}
25

Створити голос Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
commentIdstringqueryТак
directionstringqueryТак
userIdstringqueryНі
anonUserIdstringqueryНі

Відповідь

Повертає: VoteResponse

Приклад

Приклад 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 | (необов'язково)
16 anonUserId := "anonUserId_example" // string | (необов'язково)
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 // відповідь від `CreateVote`: VoteResponse
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateVote`: %v\n", resp)
27}
28

Видалити голос Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryТак
idstringpathТак
editKeystringqueryНі

Відповідь

Повертає: VoteDeleteResponse

Приклад

Приклад 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 | (необов'язково)
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 // відповідь від `DeleteVote`: VoteDeleteResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteVote`: %v\n", resp)
25}
26

Отримати голоси Internal Link

Параметри

НазваТипРозташуванняОбов'язковоОпис
tenantIdstringqueryYes
urlIdstringqueryYes

Відповідь

Повертає: GetVotesResponse

Приклад

Приклад 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" // рядок |
13 urlId := "urlId_example" // рядок |
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 // відповідь від `GetVotes`: GetVotesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetVotes`: %v\n", resp)
24}
25

Отримати голоси для користувача Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryТак
urlIdstringqueryТак
userIdstringqueryНі
anonUserIdstringqueryНі

Відповідь

Повертає: GetVotesForUserResponse

Приклад

Приклад 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 | (необов'язково)
15 anonUserId := "anonUserId_example" // string | (необов'язково)
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 // response from `GetVotesForUser`: GetVotesForUserResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetVotesForUser`: %v\n", resp)
26}
27

Потрібна допомога?

Якщо у вас виникли проблеми або є питання щодо Go SDK, будь ласка:

Участь

Внески вітаються! Будь ласка, відвідайте репозиторій GitHub для отримання інструкцій щодо внесків.