FastComments.com

FastComments Go SDK


Това е официалният Go SDK за FastComments.

Официален Go SDK за FastComments API

Репозитория

Преглед в GitHub


Инсталиране Internal Link

go get github.com/fastcomments/fastcomments-go

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

Публичен API (Без удостоверяване)

PublicAPI позволява неавтентициран достъп до публичните крайни точки:

package main

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

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

    // Get comments using PublicAPI
    response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
        context.Background(),
        "your-tenant-id",
    ).UrlId("your-page-url-id").Execute()

    if err != nil {
        panic(err)
    }

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

По подразбиране API (Изисква API ключ)

DefaultAPI изисква удостоверяване с вашия API ключ:

package main

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

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

    // Create authenticated context with API key
    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)
}

Модерационен API (Табло за модератори)

ModerationAPI предоставя обширен набор от живи и бързи модерационни API-та. Всички модерационни методи приемат параметър sso и могат да се удостоверяват чрез SSO или cookie сесия на FastComments.com:

package main

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

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

    // List comments for moderation using 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() {
    // Създаване на защитен 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
tenantIdstringqueryДа
parentTenantIdstringqueryНе
includeStatsbooleanqueryНе

Отговор

Връща: AggregateResponse

Пример

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

Получаване на одитни записи Internal Link

Параметри

NameTypeLocationRequiredDescription
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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
commentIdstringpathДа
ssostringqueryНе

Response

Връща: UnblockSuccess

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
commentIdsstringqueryДаСписък с идентификатори на коментари, разделени със запетаи.
ssostringqueryНе

Отговор

Връща: CheckBlockedCommentsResponse

Пример

Пример за CheckedCommentsForBlocked
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentIds := "commentIds_example" // string | Списък с идентификатори на коментари, разделени със запетаи.
14 sso := "sso_example" // string | (по избор)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.PublicAPI.CheckedCommentsForBlocked(context.Background()).TenantId(tenantId).CommentIds(commentIds).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.CheckedCommentsForBlocked``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // отговор от `CheckedCommentsForBlocked`: CheckBlockedCommentsResponse
24 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.CheckedCommentsForBlocked`: %v\n", resp)
25}
26

Блокиране на потребител от коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНе
anonUserIdstringqueryНе

Отговор

Връща: BlockSuccess

Пример

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

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

Параметри

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

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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

ИмеТипLocationЗадължителноОписание
tenantIdstringpathДа
commentIdstringpathДа
voteIdstringpathДа
urlIdstringqueryДа
broadcastIdstringqueryДа
editKeystringqueryНе
ssostringqueryНе

Отговор

Връща: VoteDeleteResponse

Пример

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

Докладване на коментар Internal Link

Параметри

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

Отговор

Връща: FlagCommentResponse

Пример

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

Получаване на коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: APIGetCommentResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
pageintegerqueryНе
limitintegerqueryНе
skipintegerqueryНе
asTreebooleanqueryНе
skipChildrenintegerqueryНе
limitChildrenintegerqueryНе
maxTreeDepthintegerqueryНе
urlIdstringqueryНе
userIdstringqueryНе
anonUserIdstringqueryНе
contextUserIdstringqueryНе
hashTagstringqueryНе
parentIdstringqueryНе
directionstringqueryНе
fromDateintegerqueryНе
toDateintegerqueryНе

Отговор

Връща: APIGetCommentsResponse

Пример

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

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

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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathДа
commentIdstringpathДа
editKeystringqueryНе
ssostringqueryНе

Отговор

Връща: PublicAPIGetCommentTextResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathДа
commentIdstringpathДа
dirintegerqueryДа
ssostringqueryНе

Отговор

Връща: GetCommentVoteUserNamesSuccessResponse

Пример

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

Заключване на коментар Internal Link

Параметри

NameTypeLocationRequiredDescription
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

Parameters

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

Response

Връща: ChangeCommentPinStatusResponse

Example

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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
isLivebooleanqueryНе
doSpamCheckbooleanqueryНе
sendEmailsbooleanqueryНе
populateNotificationsbooleanqueryНе

Отговор

Връща: APISaveCommentResponse

Пример

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

Масово запазване на коментари Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
isLivebooleanqueryНе
doSpamCheckbooleanqueryНе
sendEmailsbooleanqueryНе
populateNotificationsbooleanqueryНе

Отговор

Връща: []SaveCommentsBulkResponse

Пример

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

Задаване на текст на коментар Internal Link

Параметри

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

Отговор

Връща: PublicAPISetCommentTextResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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 // response from `UnBlockUserFromComment`: UnblockSuccess
26 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UnBlockUserFromComment`: %v\n", resp)
27}
28

Премахване на доклад за коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНе
anonUserIdstringqueryНе

Отговор

