FastComments.com

FastComments SDK для Go

Это официальный Go SDK для FastComments.

Официальный Go SDK для FastComments API

Репозиторий

Посмотреть на GitHub


Установка Internal Link

go get github.com/fastcomments/fastcomments-go

Использование API‑клиента

Public API (No Authentication)

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)
}

Default API (Requires API Key)

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"},
        },
    )

    // Get comments using authenticated 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)
}

Moderation API (Moderator Dashboard)

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() {
    // Создать токен Simple 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() {
    // Создать токен Secure 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 и т.д.).

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
parentTenantIdstringqueryNo
includeStatsbooleanqueryNo

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНет
anonUserIdstringqueryНет

Response

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringpathДа
commentIdstringpathДа
broadcastIdstringqueryДа
editKeystringqueryНет
ssostringqueryНет

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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 // response from `DeleteCommentVote`: VoteDeleteResponse
28 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteCommentVote`: %v\n", resp)
29}
30

Пометить комментарий Internal Link

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo
anonUserIdstringqueryNo

Ответ

Возвращает: 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

Параметры

ИмяТипLocationОбязательноОписание
tenantIdstringqueryYes
idstringpathYes

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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

req tenantId urlId

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringпутьДа
commentIdstringпутьДа
editKeystringстрока запросаНет
ssostringстрока запросаНет

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringpathДа
commentIdstringpathДа
broadcastIdstringqueryДа
ssostringqueryНет

Ответ

Возвращает: 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

Параметры

ИмяТипМестоположениеОбязательноОписание
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


Параметры

ИмяТипРасположениеОбязательныйОписание
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringпутьДа
commentIdstringпутьДа
broadcastIdstringпараметр запросаДа
ssostringпараметр запросаНет

Response

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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


Параметры

NameTypeLocationRequiredDescription
tenantIdstringpathYes
commentIdstringpathYes
urlIdstringqueryYes
broadcastIdstringqueryYes
sessionIdstringqueryNo
ssostringqueryNo

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
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Да

Ответ

Возвращает: 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

Параметры

ИмяТипLocationОбязательноОписание
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


Параметры

NameTypeLocationRequiredDescription
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

Параметры

NameTypeLocationRequiredDescription
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 // response from `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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

ИмяТипРасположениеОбязательноОписание
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 // ответ от `GetEmailTemplates`: GetEmailTemplatesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetEmailTemplates`: %v\n", resp)
24}
25

Отрендерить шаблон письма Internal Link

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
localestringqueryНет

Ответ

Возвращает: 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

Параметры

ИмяТипLocationОбязательноОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
broadcastIdstringqueryNo
isLivebooleanqueryNo
doSpamCheckbooleanqueryNo
skipDupCheckbooleanqueryNo

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
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 // ответ от `DeleteFeedPostPublic`: DeleteFeedPostPublicResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.DeleteFeedPostPublic`: %v\n", resp)
26}
27

Получить записи ленты Internal Link

req tenantId afterId

Параметры

ИмяТипРасположениеОбязательноОписание
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

req tenantId afterId

Параметры

NameTypeLocationRequiredDescription
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяTypeLocationОбязательныйОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
idstringpathДа

Ответ

Возвращает: 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 // ответ от `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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringpathYes
largeInternalURLSanitizedstringqueryYes

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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 // ответ от `GetGifsSearch`: GetGifsSearchResponse
26 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetGifsSearch`: %v\n", resp)
27}
28

Популярные GIF Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryДа

Ответ

Возвращает: 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, "Ошибка при вызове `DefaultAPI.AddHashTag``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
21 }
22 // ответ от `AddHashTag`: CreateHashTagResponse
23 fmt.Fprintf(os.Stdout, "Ответ от `DefaultAPI.AddHashTag`: %v\n", resp)
24}
25

Добавить хэштеги (пакетно) Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes

Response

Returns: BulkCreateHashTagsResponse

Example

Пример 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 | (optional)
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
tagstringpathДа

Ответ

Возвращает: 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 | (optional)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.PatchHashTag(context.Background(), tag).TenantId(tenantId).UpdateHashTagBody(updateHashTagBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
commentIdstringpathДа
voteIdstringpathДа
broadcastIdstringqueryНет
ssostringqueryНет

Ответ

Возвращает: 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" // строка |
13 commentId := "commentId_example" // строка |
14 voteId := "voteId_example" // строка |
15 broadcastId := "broadcastId_example" // строка | (необязательно)
16 sso := "sso_example" // строка | (необязательно)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.DeleteModerationVote(context.Background(), commentId, voteId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.DeleteModerationVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // response from `DeleteModerationVote`: VoteDeleteResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.DeleteModerationVote`: %v\n", resp)
27}
28