Връща: 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 // response from `UnFlagComment`: FlagCommentResponse
25 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.UnFlagComment`: %v\n", resp)
26}
27

Отключване на коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

Отговор

Връща: 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

Параметри

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

Отговор

Връща: ChangeCommentPinStatusResponse

Пример

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

Актуализиране на коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
contextUserIdstringqueryНе
doSpamCheckbooleanqueryНе
isLivebooleanqueryНе

Отговор

Връща: APIEmptyResponse

Пример

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

Гласуване за коментар Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathДа
commentIdstringpathДа
urlIdstringqueryДа
broadcastIdstringqueryДа
sessionIdstringqueryНе
ssostringqueryНе

Отговор

Връща: VoteResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
domainstringpathДа

Отговор

Връща: DeleteDomainConfigResponse

Пример

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

Получаване на конфигурация на домейн Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
domainstringpathДа

Отговор

Връща: GetDomainConfigResponse

Пример

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

Получаване на конфигурации на домейн Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа

Отговор

Връща: GetDomainConfigsResponse

Пример

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

Промяна на конфигурация на домейн (PATCH) Internal Link

Parameters

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
domainToUpdatestringpathДа

Отговор

Връща: PatchDomainConfigResponse

Пример

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

Замяна/създаване на конфигурация на домейн (PUT) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
domainToUpdatestringpathДа

Отговор

Връща: PutDomainConfigResponse

Пример

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

Създаване на имейл шаблон Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа

Отговор

Връща: CreateEmailTemplateResponse

Пример

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

Изтриване на имейл шаблон Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: APIEmptyResponse

Пример

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

Изтриване на грешка при рендериране на имейл шаблон Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
errorIdstringpathДа

Отговор

Връща: APIEmptyResponse

Пример

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

Получаване на имейл шаблон Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: GetEmailTemplateResponse

Пример

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

Получаване на дефиниции на имейл шаблони Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа

Отговор

Връща: GetEmailTemplateDefinitionsResponse

Пример

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

Получаване на грешки при рендериране на имейл шаблони Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
skipnumberqueryНе

Отговор

Връща: GetEmailTemplateRenderErrorsResponse

Пример

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

Получаване на имейл шаблони Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
broadcastIdstringqueryНе
isLivebooleanqueryНе
doSpamCheckbooleanqueryНе
skipDupCheckbooleanqueryНе

Отговор

Връща: CreateFeedPostsResponse

Пример

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

Създаване на публикация във фийда (публично) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathДа
broadcastIdstringqueryНе
ssostringqueryНе

Отговор

Връща: CreateFeedPostResponse

Пример

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

Изтриване на публикация във фийда (публично) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathYes
postIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: 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


Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathYes
postIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: 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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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
tenantIdstringpathДа
largeInternalURLSanitizedstringqueryДа

Отговор

Връща: GifGetLargeResponse

Пример

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

Търсене на GIF Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathДа
searchstringqueryДа
localestringqueryНе
ratingstringqueryНе
pagenumberqueryНе

Отговор

Връща: GetGifsSearchResponse

Пример

Пример за GetGifsSearch
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 search := "search_example" // string |
14 locale := "locale_example" // string | (по избор)
15 rating := "rating_example" // string | (по избор)
16 page := float64(1.2) // float64 | (по избор)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.PublicAPI.GetGifsSearch(context.Background(), tenantId).Search(search).Locale(locale).Rating(rating).Page(page).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetGifsSearch``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // отговор от `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, "Error when calling `DefaultAPI.AddHashTag``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // отговор от `AddHashTag`: CreateHashTagResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AddHashTag`: %v\n", resp)
24}
25

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes

Отговор

Връща: BulkCreateHashTagsResponse

Пример

Пример за AddHashTagsBulk
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 bulkCreateHashTagsBody := *openapiclient.NewBulkCreateHashTagsBody([]openapiclient.BulkCreateHashTagsBodyTagsInner{*openapiclient.NewBulkCreateHashTagsBodyTagsInner("Tag_example")}) // BulkCreateHashTagsBody | (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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
tagstringpathДа

Отговор

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

Получаване на хаштагове Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
pagenumberqueryНе

Отговор

Връща: GetHashTagsResponse

Пример

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

Промяна на хаштаг (PATCH) 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" // низ |
13 tag := "tag_example" // низ |
14 updateHashTagBody := *openapiclient.NewUpdateHashTagBody() // UpdateHashTagBody | (по избор)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.DefaultAPI.PatchHashTag(context.Background(), tag).TenantId(tenantId).UpdateHashTagBody(updateHashTagBody).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchHashTag``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // отговор от `PatchHashTag`: UpdateHashTagResponse
24 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchHashTag`: %v\n", resp)
25}
26

Изтриване на глас за модерация Internal Link

Параметри

ИмеТипLocationЗадължителноОписание
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" // string |
13 commentId := "commentId_example" // string |
14 voteId := "voteId_example" // string |
15 broadcastId := "broadcastId_example" // string | (по избор)
16 sso := "sso_example" // string | (по избор)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.DeleteModerationVote(context.Background(), commentId, voteId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Грешка при извикване на `ModerationAPI.DeleteModerationVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Пълен HTTP отговор: %v\n", r)
24 }
25 // отговор от `DeleteModerationVote`: VoteDeleteResponse
26 fmt.Fprintf(os.Stdout, "Отговор от `ModerationAPI.DeleteModerationVote`: %v\n", resp)
27}
28

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