Получить комментарии через API Internal Link

Параметры

NameTypeLocationRequiredDescription
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, "Ошибка при вызове `ModerationAPI.GetApiComments``: %v\n", err)
28 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
29 }
30 // ответ от `GetApiComments`: ModerationAPIGetCommentsResponse
31 fmt.Fprintf(os.Stdout, "Ответ от `ModerationAPI.GetApiComments`: %v\n", resp)
32}
33

Получить статус экспорта API Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
batchJobIdstringqueryНет
ssostringqueryНет

Ответ

Returns: 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 | (необязательно)
14 sso := "sso_example" // string | (необязательно)
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
text-searchstringqueryНет
byIPFromCommentstringqueryНет
filtersstringqueryНет
searchFiltersstringqueryНет
afterIdstringqueryНет
demobooleanqueryНет
ssostringqueryНет

Ответ

Returns: 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, "Ошибка при вызове `ModerationAPI.GetApiIds``: %v\n", err)
26 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
27 }
28 // ответ от `GetApiIds`: ModerationAPIGetCommentIdsResponse
29 fmt.Fprintf(os.Stdout, "Ответ от `ModerationAPI.GetApiIds`: %v\n", resp)
30}
31

Получить заблокированных пользователей по комментарию Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Response

Возвращает: GetBannedUsersFromCommentResponse

Example

Пример 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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
commentIdstringpathДа
ssostringqueryНет

Ответ

Возвращает: 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 // ответ от `GetCommentBanStatus`: GetCommentBanStatusResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCommentBanStatus`: %v\n", resp)
25}
26

Получить дочерние комментарии Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Ответ

Возвращает: 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 // ответ от `GetCommentChildren`: ModerationAPIChildCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCommentChildren`: %v\n", resp)
25}
26

Получить количество Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filterstringqueryNo
searchFiltersstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Ответ

Возвращает: 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 | (optional)
14 byIPFromComment := "byIPFromComment_example" // string | (optional)
15 filter := "filter_example" // string | (optional)
16 searchFilters := "searchFilters_example" // string | (optional)
17 demo := true // bool | (optional)
18 sso := "sso_example" // string | (optional)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.ModerationAPI.GetCount(context.Background()).TenantId(tenantId).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filter(filter).SearchFilters(searchFilters).Demo(demo).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Ошибка при вызове `ModerationAPI.GetCount``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
26 }
27 // ответ от `GetCount`: ModerationAPICountCommentsResponse
28 fmt.Fprintf(os.Stdout, "Ответ от `ModerationAPI.GetCount`: %v\n", resp)
29}
30

Получить счётчики Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
ssostringqueryНет

Ответ

Возвращает: 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, "Ошибка при вызове `ModerationAPI.GetCounts``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Полный HTTP‑ответ: %v\n", r)
21 }
22 // ответ от `GetCounts`: GetBannedUsersCountResponse
23 fmt.Fprintf(os.Stdout, "Ответ от `ModerationAPI.GetCounts`: %v\n", resp)
24}
25

Получить логи Internal Link

Параметры

NameTypeLocationRequiredDescription
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 | (optional)
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

Ответ

Returns: 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

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryYes
badgesUserIdstringqueryNo
commentIdstringqueryNo
ssostringqueryNo

Ответ

Возвращает: 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" // string |
13 badgesUserId := "badgesUserId_example" // string | (необязательно)
14 commentId := "commentId_example" // string | (необязательно)
15 sso := "sso_example" // string | (необязательно)
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
commentIdstringpathДа
includeEmailbooleanqueryНет
includeIPbooleanqueryНет
ssostringqueryНет

Ответ

Возвращает: 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" // string |
13 commentId := "commentId_example" // string |
14 includeEmail := true // bool | (optional)
15 includeIP := true // bool | (optional)
16 sso := "sso_example" // string | (optional)
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 // response from `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" // строка |
13 commentId := "commentId_example" // строка |
14 sso := "sso_example" // строка | (необязательно)
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 // ответ от `GetModerationCommentText`: GetCommentTextResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetModerationCommentText`: %v\n", resp)
25}
26

Получить предварительное резюме по блокировкам Internal Link

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryДа
commentIdstringpathДа
includeByUserIdAndEmailbooleanqueryНет
includeByIPbooleanqueryНет
includeByEmailDomainbooleanqueryНет
ssostringqueryНет

Ответ

Возвращает: 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

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryYes
valuestringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
ssostringqueryNo

Ответ