Parameters

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
pagenumberqueryNo
countnumberqueryNo
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
sortsstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Response

Връща: ModerationAPIGetCommentsResponse

Example

Пример за GetApiComments
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 page := float64(1.2) // float64 | (по избор)
14 count := float64(1.2) // float64 | (по избор)
15 textSearch := "textSearch_example" // string | (по избор)
16 byIPFromComment := "byIPFromComment_example" // string | (по избор)
17 filters := "filters_example" // string | (по избор)
18 searchFilters := "searchFilters_example" // string | (по избор)
19 sorts := "sorts_example" // string | (по избор)
20 demo := true // bool | (по избор)
21 sso := "sso_example" // string | (по избор)
22
23 configuration := openapiclient.NewConfiguration()
24 apiClient := openapiclient.NewAPIClient(configuration)
25 resp, r, err := apiClient.ModerationAPI.GetApiComments(context.Background()).TenantId(tenantId).Page(page).Count(count).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filters(filters).SearchFilters(searchFilters).Sorts(sorts).Demo(demo).Sso(sso).Execute()
26 if err != nil {
27 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetApiComments``: %v\n", err)
28 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
29 }
30 // отговор от `GetApiComments`: ModerationAPIGetCommentsResponse
31 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetApiComments`: %v\n", resp)
32}
33

Получаване на статус на API експорта Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
batchJobIdstringqueryНе
ssostringqueryНе

Отговор

Връща: 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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
afterIdstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Response

Връща: ModerationAPIGetCommentIdsResponse

Example

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Отговор

Връща: GetBannedUsersFromCommentResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Отговор

Връща: GetCommentBanStatusResponse

Пример

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

Получаване на деца на коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
text-searchstringqueryНе
byIPFromCommentstringqueryНе
filterstringqueryНе
searchFiltersstringqueryНе
demobooleanqueryНе
ssostringqueryНе

Отговор

Връща: ModerationAPICountCommentsResponse

Пример

GetCount Пример
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 textSearch := "textSearch_example" // string | (по избор)
14 byIPFromComment := "byIPFromComment_example" // string | (по избор)
15 filter := "filter_example" // string | (по избор)
16 searchFilters := "searchFilters_example" // string | (по избор)
17 demo := true // bool | (по избор)
18 sso := "sso_example" // string | (по избор)
19
20 configuration := openapiclient.NewConfiguration()
21 apiClient := openapiclient.NewAPIClient(configuration)
22 resp, r, err := apiClient.ModerationAPI.GetCount(context.Background()).TenantId(tenantId).TextSearch(textSearch).ByIPFromComment(byIPFromComment).Filter(filter).SearchFilters(searchFilters).Demo(demo).Sso(sso).Execute()
23 if err != nil {
24 fmt.Fprintf(os.Stderr, "Грешка при извикване `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, "Error when calling `ModerationAPI.GetCounts``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // отговор от `GetCounts`: GetBannedUsersCountResponse
23 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetCounts`: %v\n", resp)
24}
25

Получаване на логове Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Отговор

Връща: ModerationAPIGetLogsResponse

Пример

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

Получаване на ръчни значки Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
ssostringqueryНе

Отговор

Връща: GetTenantManualBadgesResponse

Пример

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

Получаване на ръчни значки за потребител Internal Link

Параметри

ИмеТипМестоположениеЗадължителенОписание
tenantIdstringqueryДа
badgesUserIdstringqueryНе
commentIdstringqueryНе
ssostringqueryНе

Отговор

Връща: 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, "Грешка при извикване на `ModerationAPI.GetManualBadgesForUser``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Пълен HTTP отговор: %v\n", r)
23 }
24 // отговор от `GetManualBadgesForUser`: GetUserManualBadgesResponse
25 fmt.Fprintf(os.Stdout, "Отговор от `ModerationAPI.GetManualBadgesForUser`: %v\n", resp)
26}
27

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

Parameters

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringзапитванеДа
commentIdstringпътДа
includeEmailbooleanзапитванеНе
includeIPbooleanзапитванеНе
ssostringзапитванеНе

Response

Returns: ModerationAPICommentResponse

Example

Пример за 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 | (по избор)
15 includeIP := true // bool | (по избор)
16 sso := "sso_example" // string | (по избор)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.GetModerationComment(context.Background(), commentId).TenantId(tenantId).IncludeEmail(includeEmail).IncludeIP(includeIP).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetModerationComment``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // отговор от `GetModerationComment`: ModerationAPICommentResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetModerationComment`: %v\n", resp)
27}
28

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Отговор

Връща: GetCommentTextResponse

Пример

Пример за GetModerationCommentText
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 sso := "sso_example" // string | (по избор)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetModerationCommentText(context.Background(), commentId).TenantId(tenantId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetModerationCommentText``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // Отговор от `GetModerationCommentText`: GetCommentTextResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetModerationCommentText`: %v\n", resp)
25}
26

Получаване на предварителен обобщен бан Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
includeByUserIdAndEmailbooleanqueryNo
includeByIPbooleanqueryNo
includeByEmailDomainbooleanqueryNo
ssostringqueryNo

Отговор

Връща: PreBanSummary

Пример

GetPreBanSummary пример
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 includeByUserIdAndEmail := true // bool | (optional)
15 includeByIP := true // bool | (optional)
16 includeByEmailDomain := true // bool | (optional)
17 sso := "sso_example" // string | (optional)
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(sgo).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 // response from `GetPreBanSummary`: PreBanSummary
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetPreBanSummary`: %v\n", resp)
28}
29

Получаване на обобщение на търсене на коментари Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
valuestringqueryНе
filtersstringqueryНе
searchFiltersstringqueryНе
ssostringqueryНе

Отговор

Връща: ModerationCommentSearchResponse

Пример

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

Получаване на резултати за търсене на страници Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
valuestringqueryНе
ssostringqueryНе

Отговор

Returns: ModerationPageSearchResponse

Пример

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

Получаване на резултати за търсене на сайтове Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
valuestringqueryНе
ssostringqueryНе

Отговор

Връща: 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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
text-searchstringqueryNo
ssostringqueryNo

Отговор

Връща: ModerationSuggestResponse

Пример

GetSearchSuggest Пример
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 textSearch := "textSearch_example" // string | (по избор)
14 sso := "sso_example" // string | (по избор)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.GetSearchSuggest(context.Background()).TenantId(tenantId).TextSearch(textSearch).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.GetSearchSuggest``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // отговор от `GetSearchSuggest`: ModerationSuggestResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.GetSearchSuggest`: %v\n", resp)
25}
26

Получаване на резултати за търсене на потребители Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
valuestringqueryНе
ssostringqueryНе

Отговор

Връща: 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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringqueryNo
ssostringqueryNo

Отговор

Връща: GetUserInternalProfileResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: AdjustVotesResponse

Пример

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

Стартиране на API експорт Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
sortsstringqueryNo
ssostringqueryNo

Отговор

Връща: 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, "Отговор от `ModerationAPI.PostApiExport`: %v\n", resp)
29}
30

Блокиране на потребител от коментар (POST) 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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
includeByUserIdAndEmailbooleanqueryNo
includeByIPbooleanqueryNo
includeByEmailDomainbooleanqueryNo
ssostringqueryNo

Отговор

Връща: BulkPreBanSummary

Пример

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

Получаване на коментари по идентификатори (POST) 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

Докладване на коментар (POST) Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: APIEmptyResponse

Пример

PostFlagComment Пример
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // 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

Премахване на коментар (POST) Internal Link

Parameters

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: PostRemoveCommentApiResponse

Пример

PostRemoveComment Пример
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 broadcastId := "broadcastId_example" // string | (по избор)
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, "Error when calling `ModerationAPI.PostRemoveComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // отговор от `PostRemoveComment`: PostRemoveCommentApiResponse
25 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostRemoveComment`: %v\n", resp)
26}
27

Възстановяване на изтрит коментар (POST) Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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" // низ |
13 commentId := "commentId_example" // низ |
14 broadcastId := "broadcastId_example" // низ | (по избор)
15 sso := "sso_example" // низ | (по избор)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.ModerationAPI.PostRestoreDeletedComment(context.Background(), commentId).TenantId(tenantId).BroadcastId(broadcastId).Sso(sso).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostRestoreDeletedComment``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // response from `PostRestoreDeletedComment`: APIEmptyResponse
25 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, "Error when calling `ModerationAPI.PostSetCommentApprovalStatus``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // отговор от `PostSetCommentApprovalStatus`: SetCommentApprovedResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentApprovalStatus`: %v\n", resp)
27}
28

Задаване на статус на преглед на коментар Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
reviewedbooleanqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: 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" // string |
13 commentId := "commentId_example" // string |
14 reviewed := 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.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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
commentIdstringpathДа
spambooleanqueryНе
permNotSpambooleanqueryНе
broadcastIdstringqueryНе
ssostringqueryНе

Отговор

Връща: APIEmptyResponse

Пример

Пример за PostSetCommentSpamStatus
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 spam := true // bool | (по избор)
15 permNotSpam := true // bool | (по избор)
16 broadcastId := "broadcastId_example" // string | (по избор)
17 sso := "sso_example" // string | (по избор)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.ModerationAPI.PostSetCommentSpamStatus(context.Background(), commentId).TenantId(tenantId).Spam(spam).PermNotSpam(permNotSpam).BroadcastId(broadcastId).Sso(sso).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Грешка при извикване на `ModerationAPI.PostSetCommentSpamStatus``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Пълен HTTP отговор: %v\n", r)
25 }
26 // отговор от `PostSetCommentSpamStatus`: APIEmptyResponse
27 fmt.Fprintf(os.Stdout, "Отговор от `ModerationAPI.PostSetCommentSpamStatus`: %v\n", resp)
28}
29