Returns: 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, "Ошибка при вызове `ModerationAPI.GetSearchCommentsSummary``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
24 }
25 // ответ от `GetSearchCommentsSummary`: ModerationCommentSearchResponse
26 fmt.Fprintf(os.Stdout, "Ответ от `ModerationAPI.GetSearchCommentsSummary`: %v\n", resp)
27}
28

Поиск страниц Internal Link


Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryДа
valuestringqueryНет
ssostringqueryНет

Ответ

Возвращает: 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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
valuestringqueryNo
ssostringqueryNo

Response

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
valuestringqueryNo
ssostringqueryNo

Ответ

Возвращает: 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
tenantIdstringqueryДа
commentIdstringqueryНет
ssostringqueryНет

Ответ

Возвращает: 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

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryДа
commentIdstringpathДа
broadcastIdstringqueryНет
ssostringqueryНет

Ответ

Возвращает: 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

Ответ

Возвращает: 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" // string |
13 textSearch := "textSearch_example" // string | (необязательно)
14 byIPFromComment := "byIPFromComment_example" // string | (необязательно)
15 filters := "filters_example" // string | (необязательно)
16 searchFilters := "searchFilters_example" // string | (необязательно)
17 sorts := "sorts_example" // string | (необязательно)
18 sso := "sso_example" // string | (необязательно)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.ModerationAPI.PostApiExport(context.Background()).TenantId(tenantId).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filters(filters).SearchFilters(searchFilters).Sorts(sorts).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostApiExport``: %v\n", err)
25 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
26 }
27 // ответ от `PostApiExport`: ModerationExportResponse
28 fmt.Fprintf(os.Stdout, "Response from `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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
ssostringqueryНет

Ответ

Возвращает: 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

Parameters

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryYes
includeByUserIdAndEmailbooleanqueryNo
includeByIPbooleanqueryNo
includeByEmailDomainbooleanqueryNo
ssostringqueryNo

Response

Возвращает: 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" // строка |
13 bulkPreBanParams := *openapiclient.NewBulkPreBanParams([]string{"CommentIds_example"}) // BulkPreBanParams |
14 includeByUserIdAndEmail := true // логическое | (необязательно)
15 includeByIP := true // логическое | (необязательно)
16 includeByEmailDomain := true // логическое | (необязательно)
17 sso := "sso_example" // строка | (необязательно)
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

Получить комментарии по ID Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
ssostringqueryНет

Ответ

Возвращает: 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

Parameters

ИмяТипРасположениеОбязательноОписание
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" // 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.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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
commentIdstringpathДа
broadcastIdstringqueryНет
ssostringqueryНет

Ответ

Returns: 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 | (необязательно)
15 sso := "sso_example" // string | (необязательно)
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, "Ошибка при вызове `ModerationAPI.PostRemoveComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Полный HTTP‑ответ: %v\n", r)
23 }
24 // ответ от `PostRemoveComment`: PostRemoveCommentApiResponse
25 fmt.Fprintf(os.Stdout, "Ответ от `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 | (необязательно)
15 sso := "sso_example" // string | (необязательно)
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 // ответ от `PostRestoreDeletedComment`: APIEmptyResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostRestoreDeletedComment`: %v\n", resp)
26}
27

Установить статус одобрения комментария 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, "Ошибка при вызове `ModerationAPI.PostSetCommentApprovalStatus``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
24 }
25 // ответ от `PostSetCommentApprovalStatus`: SetCommentApprovedResponse
26 fmt.Fprintf(os.Stdout, "Ответ от `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, "Error when calling `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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
spambooleanqueryNo
permNotSpambooleanqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Response

Returns: APIEmptyResponse

Example

Пример 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 // ответ от `PostSetCommentSpamStatus`: APIEmptyResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentSpamStatus`: %v\n", resp)
28}
29

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

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Ответ

Возвращает: 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, "Error when calling `ModerationAPI.PostSetCommentText``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // ответ от `PostSetCommentText`: SetCommentTextResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentText`: %v\n", resp)
27}
28

Снять пометку с комментария Internal Link

Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Ответ

Возвращает: 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 | (опционально)
15 sso := "sso_example" // 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 // ответ от `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, "Ошибка при вызове `ModerationAPI.PostVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Полный HTTP-ответ: %v\n", r)
24 }
25 // ответ от `PostVote`: VoteResponse
26 fmt.Fprintf(os.Stdout, "Ответ от `ModerationAPI.PostVote`: %v\n", resp)
27}
28

Присвоить бейдж Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
badgeIdstringqueryДа
userIdstringqueryНет
commentIdstringqueryНет
broadcastIdstringqueryНет
ssostringqueryНет