Задаване на текст на коментар (POST) Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Response

Returns: SetCommentTextResponse

Example

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 | (optional)
16 sso := "sso_example" // string | (optional)
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 // response from `PostSetCommentText`: SetCommentTextResponse
26 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostSetCommentText`: %v\n", resp)
27}
28

Премахване на доклад за коментар (POST) Internal Link

Parameters

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

Response

Returns: APIEmptyResponse

Example

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

Гласуване (POST) Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
commentIdstringpathYes
directionstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

Връща: VoteResponse

Пример

PostVote Пример
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 commentId := "commentId_example" // string |
14 direction := "direction_example" // string | (по избор)
15 broadcastId := "broadcastId_example" // string | (по избор)
16 sso := "sso_example" // string | (по избор)
17
18 configuration := openapiclient.NewConfiguration()
19 apiClient := openapiclient.NewAPIClient(configuration)
20 resp, r, err := apiClient.ModerationAPI.PostVote(context.Background(), commentId).TenantId(tenantId).Direction(direction).BroadcastId(broadcastId).Sso(sso).Execute()
21 if err != nil {
22 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PostVote``: %v\n", err)
23 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
24 }
25 // response from `PostVote`: VoteResponse
26 // отговор от `PostVote`: VoteResponse
27 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PostVote`: %v\n", resp)
28}
29

Даване на значка Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Response

Returns: AwardUserBadgeResponse

Example

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

Затваряне на нишка Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
urlIdstringqueryДа
ssostringqueryНе

Отговор

Връща: APIEmptyResponse

Пример

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

Премахване на значка Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

Отговор

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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" // string |
13 urlId := "urlId_example" // string |
14 sso := "sso_example" // string | (по избор)
15
16 configuration := openapiclient.NewConfiguration()
17 apiClient := openapiclient.NewAPIClient(configuration)
18 resp, r, err := apiClient.ModerationAPI.PutReopenThread(context.Background()).TenantId(tenantId).UrlId(urlId).Sso(sso).Execute()
19 if err != nil {
20 fmt.Fprintf(os.Stderr, "Error when calling `ModerationAPI.PutReopenThread``: %v\n", err)
21 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
22 }
23 // отговор от `PutReopenThread`: APIEmptyResponse
24 fmt.Fprintf(os.Stdout, "Response from `ModerationAPI.PutReopenThread`: %v\n", resp)
25}
26

Задаване на фактор на доверие Internal Link

Параметри

ИмеТипЛокацияЗадължителноОписание
tenantIdstringqueryДа
userIdstringqueryНе
trustFactorstringqueryНе
ssostringqueryНе

Отговор

Връща: SetUserTrustFactorResponse

Пример

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

Създаване на модератор Internal Link


Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа

Отговор

Връща: CreateModeratorResponse

Пример

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

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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes
sendEmailstringqueryNo

Отговор

Връща: APIEmptyResponse

Пример

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

Получаване на модератор Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: GetModeratorResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
skipnumberqueryНе

Отговор

Връща: GetModeratorsResponse

Пример

Пример за GetModerators
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 skip := float64(1.2) // float64 | (по избор)
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.GetModerators(context.Background()).TenantId(tenantId).Skip(skip).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetModerators``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // отговор от `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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: APIEmptyResponse

Пример

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

Изтриване на брой известия Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
userIdstringqueryНе
urlIdstringqueryНе
fromCommentIdstringqueryНе
viewedbooleanqueryНе
typestringqueryНе

Отговор

Връща: GetNotificationCountResponse

Пример

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

Получаване на известия Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
userIdstringqueryНе
urlIdstringqueryНе
fromCommentIdstringqueryНе
viewedbooleanqueryНе
typestringqueryНе
skipnumberqueryНе

Отговор

Връща: GetNotificationsResponse

Пример

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

Актуализиране на известие Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНе

Отговор

Връща: APIEmptyResponse

Пример

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

Създаване на реакция на страница V1 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringпътДа
urlIdstringзаявкаДа
titlestringзаявкаНе

Отговор

Връща: 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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathДа
urlIdstringqueryДа
idstringqueryДа
titlestringqueryНе

Отговор

Връща: 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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathДа
urlIdstringqueryДа

Отговор

Връща: GetV1PageLikes

Пример

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

Получаване на реакции на страница V2 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathДа
urlIdstringqueryДа

Отговор

Връща: GetV2PageReacts

Пример

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

Получаване на потребители, реагирали на страница V2 Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringpathДа
urlIdstringqueryДа
idstringqueryДа

Отговор

Връща: GetV2PageReactUsersResponse