Ответ

Возвращает: 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 // ответ от `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 // response from `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" // 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.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

Parameters

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
urlIdstringqueryYes
ssostringqueryNo

Ответ

Возвращает: 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" // строка |
13 urlId := "urlId_example" // строка |
14 sso := "sso_example" // строка | (опционально)
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипМестоположениеОбязательноОписание
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" // строка |
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
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 // ответ от `GetModerators`: GetModeratorsResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetModerators`: %v\n", resp)
24}
25

Отправить приглашение Internal Link

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
fromNamestringqueryДа

Ответ

Возвращает: 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 // ответ от `SendInvite`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SendInvite`: %v\n", resp)
25}
26

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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
idstringpathДа

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательныйОписание
tenantIdstringqueryДа
idstringpathДа

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
userIdstringqueryNo
urlIdstringqueryNo
fromCommentIdstringqueryNo
viewedbooleanqueryNo
typestringqueryNo

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
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 // response from `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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringpathYes
urlIdstringqueryYes
idstringqueryYes
titlestringqueryNo

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

НазваниеТипРасположениеОбязательноОписание
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringpathYes
urlIdstringqueryYes

Ответ

Возвращает: 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

Параметры

ИмяТипLocationRequiredОписание
tenantIdstringpathДа
urlIdstringqueryДа
idstringqueryДа

Response

Возвращает: 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
tenantIdstringqueryДа
idstringpathДа

Ответ

Возвращает: 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.

Параметры

NameTypeLocationRequiredDescription
tenantIdstringpathYes
urlIdstringqueryYesИдентификатор URL страницы (очищается на стороне сервера).
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 (подписчики всей комнаты, включая анонимных зрителей, которых мы не перечисляем).

Параметры

ИмяТипLocationОбязательныйОписание
tenantIdstringpathДа
urlIdstringqueryДаИдентификатор URL страницы (очищается на стороне сервера).
afterNamestringqueryНетКурсор: передайте nextAfterName из предыдущего ответа.
afterUserIdstringqueryНетКурсор-тайбрейкер: передайте nextAfterUserId из предыдущего ответа. Обязательно, когда afterName установлен, чтобы записи с одинаковыми именами не пропадали.

Ответ

Возвращает: 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, фильтруются с учётом прав доступа групп запрашивающего пользователя.

Параметры

NameTypeLocationRequiredDescription
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 // response from `GetPagesPublic`: GetPublicPagesResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetPagesPublic`: %v\n", resp)
28}
29

Получить информацию о пользователях Internal Link

Массовая информация о пользователях для тенанта. По заданным userIds возвращает отображаемую информацию из User / SSOUser. Используется виджетом комментариев для дополнения информации о пользователях, которые только что появились через событие присутствия. Нет контекста страницы: конфиденциальность применяется одинаково (закрытые профили маскируются).

Параметры

NameTypeLocationRequiredDescription
tenantIdstringpathДа
idsstringqueryДаuserIds, разделённые запятыми.

Ответ

Возвращает: 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

Параметры

НазваниеТипРасположениеОбязательноОписание
tenantIdstringqueryYes
idstringpathYes

Ответ

Возвращает: 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 // response from `PatchPage`: PatchPageAPIResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchPage`: %v\n", resp)
25}
26

Удалить ожидающее событие webhook Internal Link

Параметры

NameTypeLocationRequiredDescription
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

Получить количество ожидающих событий webhook Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
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

Получить ожидающие события webhook Internal Link

Параметры

ИмяТипМестоположениеОбязательноОписание
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


Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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


Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяTypeLocationОбязательныйОписание
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

Параметры

NameTypeLocationRequiredDescription
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" // строка |
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

Параметры

NameTypeLocationRequiredDescription
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
tenantIdstringqueryYes
urlIdstringqueryNo
userIdstringqueryNo
startDatestringqueryNo
questionIdstringqueryNo
questionIdsstringqueryNo
skipnumberqueryNo

Ответ

Возвращает: 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


Параметры

NameTypeLocationRequiredDescription
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 // response from `AggregateQuestionResults`: AggregateQuestionResultsResponse
29 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AggregateQuestionResults`: %v\n", resp)
30}
31

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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
forceRecalculatebooleanqueryNo

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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 // ответ от `CombineCommentsWithQuestionResults`: CombineQuestionResultsWithCommentsResponse
31 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CombineCommentsWithQuestionResults`: %v\n", resp)
32}
33

Добавить SSO-пользователя Internal Link

Параметры