Пример

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

Добавяне на страница Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа

Отговор

Връща: 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.

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathДа
urlIdstringqueryДаИдентификатор на URL адреса на страницата (изчистен от сървъра).
afterNamestringqueryНеКурсор: подайте nextAfterName от предишния отговор.
afterUserIdstringqueryНеКурсорен критерий за равенство: подайте 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 (абонати в рамките на стаята, включително анонимни зрители, които не изброяваме).

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Получаване на страница по URLId 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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes

Отговор

Връща: 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
tenantIdstringpathYes
cursorstringqueryNoНепрозрачен курсор за страниране, върнат като nextCursor от предишна заявка. Свързан със същия sortBy.
limitintegerqueryNo1..200, по подразбиране 50
qstringqueryNoНезадължителен филтър за префикс на заглавието, нечувствителен към регистър.
sortBystringqueryNoРед на сортиране. updatedAt (по подразбиране, най-новите първи), commentCount (първо най-много коментари), или title (азбучно).
hasCommentsbooleanqueryNoАко е true, връща само страници с поне един коментар.

Отговор

Връща: GetPublicPagesResponse

Пример

Пример GetPagesPublic
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 cursor := "cursor_example" // string | Непрозрачен курсор за страниране, върнат като `nextCursor` от предишна заявка. Свързан със същия `sortBy`. (по избор)
14 limit := int32(56) // int32 | 1..200, по подразбиране 50 (по избор)
15 q := "q_example" // string | Незадължителен филтър за префикс на заглавието, нечувствителен към регистър. (по избор)
16 sortBy := openapiclient.PagesSortBy("updatedAt") // PagesSortBy | Ред на сортиране. `updatedAt` (по подразбиране, най-новите първи), `commentCount` (първо най-много коментари), или `title` (азбучно). (по избор)
17 hasComments := true // bool | Ако е true, връща само страници с поне един коментар. (по избор)
18
19 configuration := openapiclient.NewConfiguration()
20 apiClient := openapiclient.NewAPIClient(configuration)
21 resp, r, err := apiClient.PublicAPI.GetPagesPublic(context.Background(), tenantId).Cursor(cursor).Limit(limit).Q(q).SortBy(sortBy).HasComments(hasComments).Execute()
22 if err != nil {
23 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetPagesPublic``: %v\n", err)
24 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
25 }
26 // отговор от `GetPagesPublic`: GetPublicPagesResponse
27 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetPagesPublic`: %v\n", resp)
28}
29

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

Пакетна информация за потребители за един наемател. За дадени userIds връща информация за показване от User / SSOUser. Използва се от widget-а за коментари, за да обогати потребители, които току-що се появиха чрез събитие за присъствие. Няма контекст на страницата: поверителността се прилага еднакво (личните профили са скрити).

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringpathYes
idsstringqueryYesuserIds, разделени със запетая.

Отговор

Връща: 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

Промяна на страница (PATCH) Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: PatchPageAPIResponse

Пример

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

Изтриване на очакващо 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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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" // string |
13 createQuestionResultBody := *openapiclient.NewCreateQuestionResultBody("UrlId_example", float64(123), "QuestionId_example") // CreateQuestionResultBody |
14
15 configuration := openapiclient.NewConfiguration()
16 apiClient := openapiclient.NewAPIClient(configuration)
17 resp, r, err := apiClient.DefaultAPI.CreateQuestionResult(context.Background()).TenantId(tenantId).CreateQuestionResultBody(createQuestionResultBody).Execute()
18 if err != nil {
19 fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateQuestionResult``: %v\n", err)
20 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
21 }
22 // отговор от `CreateQuestionResult`: CreateQuestionResultResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateQuestionResult`: %v\n", resp)
24}
25

Изтриване на резултат от въпрос Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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
tenantIdstringqueryДа
urlIdstringqueryНе
userIdstringqueryНе
startDatestringqueryНе
questionIdstringqueryНе
questionIdsstringqueryНе
skipnumberqueryНе

Отговор

Връща: GetQuestionResultsResponse

Пример

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

Актуализиране на резултат от въпрос Internal Link

Параметри

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

Агрегиране на резултати от въпроси Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
questionIdstringqueryНе
questionIdsarrayqueryНе
urlIdstringqueryНе
timeBucketstringqueryНе
startDatestringqueryНе
forceRecalculatebooleanqueryНе

Отговор

Връща: AggregateQuestionResultsResponse

Пример

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

Масово агрегиране на резултати от въпроси Internal Link


Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
forceRecalculatebooleanqueryНе

Отговор

Връща: BulkAggregateQuestionResultsResponse

Пример

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

Комбиниране на коментари с резултати от въпроси Internal Link

Параметри

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

Получаване на SSO потребител по имейл Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
emailstringpathДа

Отговор

Връща: GetSSOUserByEmailAPIResponse

Пример

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

Получаване на SSO потребител по идентификатор Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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 // response from `GetSSOUserById`: GetSSOUserByIdAPIResponse
23 fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetSSOUserById`: %v\n", resp)
24}
25

Получаване на SSO потребители Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
skipintegerqueryНе

Response

Връща: 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 потребител (PATCH) 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 потребител (PUT) Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
updateCommentsbooleanqueryНе

Отговор

Връща: PutSSOUserAPIResponse

Пример

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

Създаване на абонамент Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа

Отговор

Връща: CreateSubscriptionAPIResponse

Пример

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

Изтриване на абонамент Internal Link

Параметри

ИмеТипЛокацияЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНе

Отговор

Връща: DeleteSubscriptionAPIResponse

Пример

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

Получаване на абонаменти Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
userIdstringqueryНе

Отговор

Връща: GetSubscriptionsAPIResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНе

Отговор

Връща: UpdateSubscriptionAPIResponse

Пример

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

Получаване на дневна употреба на наемателя Internal Link

Параметри

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

Създаване на пакет за наемателя Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа

Отговор

Връща: CreateTenantPackageResponse

Пример

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

Изтриване на пакет на наемателя Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: APIEmptyResponse

Пример

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

Получаване на пакет на наемателя Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: GetTenantPackageResponse

Пример

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

Получаване на пакети на наемателя Internal Link


Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
skipnumberqueryНе

Отговор

Връща: GetTenantPackagesResponse

Пример

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

Замяна на пакет на наемателя Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

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

Изтриване на потребител на наемателя Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
idstringpathДа
deleteCommentsstringqueryНе
commentDeleteModestringqueryНе

Отговор

Връща: APIEmptyResponse

Пример

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

Получаване на потребител на наемателя Internal Link


Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: GetTenantUserResponse

Пример

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

Получаване на потребители на наемателя Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
updateCommentsstringqueryНе

Отговор

Връща: APIEmptyResponse

Пример

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

Създаване на наемател Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа

Отговор

Връща: CreateTenantResponse

Пример

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

Изтриване на наемател Internal Link

Параметри

ИмеТипLocationЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
surestringqueryНе

Отговор

Връща: APIEmptyResponse

Пример

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

Получаване на наемател Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: GetTenantResponse

Пример

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

Получаване на наематели Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
metastringqueryНе
skipnumberqueryНе

Отговор

Връща: GetTenantsResponse

Пример

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

Актуализиране на наемател Internal Link

Параметри

NameTypeLocationRequiredDescription
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
userIdstringqueryНе

Отговор

Връща: GetTicketResponse

Пример

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

Получаване на билети Internal Link

Параметри

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

Връща

Returns: GetTicketsResponse

Пример

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

Получаване на преводи Internal Link


Параметри

ИмеТипМестоположениеЗадължителноОписание
namespacestringpathДа
componentstringpathДа
localestringqueryНе
useFullTranslationIdsbooleanqueryНе

Отговор

Връща: GetTranslationsResponse

Пример

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

Качване на изображение Internal Link

Качване и преоразмеряване на изображение

Параметри

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

Отговор

Връща: UploadImageResponse

Пример

Пример за UploadImage
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 file := os.NewFile(1234, "some_file") // *os.File |
14 sizePreset := openapiclient.SizePreset("Default") // SizePreset | Преднастройка на размера: \"Default\" (1000x1000px) или \"CrossPlatform\" (създава размери за популярни устройства) (по избор)
15 urlId := "urlId_example" // string | Идентификатор на страницата, от която се прави качването, за конфигуриране (по избор)
16
17 configuration := openapiclient.NewConfiguration()
18 apiClient := openapiclient.NewAPIClient(configuration)
19 resp, r, err := apiClient.PublicAPI.UploadImage(context.Background(), tenantId).File(file).SizePreset(sizePreset).UrlId(urlId).Execute()
20 if err != nil {
21 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.UploadImage``: %v\n", err)
22 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
23 }
24 // отговор от `UploadImage`: UploadImageResponse
25 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.UploadImage`: %v\n", resp)
26}
27

Получаване на прогрес за значка на потребител по идентификатор Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
idstringpathYes

Отговор

Връща: APIGetUserBadgeProgressResponse

Пример