NameTypeLocationRequiredDescription
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 // response from `AddSSOUser`: AddSSOUserAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddSSOUser`: %v\n", resp)
24}
25

Удалить SSO-пользователя Internal Link

Параметры

NameTypeLocationRequiredDescription
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 // response from `DeleteSSOUser`: DeleteSSOUserAPIResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteSSOUser`: %v\n", resp)
26}
27

Получить SSO-пользователя по email Internal Link

Параметры

NameTypeLocationRequiredDescription
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" // строка |
13 email := "email_example" // строка |
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

Параметры

NameTypeLocationОбязательныйОписание
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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
updateCommentsbooleanqueryНет

Response

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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Нет

Response

Возвращает: 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 // response from `GetSubscriptions`: GetSubscriptionsAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSubscriptions`: %v\n", resp)
24}
25

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

Параметры

ИмяТипРасположениеОбязательноОписание
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 // response from `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

Параметры

NameTypeLocationRequiredDescription
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
tenantIdstringqueryYes
skipnumberqueryNo

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
idstringpathДа

Ответ

Возвращает: 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

Параметры

ИмяTypeLocationОбязательноОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательныйОписание
tenantIdstringqueryДа
skipnumberqueryНет

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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 // ответ от `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 // ответ от `SendLoginLink`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SendLoginLink`: %v\n", resp)
25}
26

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


Параметры

ИмяТипLocationОбязательноеОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипLocationОбязательныйОписание
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
idstringpathYes

Ответ

Возвращает: 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 // Ответ от `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


Параметры

ИмяТипРасположениеОбязательныйОписание
tenantIdstringпараметр запросаДа
idstringпутьДа
userIdstringпараметр запросаНет

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
userIdstringqueryНет
statenumberqueryНет
skipnumberqueryНет
limitnumberqueryНет

Response

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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

Загрузить и изменить размер изображения

Параметры

NameTypeLocationRequiredDescription
tenantIdstringpathYes
sizePresetstringqueryNoПресет размера: "Default" (1000x1000px) или "CrossPlatform" (создаёт размеры для популярных устройств)
urlIdstringqueryNoID страницы, с которой выполняется загрузка, для конфигурации

Ответ

Возвращает: 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 | ID страницы, с которой выполняется загрузка, для конфигурации (необязательно)
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

Параметры

ИмяТипРасположениеОбязательныйОписание
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

Параметры

ИмяТипМестоположениеОбязательныйОписание
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

Параметры

ИмяТипРасположениеОбязательныйОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипМестоположениеОбязательноОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Включает или отключает уведомления для конкретного комментария.

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
notificationIdstringpathДа
optedInOrOutstringpathДа
commentIdstringqueryДа
ssostringqueryНет

Ответ

Возвращает: 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

Включение или отключение уведомлений для страницы. Когда пользователи подписаны на страницу, создаются уведомления о новых корневых комментариях, а также

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryYes
urlIdstringqueryYes
urlstringqueryYes
pageTitlestringqueryYes
subscribedOrUnsubscribedstringpathYes
ssostringqueryNo

Ответ

Возвращает: 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

Параметры

NameTypeLocationRequiredDescription
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


Параметры

ИмяТипМестоположениеОбязательноОписание
tenantIdstringqueryYes
urlIdWSstringqueryYes
userIdsstringqueryYes

Ответ

Возвращает: 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
tenantIdstringpathДа
urlIdstringqueryДа
usernameStartsWithstringqueryНет
mentionGroupIdsarrayqueryНет
ssostringqueryНет
searchSectionstringqueryНет

Ответ

Возвращает: 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

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

ИмяТипРасположениеОбязательноОписание
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

Параметры

NameTypeLocationRequiredDescription
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

Параметры

ИмяТипРасположениеОбязательноОписание
tenantIdstringqueryДа
urlIdstringqueryДа

Ответ

Возвращает: 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" // string |
13 urlId := "urlId_example" // string |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetVotes(context.Background()).TenantId(tenantId).UrlId(urlId).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetVotes``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // ответ от `GetVotes`: GetVotesResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetVotes`: %v\n", resp)
24}
25

Получить голоса пользователя Internal Link

Параметры

ИмяТипРасположениеОбязательноОписание
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 // ответ от `GetVotesForUser`: GetVotesForUserResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetVotesForUser`: %v\n", resp)
26}
27

Нужна помощь?

Если вы столкнетесь с какими-либо проблемами или у вас возникнут вопросы по Go SDK, пожалуйста:

Вклад

Вклады приветствуются! Пожалуйста, посетите репозиторий на GitHub для руководства по внесению вклада.