GetUserBadgeProgressById Example
Copy Copy
1
2package main
3
4import (
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

Получаване на прогрес за значка на потребител по потребителски идентификатор Internal Link

Parameters

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа

Отговор

Връща: APICreateUserBadgeResponse

Пример

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

Изтриване на значка за потребител Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа

Отговор

Връща: APIEmptySuccessResponse

Пример

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

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryYes
idstringpathYes

Отговор

Връща: 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

Параметри

NameTypeLocationRequiredDescription
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

Параметри

ИмеТипЛокацияЗадължителноОписание
tenantIdstringqueryДа
ssostringqueryНе

Отговор

Връща: GetUserNotificationCountResponse

Пример

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

Получаване на известия за потребител Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
urlIdstringqueryНеИзползва се, за да се определи дали текущата страница е абонирана.
pageSizeintegerqueryНе
afterIdstringqueryНе
includeContextbooleanqueryНе
afterCreatedAtintegerqueryНе
unreadOnlybooleanqueryНе
dmOnlybooleanqueryНе
noDmbooleanqueryНе
includeTranslationsbooleanqueryНе
includeTenantNotificationsbooleanqueryНе
ssostringqueryНе

Отговор

Връща: GetMyNotificationsResponse

Пример

Пример за GetUserNotifications
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // string |
13 urlId := "urlId_example" // string | Използва се, за да се определи дали текущата страница е абонирана. (по избор)
14 pageSize := int32(56) // int32 | (по избор)
15 afterId := "afterId_example" // string | (по избор)
16 includeContext := true // bool | (по избор)
17 afterCreatedAt := int64(789) // int64 | (по избор)
18 unreadOnly := true // bool | (по избор)
19 dmOnly := true // bool | (по избор)
20 noDm := true // bool | (по избор)
21 includeTranslations := true // bool | (по избор)
22 includeTenantNotifications := true // bool | (по избор)
23 sso := "sso_example" // string | (по избор)
24
25 configuration := openapiclient.NewConfiguration()
26 apiClient := openapiclient.NewAPIClient(configuration)
27 resp, r, err := apiClient.PublicAPI.GetUserNotifications(context.Background()).TenantId(tenantId).UrlId(urlId).PageSize(pageSize).AfterId(afterId).IncludeContext(includeContext).AfterCreatedAt(afterCreatedAt).UnreadOnly(unreadOnly).DmOnly(dmOnly).NoDm(noDm).IncludeTranslations(includeTranslations).IncludeTenantNotifications(includeTenantNotifications).Sso(sso).Execute()
28 if err != nil {
29 fmt.Fprintf(os.Stderr, "Error when calling `PublicAPI.GetUserNotifications``: %v\n", err)
30 fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
31 }
32 // отговор от `GetUserNotifications`: GetMyNotificationsResponse
33 fmt.Fprintf(os.Stdout, "Response from `PublicAPI.GetUserNotifications`: %v\n", resp)
34}
35

Нулиране на брой известия за потребител Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
ssostringqueryНе

Отговор

Връща: ResetUserNotificationsResponse

Пример

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

Нулиране на известия за потребител Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
afterIdstringqueryНе
afterCreatedAtintegerqueryНе
unreadOnlybooleanqueryНе
dmOnlybooleanqueryНе
noDmbooleanqueryНе
ssostringqueryНе

Отговор

Връща: ResetUserNotificationsResponse

Пример

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

Актуализиране на статус на абонамент за коментари за потребител Internal Link

Активиране или деактивиране на известия за конкретен коментар.

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
notificationIdstringpathYes
optedInOrOutstringpathYes
commentIdstringqueryYes
ssostringqueryNo

Отговор

Връща: UpdateUserNotificationCommentSubscriptionStatusResponse

Пример

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

Актуализиране на статус на абонамент за страница за потребител Internal Link

Активиране или деактивиране на известия за страница. Когато потребителите са абонирани за страница, се създават известия за нови коренови коментари, и също

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
urlIdstringqueryДа
urlstringqueryДа
pageTitlestringqueryДа
subscribedOrUnsubscribedstringpathДа
ssostringqueryНе

Отговор

Връща: UpdateUserNotificationPageSubscriptionStatusResponse

Пример

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

Актуализиране на статус на известие за потребител Internal Link

Параметри

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

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
urlIdWSstringqueryДа
userIdsstringqueryДа

Отговор

Връща: GetUserPresenceStatusesResponse

Пример

Пример за GetUserPresenceStatuses
Copy Copy
1
2package main
3
4import (
5 "context"
6 "fmt"
7 "os"
8 openapiclient "github.com/fastcomments/fastcomments-go/client"
9)
10
11func main() {
12 tenantId := "tenantId_example" // низ |
13 urlIdWS := "urlIdWS_example" // низ |
14 userIds := "userIds_example" // низ |
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

Параметри

ИмеТипМестоположениеЗадължителноОписание
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

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes

Отговор

Връща: GetUserResponse

Пример

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

Създаване на глас Internal Link

Параметри

NameTypeLocationRequiredDescription
tenantIdstringqueryДа
commentIdstringqueryДа
directionstringqueryДа
userIdstringqueryНе
anonUserIdstringqueryНе

Отговор

Връща: VoteResponse

Пример

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

Изтриване на глас Internal Link

Параметри

ИмеТипМестоположениеЗадължителноОписание
tenantIdstringqueryДа
idstringpathДа
editKeystringqueryНе

Отговор

Връща: VoteDeleteResponse

Пример

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

Получаване на гласове Internal Link

Параметри

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

Нужда от помощ?

Ако срещнете проблеми или имате въпроси относно Go SDK, моля:

Принос

Приносите са добре дошли! Моля посетете репозитория в GitHub за указания относно приноса.