FastComments.com

FastComments Swift SDK

This is the official Swift SDK for FastComments.

Official Swift SDK for the FastComments API

Repository

View on GitHub

Installation Internal Link

Swift Package Manager

Add the following to your Package.swift file:

dependencies: [
    .package(url: "https://github.com/fastcomments/fastcomments-swift.git", from: "0.0.1")
]

Or in Xcode:

  1. File > Add Packages...
  2. Enter the repository URL: https://github.com/fastcomments/fastcomments-swift.git
  3. Select the version you want to use

Requirements

  • Swift 5.9+
  • iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+

Library Contents Internal Link

The FastComments Swift SDK consists of several modules:

  • Client Module - Auto-generated API client for FastComments REST APIs

    • Complete type definitions for all API models
    • Both authenticated (DefaultAPI) and public (PublicAPI) endpoints
    • Full async/await support
    • See client/README.md for detailed API documentation
  • SSO Module - Server-side Single Sign-On utilities

    • Secure token generation for user authentication
    • Support for both simple and secure SSO modes
    • HMAC-SHA256 based token signing using CryptoKit

Quick Start Internal Link

Using the Public API

import FastCommentsSwift

// Create API client
let publicApi = PublicAPI()

// Fetch comments for a page
do {
    let response = try await publicApi.getCommentsPublic(
        tenantId: "your-tenant-id",
        urlId: "page-url-id"
    )

    print("Found \(response.comments?.count ?? 0) comments")
    for comment in response.comments ?? [] {
        print("Comment: \(comment.comment ?? "")")
    }
} catch {
    print("Error fetching comments: \(error)")
}

Using the Authenticated API

import FastCommentsSwift

// Create configuration with API key
let defaultApi = DefaultAPI()
defaultApi.apiKey = "your-api-key"

// Fetch comments using authenticated API
do {
    let response = try await defaultApi.getComments(
        tenantId: "your-tenant-id",
        urlId: "page-url-id"
    )

    print("Total comments: \(response.count ?? 0)")
    for comment in response.comments ?? [] {
        print("Comment ID: \(comment.id ?? ""), Text: \(comment.comment ?? "")")
    }
} catch {
    print("Error: \(error)")
}

Using SSO for Authentication

import FastCommentsSwift

let apiKey = "your-api-key"

// Create secure SSO user data (server-side only!)
let userData = SecureSSOUserData(
    id: "user-123",              // User ID
    email: "user@example.com",   // Email
    username: "johndoe",         // Username
    avatar: "https://example.com/avatar.jpg" // Avatar URL
)

// Generate SSO token
do {
    let sso = try FastCommentsSSO.createSecure(apiKey: apiKey, secureSSOUserData: userData)
    let token = try sso.createToken()

    print("SSO Token: \(token ?? "")")
    // Pass this token to your frontend for authentication
} catch {
    print("Error creating SSO token: \(error)")
}

Simple SSO (For Development/Testing)

import FastCommentsSwift

// Create simple SSO user data (no API key needed)
let userData = SimpleSSOUserData(
    username: "johndoe",
    email: "user@example.com",
    avatar: "https://example.com/avatar.jpg"
)

// Generate simple SSO token
let sso = FastCommentsSSO.createSimple(simpleSSOUserData: userData)
do {
    let token = try sso.createToken()
    print("Simple SSO Token: \(token ?? "")")
} catch {
    print("Error creating SSO token: \(error)")
}

Public vs Secured APIs Internal Link

The FastComments SDK provides two types of API endpoints:

PublicAPI - Client-Safe Endpoints

The PublicAPI contains endpoints that are safe to call from client-side code (iOS/macOS apps). These endpoints:

  • Do not require an API key
  • Can use SSO tokens for authentication
  • Are rate-limited per user/device
  • Are suitable for end-user facing applications

Example use case: Fetching and creating comments in your iOS app

DefaultAPI - Server-Side Endpoints

The DefaultAPI contains authenticated endpoints that require an API key. These endpoints:

  • Require your FastComments API key
  • Should ONLY be called from server-side code
  • Provide full access to your FastComments data
  • Are rate-limited per tenant

Example use case: Administrative operations, bulk data export, moderation tools

IMPORTANT: Never expose your API key in client-side code. API keys should only be used server-side.

Making API Calls Internal Link

The Swift SDK uses modern async/await syntax for all API calls:

let response = try await publicApi.getCommentsPublic(
    tenantId: "your-tenant-id",
    urlId: "page-url-id"
)

Common Issues Internal Link

401 Unauthorized Errors

If you're getting 401 errors when using the authenticated API:

  1. Check your API key: Ensure you're using the correct API key from your FastComments dashboard
  2. Verify the tenant ID: Make sure the tenant ID matches your account
  3. API key format: The API key should be set on the API client:
let defaultApi = DefaultAPI()
defaultApi.apiKey = "YOUR_API_KEY"
  1. Using the wrong API: Make sure you're using DefaultAPI (not PublicAPI) for authenticated calls

SSO Token Issues

If SSO tokens aren't working:

  1. Use secure mode for production: Always use FastCommentsSSO.createSecure() with your API key for production
  2. Server-side only: Generate secure SSO tokens on your server, never expose your API key to clients
  3. Check user data: Ensure all required fields (id, email, username) are provided
  4. Token expiration: Secure SSO tokens include a timestamp and may expire. Generate fresh tokens as needed.

SSL/TLS Errors

If you encounter SSL/TLS errors:

  1. Ensure your app's Info.plist allows HTTPS connections to fastcomments.com
  2. Check that you're not using App Transport Security exceptions that might block the connection

Testing Internal Link

Running Unit Tests

Unit tests cover the SSO functionality:

swift test --filter SSOTests

Running Integration Tests

Integration tests require environment variables to be set:

export FASTCOMMENTS_API_KEY="your-api-key"
export FASTCOMMENTS_TENANT_ID="your-tenant-id"
swift test --filter SSOIntegrationTests

Development Internal Link

Regenerating the Client

To regenerate the API client from the latest OpenAPI specification:

  1. Ensure you have the FastComments server running locally at http://localhost:3001
  2. Run the update script:
./update.sh

This will:

  • Download the latest OpenAPI spec
  • Generate the Swift client code (with API documentation in client/docs)
  • Build the package to verify everything works

Notes Internal Link

Broadcast IDs

You'll see you're supposed to pass a broadcastId in some API calls. When you receive events, you'll get this ID back, so you know to ignore the event if you plan to optimistically apply changes on the client (which you'll probably want to do since it offers the best experience). Pass a UUID here. The ID should be unique enough to not occur twice in a session.

let broadcastId = UUID().uuidString

Support Internal Link

For issues, questions, or feature requests:

aggregate Internal Link

Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations. Different operations (e.g. sum, countDistinct, avg, etc.) are supported.

Parameters

Name Type Location Required Description
tenantId string query Yes
parentTenantId string query No
includeStats boolean query No

Response

Returns: AggregationResponse

Example

aggregate Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let aggregationRequest = AggregationRequest(query: [QueryPredicate(key: "key_example", value: QueryPredicate_value(), _operator: "_operator_example")], resourceName: "resourceName_example", groupBy: ["groupBy_example"], operations: [AggregationOperation(field: "field_example", op: AggregationOpType(), alias: "alias_example", expandArray: false)], sort: AggregationRequest_sort(dir: "dir_example", field: "field_example")) // AggregationRequest |
7let parentTenantId = "parentTenantId_example" // String | (optional)
8let includeStats = true // Bool | (optional)
9
10DefaultAPI.aggregate(tenantId: tenantId, aggregationRequest: aggregationRequest, parentTenantId: parentTenantId, includeStats: includeStats) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getAuditLogs Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
limit number query No
skip number query No
order string query No
after number query No
before number query No

Response

Returns: GetAuditLogs200Response

Example

getAuditLogs Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let limit = 987 // Double | (optional)
7let skip = 987 // Double | (optional)
8let order = SORT_DIR() // SORTDIR | (optional)
9let after = 987 // Double | (optional)
10let before = 987 // Double | (optional)
11
12DefaultAPI.getAuditLogs(tenantId: tenantId, limit: limit, skip: skip, order: order, after: after, before: before) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

blockFromCommentPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
commentId string path Yes
sso string query No

Response

Returns: BlockFromCommentPublic200Response

Example

blockFromCommentPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let publicBlockFromCommentParams = PublicBlockFromCommentParams(commentIds: ["commentIds_example"]) // PublicBlockFromCommentParams |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.blockFromCommentPublic(tenantId: tenantId, commentId: commentId, publicBlockFromCommentParams: publicBlockFromCommentParams, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

unBlockCommentPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
commentId string path Yes
sso string query No

Response

Returns: UnBlockCommentPublic200Response

Example

unBlockCommentPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let publicBlockFromCommentParams = PublicBlockFromCommentParams(commentIds: ["commentIds_example"]) // PublicBlockFromCommentParams |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.unBlockCommentPublic(tenantId: tenantId, commentId: commentId, publicBlockFromCommentParams: publicBlockFromCommentParams, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

checkedCommentsForBlocked Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
commentIds string query Yes A comma separated list of comment ids.
sso string query No

Response

Returns: CheckedCommentsForBlocked200Response

Example

checkedCommentsForBlocked Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentIds = "commentIds_example" // String | A comma separated list of comment ids.
7let sso = "sso_example" // String | (optional)
8
9PublicAPI.checkedCommentsForBlocked(tenantId: tenantId, commentIds: commentIds, sso: sso) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

blockUserFromComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
userId string query No
anonUserId string query No

Response

Returns: BlockFromCommentPublic200Response

Example

blockUserFromComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let blockFromCommentParams = BlockFromCommentParams(commentIdsToCheck: ["commentIdsToCheck_example"]) // BlockFromCommentParams |
8let userId = "userId_example" // String | (optional)
9let anonUserId = "anonUserId_example" // String | (optional)
10
11DefaultAPI.blockUserFromComment(tenantId: tenantId, id: id, blockFromCommentParams: blockFromCommentParams, userId: userId, anonUserId: anonUserId) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

createCommentPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
urlId string query Yes
broadcastId string query Yes
sessionId string query No
sso string query No

Response

Returns: CreateCommentPublic200Response

Example

createCommentPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let commentData = CommentData(date: 123, localDateString: "localDateString_example", localDateHours: 123, commenterName: "commenterName_example", commenterEmail: "commenterEmail_example", commenterLink: "commenterLink_example", comment: "comment_example", productId: 123, userId: "userId_example", avatarSrc: "avatarSrc_example", parentId: "parentId_example", mentions: [CommentUserMentionInfo(id: "id_example", tag: "tag_example", rawTag: "rawTag_example", type: "type_example", sent: false)], hashTags: [CommentUserHashTagInfo(id: "id_example", tag: "tag_example", url: "url_example", retain: false)], pageTitle: "pageTitle_example", isFromMyAccountPage: false, url: "url_example", urlId: "urlId_example", meta: 123, moderationGroupIds: ["moderationGroupIds_example"], rating: 123, fromOfflineRestore: false, autoplayDelayMS: 123, feedbackIds: ["feedbackIds_example"], questionValues: "TODO") // CommentData |
9let sessionId = "sessionId_example" // String | (optional)
10let sso = "sso_example" // String | (optional)
11
12PublicAPI.createCommentPublic(tenantId: tenantId, urlId: urlId, broadcastId: broadcastId, commentData: commentData, sessionId: sessionId, sso: sso) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

deleteComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
contextUserId string query No
isLive boolean query No

Response

Returns: DeleteComment200Response

Example

deleteComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let contextUserId = "contextUserId_example" // String | (optional)
8let isLive = true // Bool | (optional)
9
10DefaultAPI.deleteComment(tenantId: tenantId, id: id, contextUserId: contextUserId, isLive: isLive) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

deleteCommentPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
broadcastId string query Yes
editKey string query No
sso string query No

Response

Returns: DeleteCommentPublic200Response

Example

deleteCommentPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let editKey = "editKey_example" // String | (optional)
9let sso = "sso_example" // String | (optional)
10
11PublicAPI.deleteCommentPublic(tenantId: tenantId, commentId: commentId, broadcastId: broadcastId, editKey: editKey, sso: sso) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

deleteCommentVote Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
voteId string path Yes
urlId string query Yes
broadcastId string query Yes
editKey string query No
sso string query No

Response

Returns: DeleteCommentVote200Response

Example

deleteCommentVote Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let voteId = "voteId_example" // String |
8let urlId = "urlId_example" // String |
9let broadcastId = "broadcastId_example" // String |
10let editKey = "editKey_example" // String | (optional)
11let sso = "sso_example" // String | (optional)
12
13PublicAPI.deleteCommentVote(tenantId: tenantId, commentId: commentId, voteId: voteId, urlId: urlId, broadcastId: broadcastId, editKey: editKey, sso: sso) { (response, error) in
14 guard error == nil else {
15 print(error)
16 return
17 }
18
19 if (response) {
20 dump(response)
21 }
22}
23

flagComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
userId string query No
anonUserId string query No

Response

Returns: FlagComment200Response

Example

flagComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let userId = "userId_example" // String | (optional)
8let anonUserId = "anonUserId_example" // String | (optional)
9
10DefaultAPI.flagComment(tenantId: tenantId, id: id, userId: userId, anonUserId: anonUserId) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: GetComment200Response

Example

getComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7
8DefaultAPI.getComment(tenantId: tenantId, id: id) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getComments Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
page integer query No
limit integer query No
skip integer query No
asTree boolean query No
skipChildren integer query No
limitChildren integer query No
maxTreeDepth integer query No
urlId string query No
userId string query No
anonUserId string query No
contextUserId string query No
hashTag string query No
parentId string query No
direction string query No

Response

Returns: GetComments200Response

Example

getComments Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let page = 987 // Int | (optional)
7let limit = 987 // Int | (optional)
8let skip = 987 // Int | (optional)
9let asTree = true // Bool | (optional)
10let skipChildren = 987 // Int | (optional)
11let limitChildren = 987 // Int | (optional)
12let maxTreeDepth = 987 // Int | (optional)
13let urlId = "urlId_example" // String | (optional)
14let userId = "userId_example" // String | (optional)
15let anonUserId = "anonUserId_example" // String | (optional)
16let contextUserId = "contextUserId_example" // String | (optional)
17let hashTag = "hashTag_example" // String | (optional)
18let parentId = "parentId_example" // String | (optional)
19let direction = SortDirections() // SortDirections | (optional)
20
21DefaultAPI.getComments(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) { (response, error) in
22 guard error == nil else {
23 print(error)
24 return
25 }
26
27 if (response) {
28 dump(response)
29 }
30}
31

getCommentsPublic Internal Link

req tenantId urlId

Parameters

Name Type Location Required Description
tenantId string path Yes
urlId string query Yes
page integer query No
direction string query No
sso string query No
skip integer query No
skipChildren integer query No
limit integer query No
limitChildren integer query No
countChildren boolean query No
fetchPageForCommentId string query No
includeConfig boolean query No
countAll boolean query No
includei10n boolean query No
locale string query No
modules string query No
isCrawler boolean query No
includeNotificationCount boolean query No
asTree boolean query No
maxTreeDepth integer query No
useFullTranslationIds boolean query No
parentId string query No
searchText string query No
hashTags array query No
userId string query No
customConfigStr string query No
afterCommentId string query No
beforeCommentId string query No

Response

Returns: GetCommentsPublic200Response

Example

getCommentsPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7let page = 987 // Int | (optional)
8let direction = SortDirections() // SortDirections | (optional)
9let sso = "sso_example" // String | (optional)
10let skip = 987 // Int | (optional)
11let skipChildren = 987 // Int | (optional)
12let limit = 987 // Int | (optional)
13let limitChildren = 987 // Int | (optional)
14let countChildren = true // Bool | (optional)
15let fetchPageForCommentId = "fetchPageForCommentId_example" // String | (optional)
16let includeConfig = true // Bool | (optional)
17let countAll = true // Bool | (optional)
18let includei10n = true // Bool | (optional)
19let locale = "locale_example" // String | (optional)
20let modules = "modules_example" // String | (optional)
21let isCrawler = true // Bool | (optional)
22let includeNotificationCount = true // Bool | (optional)
23let asTree = true // Bool | (optional)
24let maxTreeDepth = 987 // Int | (optional)
25let useFullTranslationIds = true // Bool | (optional)
26let parentId = "parentId_example" // String | (optional)
27let searchText = "searchText_example" // String | (optional)
28let hashTags = ["inner_example"] // [String] | (optional)
29let userId = "userId_example" // String | (optional)
30let customConfigStr = "customConfigStr_example" // String | (optional)
31let afterCommentId = "afterCommentId_example" // String | (optional)
32let beforeCommentId = "beforeCommentId_example" // String | (optional)
33
34PublicAPI.getCommentsPublic(tenantId: 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) { (response, error) in
35 guard error == nil else {
36 print(error)
37 return
38 }
39
40 if (response) {
41 dump(response)
42 }
43}
44

getCommentText Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
editKey string query No
sso string query No

Response

Returns: GetCommentText200Response

Example

getCommentText Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let editKey = "editKey_example" // String | (optional)
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.getCommentText(tenantId: tenantId, commentId: commentId, editKey: editKey, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getCommentVoteUserNames Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
dir integer query Yes
sso string query No

Response

Returns: GetCommentVoteUserNames200Response

Example

getCommentVoteUserNames Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let dir = 987 // Int |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.getCommentVoteUserNames(tenantId: tenantId, commentId: commentId, dir: dir, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

lockComment Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
broadcastId string query Yes
sso string query No

Response

Returns: LockComment200Response

Example

lockComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.lockComment(tenantId: tenantId, commentId: commentId, broadcastId: broadcastId, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

pinComment Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
broadcastId string query Yes
sso string query No

Response

Returns: PinComment200Response

Example

pinComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.pinComment(tenantId: tenantId, commentId: commentId, broadcastId: broadcastId, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

saveComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
isLive boolean query No
doSpamCheck boolean query No
sendEmails boolean query No
populateNotifications boolean query No

Response

Returns: SaveComment200Response

Example

saveComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createCommentParams = CreateCommentParams(date: 123, localDateString: "localDateString_example", localDateHours: 123, commenterName: "commenterName_example", commenterEmail: "commenterEmail_example", commenterLink: "commenterLink_example", comment: "comment_example", productId: 123, userId: "userId_example", avatarSrc: "avatarSrc_example", parentId: "parentId_example", mentions: [CommentUserMentionInfo(id: "id_example", tag: "tag_example", rawTag: "rawTag_example", type: "type_example", sent: false)], hashTags: [CommentUserHashTagInfo(id: "id_example", tag: "tag_example", url: "url_example", retain: false)], pageTitle: "pageTitle_example", isFromMyAccountPage: false, url: "url_example", urlId: "urlId_example", meta: 123, moderationGroupIds: ["moderationGroupIds_example"], rating: 123, fromOfflineRestore: false, autoplayDelayMS: 123, feedbackIds: ["feedbackIds_example"], questionValues: "TODO", approved: false, domain: "domain_example", ip: "ip_example", isPinned: false, locale: "locale_example", reviewed: false, verified: false, votes: 123, votesDown: 123, votesUp: 123) // CreateCommentParams |
7let isLive = true // Bool | (optional)
8let doSpamCheck = true // Bool | (optional)
9let sendEmails = true // Bool | (optional)
10let populateNotifications = true // Bool | (optional)
11
12DefaultAPI.saveComment(tenantId: tenantId, createCommentParams: createCommentParams, isLive: isLive, doSpamCheck: doSpamCheck, sendEmails: sendEmails, populateNotifications: populateNotifications) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

saveCommentsBulk Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
isLive boolean query No
doSpamCheck boolean query No
sendEmails boolean query No
populateNotifications boolean query No

Response

Returns: [SaveComment200Response]

Example

saveCommentsBulk Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createCommentParams = [CreateCommentParams(date: 123, localDateString: "localDateString_example", localDateHours: 123, commenterName: "commenterName_example", commenterEmail: "commenterEmail_example", commenterLink: "commenterLink_example", comment: "comment_example", productId: 123, userId: "userId_example", avatarSrc: "avatarSrc_example", parentId: "parentId_example", mentions: [CommentUserMentionInfo(id: "id_example", tag: "tag_example", rawTag: "rawTag_example", type: "type_example", sent: false)], hashTags: [CommentUserHashTagInfo(id: "id_example", tag: "tag_example", url: "url_example", retain: false)], pageTitle: "pageTitle_example", isFromMyAccountPage: false, url: "url_example", urlId: "urlId_example", meta: 123, moderationGroupIds: ["moderationGroupIds_example"], rating: 123, fromOfflineRestore: false, autoplayDelayMS: 123, feedbackIds: ["feedbackIds_example"], questionValues: "TODO", approved: false, domain: "domain_example", ip: "ip_example", isPinned: false, locale: "locale_example", reviewed: false, verified: false, votes: 123, votesDown: 123, votesUp: 123)] // [CreateCommentParams] |
7let isLive = true // Bool | (optional)
8let doSpamCheck = true // Bool | (optional)
9let sendEmails = true // Bool | (optional)
10let populateNotifications = true // Bool | (optional)
11
12DefaultAPI.saveCommentsBulk(tenantId: tenantId, createCommentParams: createCommentParams, isLive: isLive, doSpamCheck: doSpamCheck, sendEmails: sendEmails, populateNotifications: populateNotifications) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

setCommentText Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
broadcastId string query Yes
editKey string query No
sso string query No

Response

Returns: SetCommentText200Response

Example

setCommentText Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let commentTextUpdateRequest = CommentTextUpdateRequest(comment: "comment_example", mentions: [CommentUserMentionInfo(id: "id_example", tag: "tag_example", rawTag: "rawTag_example", type: "type_example", sent: false)], hashTags: [CommentUserHashTagInfo(id: "id_example", tag: "tag_example", url: "url_example", retain: false)]) // CommentTextUpdateRequest |
9let editKey = "editKey_example" // String | (optional)
10let sso = "sso_example" // String | (optional)
11
12PublicAPI.setCommentText(tenantId: tenantId, commentId: commentId, broadcastId: broadcastId, commentTextUpdateRequest: commentTextUpdateRequest, editKey: editKey, sso: sso) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

unBlockUserFromComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
userId string query No
anonUserId string query No

Response

Returns: UnBlockCommentPublic200Response

Example

unBlockUserFromComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let unBlockFromCommentParams = UnBlockFromCommentParams(commentIdsToCheck: ["commentIdsToCheck_example"]) // UnBlockFromCommentParams |
8let userId = "userId_example" // String | (optional)
9let anonUserId = "anonUserId_example" // String | (optional)
10
11DefaultAPI.unBlockUserFromComment(tenantId: tenantId, id: id, unBlockFromCommentParams: unBlockFromCommentParams, userId: userId, anonUserId: anonUserId) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

unFlagComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
userId string query No
anonUserId string query No

Response

Returns: FlagComment200Response

Example

unFlagComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let userId = "userId_example" // String | (optional)
8let anonUserId = "anonUserId_example" // String | (optional)
9
10DefaultAPI.unFlagComment(tenantId: tenantId, id: id, userId: userId, anonUserId: anonUserId) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

unLockComment Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
broadcastId string query Yes
sso string query No

Response

Returns: LockComment200Response

Example

unLockComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.unLockComment(tenantId: tenantId, commentId: commentId, broadcastId: broadcastId, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

unPinComment Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
broadcastId string query Yes
sso string query No

Response

Returns: PinComment200Response

Example

unPinComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let broadcastId = "broadcastId_example" // String |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.unPinComment(tenantId: tenantId, commentId: commentId, broadcastId: broadcastId, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

updateComment Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
contextUserId string query No
doSpamCheck boolean query No
isLive boolean query No

Response

Returns: FlagCommentPublic200Response

Example

updateComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let updatableCommentParams = UpdatableCommentParams(urlId: "urlId_example", urlIdRaw: "urlIdRaw_example", url: "url_example", pageTitle: "pageTitle_example", userId: "userId_example", commenterEmail: "commenterEmail_example", commenterName: "commenterName_example", commenterLink: "commenterLink_example", comment: "comment_example", commentHTML: "commentHTML_example", parentId: "parentId_example", date: 123, localDateString: "localDateString_example", localDateHours: 123, votes: 123, votesUp: 123, votesDown: 123, expireAt: Date(), verified: false, verifiedDate: Date(), notificationSentForParent: false, notificationSentForParentTenant: false, reviewed: false, externalId: "externalId_example", externalParentId: "externalParentId_example", avatarSrc: "avatarSrc_example", isSpam: false, approved: false, isDeleted: false, isDeletedUser: false, isByAdmin: false, isByModerator: false, isPinned: false, isLocked: false, flagCount: 123, displayLabel: "displayLabel_example", meta: FComment_meta(wpUserId: "wpUserId_example", wpPostId: "wpPostId_example"), moderationGroupIds: ["moderationGroupIds_example"], feedbackIds: ["feedbackIds_example"]) // UpdatableCommentParams |
8let contextUserId = "contextUserId_example" // String | (optional)
9let doSpamCheck = true // Bool | (optional)
10let isLive = true // Bool | (optional)
11
12DefaultAPI.updateComment(tenantId: tenantId, id: id, updatableCommentParams: updatableCommentParams, contextUserId: contextUserId, doSpamCheck: doSpamCheck, isLive: isLive) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

voteComment Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
urlId string query Yes
broadcastId string query Yes
sessionId string query No
sso string query No

Response

Returns: VoteComment200Response

Example

voteComment Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let urlId = "urlId_example" // String |
8let broadcastId = "broadcastId_example" // String |
9let voteBodyParams = VoteBodyParams(commenterEmail: "commenterEmail_example", commenterName: "commenterName_example", voteDir: "voteDir_example", url: "url_example") // VoteBodyParams |
10let sessionId = "sessionId_example" // String | (optional)
11let sso = "sso_example" // String | (optional)
12
13PublicAPI.voteComment(tenantId: tenantId, commentId: commentId, urlId: urlId, broadcastId: broadcastId, voteBodyParams: voteBodyParams, sessionId: sessionId, sso: sso) { (response, error) in
14 guard error == nil else {
15 print(error)
16 return
17 }
18
19 if (response) {
20 dump(response)
21 }
22}
23

addDomainConfig Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: AddDomainConfig200Response

Example

addDomainConfig Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let addDomainConfigParams = AddDomainConfigParams(domain: "domain_example", emailFromName: "emailFromName_example", emailFromEmail: "emailFromEmail_example", logoSrc: "logoSrc_example", logoSrc100px: "logoSrc100px_example", footerUnsubscribeURL: "footerUnsubscribeURL_example", emailHeaders: "TODO") // AddDomainConfigParams |
7
8DefaultAPI.addDomainConfig(tenantId: tenantId, addDomainConfigParams: addDomainConfigParams) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

deleteDomainConfig Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
domain string path Yes

Response

Returns: DeleteDomainConfig200Response

Example

deleteDomainConfig Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let domain = "domain_example" // String |
7
8DefaultAPI.deleteDomainConfig(tenantId: tenantId, domain: domain) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getDomainConfig Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
domain string path Yes

Response

Returns: GetDomainConfig200Response

Example

getDomainConfig Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let domain = "domain_example" // String |
7
8DefaultAPI.getDomainConfig(tenantId: tenantId, domain: domain) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getDomainConfigs Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: GetDomainConfigs200Response

Example

getDomainConfigs Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6
7DefaultAPI.getDomainConfigs(tenantId: tenantId) { (response, error) in
8 guard error == nil else {
9 print(error)
10 return
11 }
12
13 if (response) {
14 dump(response)
15 }
16}
17

patchDomainConfig Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
domainToUpdate string path Yes

Response

Returns: GetDomainConfig200Response

Example

patchDomainConfig Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let domainToUpdate = "domainToUpdate_example" // String |
7let patchDomainConfigParams = PatchDomainConfigParams(domain: "domain_example", emailFromName: "emailFromName_example", emailFromEmail: "emailFromEmail_example", logoSrc: "logoSrc_example", logoSrc100px: "logoSrc100px_example", footerUnsubscribeURL: "footerUnsubscribeURL_example", emailHeaders: "TODO") // PatchDomainConfigParams |
8
9DefaultAPI.patchDomainConfig(tenantId: tenantId, domainToUpdate: domainToUpdate, patchDomainConfigParams: patchDomainConfigParams) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

putDomainConfig Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
domainToUpdate string path Yes

Response

Returns: GetDomainConfig200Response

Example

putDomainConfig Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let domainToUpdate = "domainToUpdate_example" // String |
7let updateDomainConfigParams = UpdateDomainConfigParams(domain: "domain_example", emailFromName: "emailFromName_example", emailFromEmail: "emailFromEmail_example", logoSrc: "logoSrc_example", logoSrc100px: "logoSrc100px_example", footerUnsubscribeURL: "footerUnsubscribeURL_example", emailHeaders: "TODO") // UpdateDomainConfigParams |
8
9DefaultAPI.putDomainConfig(tenantId: tenantId, domainToUpdate: domainToUpdate, updateDomainConfigParams: updateDomainConfigParams) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

getEventLog Internal Link

req tenantId urlId userIdWS

Parameters

Name Type Location Required Description
tenantId string path Yes
urlId string query Yes
userIdWS string query Yes
startTime integer query Yes
endTime integer query Yes

Response

Returns: GetEventLog200Response

Example

getEventLog Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7let userIdWS = "userIdWS_example" // String |
8let startTime = 987 // Int64 |
9let endTime = 987 // Int64 |
10
11PublicAPI.getEventLog(tenantId: tenantId, urlId: urlId, userIdWS: userIdWS, startTime: startTime, endTime: endTime) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

getGlobalEventLog Internal Link

req tenantId urlId userIdWS

Parameters

Name Type Location Required Description
tenantId string path Yes
urlId string query Yes
userIdWS string query Yes
startTime integer query Yes
endTime integer query Yes

Response

Returns: GetEventLog200Response

Example

getGlobalEventLog Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7let userIdWS = "userIdWS_example" // String |
8let startTime = 987 // Int64 |
9let endTime = 987 // Int64 |
10
11PublicAPI.getGlobalEventLog(tenantId: tenantId, urlId: urlId, userIdWS: userIdWS, startTime: startTime, endTime: endTime) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

createFeedPost Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
broadcastId string query No
isLive boolean query No
doSpamCheck boolean query No
skipDupCheck boolean query No

Response

Returns: CreateFeedPost200Response

Example

createFeedPost Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createFeedPostParams = CreateFeedPostParams(title: "title_example", contentHTML: "contentHTML_example", media: [FeedPostMediaItem(title: "title_example", linkUrl: "linkUrl_example", sizes: [FeedPostMediaItemAsset(w: 123, h: 123, src: "src_example")])], links: [FeedPostLink(text: "text_example", title: "title_example", description: "description_example", url: "url_example")], fromUserId: "fromUserId_example", fromUserDisplayName: "fromUserDisplayName_example", tags: ["tags_example"], meta: "TODO") // CreateFeedPostParams |
7let broadcastId = "broadcastId_example" // String | (optional)
8let isLive = true // Bool | (optional)
9let doSpamCheck = true // Bool | (optional)
10let skipDupCheck = true // Bool | (optional)
11
12DefaultAPI.createFeedPost(tenantId: tenantId, createFeedPostParams: createFeedPostParams, broadcastId: broadcastId, isLive: isLive, doSpamCheck: doSpamCheck, skipDupCheck: skipDupCheck) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

createFeedPostPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
broadcastId string query No
sso string query No

Response

Returns: CreateFeedPostPublic200Response

Example

createFeedPostPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createFeedPostParams = CreateFeedPostParams(title: "title_example", contentHTML: "contentHTML_example", media: [FeedPostMediaItem(title: "title_example", linkUrl: "linkUrl_example", sizes: [FeedPostMediaItemAsset(w: 123, h: 123, src: "src_example")])], links: [FeedPostLink(text: "text_example", title: "title_example", description: "description_example", url: "url_example")], fromUserId: "fromUserId_example", fromUserDisplayName: "fromUserDisplayName_example", tags: ["tags_example"], meta: "TODO") // CreateFeedPostParams |
7let broadcastId = "broadcastId_example" // String | (optional)
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.createFeedPostPublic(tenantId: tenantId, createFeedPostParams: createFeedPostParams, broadcastId: broadcastId, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

deleteFeedPostPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
postId string path Yes
broadcastId string query No
sso string query No

Response

Returns: DeleteFeedPostPublic200Response

Example

deleteFeedPostPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let postId = "postId_example" // String |
7let broadcastId = "broadcastId_example" // String | (optional)
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.deleteFeedPostPublic(tenantId: tenantId, postId: postId, broadcastId: broadcastId, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getFeedPosts Internal Link

req tenantId afterId

Parameters

Name Type Location Required Description
tenantId string query Yes
afterId string query No
limit integer query No
tags array query No

Response

Returns: GetFeedPosts200Response

Example

getFeedPosts Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let afterId = "afterId_example" // String | (optional)
7let limit = 987 // Int | (optional)
8let tags = ["inner_example"] // [String] | (optional)
9
10DefaultAPI.getFeedPosts(tenantId: tenantId, afterId: afterId, limit: limit, tags: tags) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getFeedPostsPublic Internal Link

req tenantId afterId

Parameters

Name Type Location Required Description
tenantId string path Yes
afterId string query No
limit integer query No
tags array query No
sso string query No
isCrawler boolean query No
includeUserInfo boolean query No

Response

Returns: GetFeedPostsPublic200Response

Example

getFeedPostsPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let afterId = "afterId_example" // String | (optional)
7let limit = 987 // Int | (optional)
8let tags = ["inner_example"] // [String] | (optional)
9let sso = "sso_example" // String | (optional)
10let isCrawler = true // Bool | (optional)
11let includeUserInfo = true // Bool | (optional)
12
13PublicAPI.getFeedPostsPublic(tenantId: tenantId, afterId: afterId, limit: limit, tags: tags, sso: sso, isCrawler: isCrawler, includeUserInfo: includeUserInfo) { (response, error) in
14 guard error == nil else {
15 print(error)
16 return
17 }
18
19 if (response) {
20 dump(response)
21 }
22}
23

getFeedPostsStats Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
postIds array query Yes
sso string query No

Response

Returns: GetFeedPostsStats200Response

Example

getFeedPostsStats Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let postIds = ["inner_example"] // [String] |
7let sso = "sso_example" // String | (optional)
8
9PublicAPI.getFeedPostsStats(tenantId: tenantId, postIds: postIds, sso: sso) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

getUserReactsPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
postIds array query No
sso string query No

Response

Returns: GetUserReactsPublic200Response

Example

getUserReactsPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let postIds = ["inner_example"] // [String] | (optional)
7let sso = "sso_example" // String | (optional)
8
9PublicAPI.getUserReactsPublic(tenantId: tenantId, postIds: postIds, sso: sso) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

reactFeedPostPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
postId string path Yes
isUndo boolean query No
broadcastId string query No
sso string query No

Response

Returns: ReactFeedPostPublic200Response

Example

reactFeedPostPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let postId = "postId_example" // String |
7let reactBodyParams = ReactBodyParams(reactType: "reactType_example") // ReactBodyParams |
8let isUndo = true // Bool | (optional)
9let broadcastId = "broadcastId_example" // String | (optional)
10let sso = "sso_example" // String | (optional)
11
12PublicAPI.reactFeedPostPublic(tenantId: tenantId, postId: postId, reactBodyParams: reactBodyParams, isUndo: isUndo, broadcastId: broadcastId, sso: sso) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

updateFeedPost Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: FlagCommentPublic200Response

Example

updateFeedPost Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let feedPost = FeedPost(id: "id_example", tenantId: "tenantId_example", title: "title_example", fromUserId: "fromUserId_example", fromUserDisplayName: "fromUserDisplayName_example", fromUserAvatar: "fromUserAvatar_example", fromIpHash: "fromIpHash_example", tags: ["tags_example"], weight: 123, meta: "TODO", contentHTML: "contentHTML_example", media: [FeedPostMediaItem(title: "title_example", linkUrl: "linkUrl_example", sizes: [FeedPostMediaItemAsset(w: 123, h: 123, src: "src_example")])], links: [FeedPostLink(text: "text_example", title: "title_example", description: "description_example", url: "url_example")], createdAt: Date(), reacts: "TODO", commentCount: 123) // FeedPost |
8
9DefaultAPI.updateFeedPost(tenantId: tenantId, id: id, feedPost: feedPost) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

updateFeedPostPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
postId string path Yes
broadcastId string query No
sso string query No

Response

Returns: CreateFeedPostPublic200Response

Example

updateFeedPostPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let postId = "postId_example" // String |
7let updateFeedPostParams = UpdateFeedPostParams(title: "title_example", contentHTML: "contentHTML_example", media: [FeedPostMediaItem(title: "title_example", linkUrl: "linkUrl_example", sizes: [FeedPostMediaItemAsset(w: 123, h: 123, src: "src_example")])], links: [FeedPostLink(text: "text_example", title: "title_example", description: "description_example", url: "url_example")], tags: ["tags_example"], meta: "TODO") // UpdateFeedPostParams |
8let broadcastId = "broadcastId_example" // String | (optional)
9let sso = "sso_example" // String | (optional)
10
11PublicAPI.updateFeedPostPublic(tenantId: tenantId, postId: postId, updateFeedPostParams: updateFeedPostParams, broadcastId: broadcastId, sso: sso) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

flagCommentPublic Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
commentId string path Yes
isFlagged boolean query Yes
sso string query No

Response

Returns: FlagCommentPublic200Response

Example

flagCommentPublic Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let commentId = "commentId_example" // String |
7let isFlagged = true // Bool |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.flagCommentPublic(tenantId: tenantId, commentId: commentId, isFlagged: isFlagged, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

addPage Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: AddPageAPIResponse

Example

addPage Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createAPIPageData = CreateAPIPageData(accessibleByGroupIds: ["accessibleByGroupIds_example"], rootCommentCount: 123, commentCount: 123, title: "title_example", url: "url_example", urlId: "urlId_example") // CreateAPIPageData |
7
8DefaultAPI.addPage(tenantId: tenantId, createAPIPageData: createAPIPageData) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

deletePage Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: DeletePageAPIResponse

Example

deletePage Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7
8DefaultAPI.deletePage(tenantId: tenantId, id: id) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getPageByURLId Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
urlId string query Yes

Response

Returns: GetPageByURLIdAPIResponse

Example

getPageByURLId Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7
8DefaultAPI.getPageByURLId(tenantId: tenantId, urlId: urlId) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getPages Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: GetPagesAPIResponse

Example

getPages Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6
7DefaultAPI.getPages(tenantId: tenantId) { (response, error) in
8 guard error == nil else {
9 print(error)
10 return
11 }
12
13 if (response) {
14 dump(response)
15 }
16}
17

patchPage Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: PatchPageAPIResponse

Example

patchPage Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let updateAPIPageData = UpdateAPIPageData(isClosed: false, accessibleByGroupIds: ["accessibleByGroupIds_example"], title: "title_example", url: "url_example", urlId: "urlId_example") // UpdateAPIPageData |
8
9DefaultAPI.patchPage(tenantId: tenantId, id: id, updateAPIPageData: updateAPIPageData) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

aggregateQuestionResults Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
questionId string query No
questionIds array query No
urlId string query No
timeBucket string query No
startDate string query No
forceRecalculate boolean query No

Response

Returns: AggregateQuestionResults200Response

Example

aggregateQuestionResults Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let questionId = "questionId_example" // String | (optional)
7let questionIds = ["inner_example"] // [String] | (optional)
8let urlId = "urlId_example" // String | (optional)
9let timeBucket = AggregateTimeBucket() // AggregateTimeBucket | (optional)
10let startDate = Date() // Date | (optional)
11let forceRecalculate = true // Bool | (optional)
12
13DefaultAPI.aggregateQuestionResults(tenantId: tenantId, questionId: questionId, questionIds: questionIds, urlId: urlId, timeBucket: timeBucket, startDate: startDate, forceRecalculate: forceRecalculate) { (response, error) in
14 guard error == nil else {
15 print(error)
16 return
17 }
18
19 if (response) {
20 dump(response)
21 }
22}
23

bulkAggregateQuestionResults Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
forceRecalculate boolean query No

Response

Returns: BulkAggregateQuestionResults200Response

Example

bulkAggregateQuestionResults Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let bulkAggregateQuestionResultsRequest = BulkAggregateQuestionResultsRequest(aggregations: [BulkAggregateQuestionItem(aggId: "aggId_example", questionId: "questionId_example", questionIds: ["questionIds_example"], urlId: "urlId_example", timeBucket: AggregateTimeBucket(), startDate: Date())]) // BulkAggregateQuestionResultsRequest |
7let forceRecalculate = true // Bool | (optional)
8
9DefaultAPI.bulkAggregateQuestionResults(tenantId: tenantId, bulkAggregateQuestionResultsRequest: bulkAggregateQuestionResultsRequest, forceRecalculate: forceRecalculate) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

combineCommentsWithQuestionResults Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
questionId string query No
questionIds array query No
urlId string query No
startDate string query No
forceRecalculate boolean query No
minValue number query No
maxValue number query No
limit number query No

Response

Returns: CombineCommentsWithQuestionResults200Response

Example

combineCommentsWithQuestionResults Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let questionId = "questionId_example" // String | (optional)
7let questionIds = ["inner_example"] // [String] | (optional)
8let urlId = "urlId_example" // String | (optional)
9let startDate = Date() // Date | (optional)
10let forceRecalculate = true // Bool | (optional)
11let minValue = 987 // Double | (optional)
12let maxValue = 987 // Double | (optional)
13let limit = 987 // Double | (optional)
14
15DefaultAPI.combineCommentsWithQuestionResults(tenantId: tenantId, questionId: questionId, questionIds: questionIds, urlId: urlId, startDate: startDate, forceRecalculate: forceRecalculate, minValue: minValue, maxValue: maxValue, limit: limit) { (response, error) in
16 guard error == nil else {
17 print(error)
18 return
19 }
20
21 if (response) {
22 dump(response)
23 }
24}
25

addSSOUser Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: AddSSOUserAPIResponse

Example

addSSOUser Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createAPISSOUserData = CreateAPISSOUserData(groupIds: ["groupIds_example"], hasBlockedUsers: false, isProfileDMDisabled: false, isProfileCommentsPrivate: false, isProfileActivityPrivate: false, isCommentModeratorAdmin: false, isAdminAdmin: false, isAccountOwner: false, displayName: "displayName_example", displayLabel: "displayLabel_example", optedInSubscriptionNotifications: false, optedInNotifications: false, avatarSrc: "avatarSrc_example", loginCount: 123, createdFromUrlId: "createdFromUrlId_example", signUpDate: 123, email: "email_example", websiteUrl: "websiteUrl_example", username: "username_example", id: "id_example") // CreateAPISSOUserData |
7
8DefaultAPI.addSSOUser(tenantId: tenantId, createAPISSOUserData: createAPISSOUserData) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

deleteSSOUser Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
deleteComments boolean query No
commentDeleteMode string query No

Response

Returns: DeleteSSOUserAPIResponse

Example

deleteSSOUser Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let deleteComments = true // Bool | (optional)
8let commentDeleteMode = "commentDeleteMode_example" // String | (optional)
9
10DefaultAPI.deleteSSOUser(tenantId: tenantId, id: id, deleteComments: deleteComments, commentDeleteMode: commentDeleteMode) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getSSOUserByEmail Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
email string path Yes

Response

Returns: GetSSOUserByEmailAPIResponse

Example

getSSOUserByEmail Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let email = "email_example" // String |
7
8DefaultAPI.getSSOUserByEmail(tenantId: tenantId, email: email) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getSSOUserById Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: GetSSOUserByIdAPIResponse

Example

getSSOUserById Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7
8DefaultAPI.getSSOUserById(tenantId: tenantId, id: id) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getSSOUsers Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
skip integer query No

Response

Returns: GetSSOUsers200Response

Example

getSSOUsers Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let skip = 987 // Int | (optional)
7
8DefaultAPI.getSSOUsers(tenantId: tenantId, skip: skip) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

patchSSOUser Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
updateComments boolean query No

Response

Returns: PatchSSOUserAPIResponse

Example

patchSSOUser Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let updateAPISSOUserData = UpdateAPISSOUserData(groupIds: ["groupIds_example"], hasBlockedUsers: false, isProfileDMDisabled: false, isProfileCommentsPrivate: false, isProfileActivityPrivate: false, isCommentModeratorAdmin: false, isAdminAdmin: false, isAccountOwner: false, displayName: "displayName_example", displayLabel: "displayLabel_example", optedInSubscriptionNotifications: false, optedInNotifications: false, avatarSrc: "avatarSrc_example", loginCount: 123, createdFromUrlId: "createdFromUrlId_example", signUpDate: 123, email: "email_example", websiteUrl: "websiteUrl_example", username: "username_example", id: "id_example") // UpdateAPISSOUserData |
8let updateComments = true // Bool | (optional)
9
10DefaultAPI.patchSSOUser(tenantId: tenantId, id: id, updateAPISSOUserData: updateAPISSOUserData, updateComments: updateComments) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

putSSOUser Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
updateComments boolean query No

Response

Returns: PutSSOUserAPIResponse

Example

putSSOUser Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let updateAPISSOUserData = UpdateAPISSOUserData(groupIds: ["groupIds_example"], hasBlockedUsers: false, isProfileDMDisabled: false, isProfileCommentsPrivate: false, isProfileActivityPrivate: false, isCommentModeratorAdmin: false, isAdminAdmin: false, isAccountOwner: false, displayName: "displayName_example", displayLabel: "displayLabel_example", optedInSubscriptionNotifications: false, optedInNotifications: false, avatarSrc: "avatarSrc_example", loginCount: 123, createdFromUrlId: "createdFromUrlId_example", signUpDate: 123, email: "email_example", websiteUrl: "websiteUrl_example", username: "username_example", id: "id_example") // UpdateAPISSOUserData |
8let updateComments = true // Bool | (optional)
9
10DefaultAPI.putSSOUser(tenantId: tenantId, id: id, updateAPISSOUserData: updateAPISSOUserData, updateComments: updateComments) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

createSubscription Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: CreateSubscriptionAPIResponse

Example

createSubscription Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createAPIUserSubscriptionData = CreateAPIUserSubscriptionData(pageTitle: "pageTitle_example", url: "url_example", urlId: "urlId_example", anonUserId: "anonUserId_example", userId: "userId_example") // CreateAPIUserSubscriptionData |
7
8DefaultAPI.createSubscription(tenantId: tenantId, createAPIUserSubscriptionData: createAPIUserSubscriptionData) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

deleteSubscription Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes
userId string query No

Response

Returns: DeleteSubscriptionAPIResponse

Example

deleteSubscription Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let userId = "userId_example" // String | (optional)
8
9DefaultAPI.deleteSubscription(tenantId: tenantId, id: id, userId: userId) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

getSubscriptions Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
userId string query No

Response

Returns: GetSubscriptionsAPIResponse

Example

getSubscriptions Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let userId = "userId_example" // String | (optional)
7
8DefaultAPI.getSubscriptions(tenantId: tenantId, userId: userId) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

uploadImage Internal Link

Upload and resize an image

Parameters

Name Type Location Required Description
tenantId string path Yes
sizePreset string query No Size preset: "Default" (1000x1000px) or "CrossPlatform" (creates sizes for popular devices)
urlId string query No Page id that upload is happening from, to configure

Response

Returns: UploadImageResponse

Example

uploadImage Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let file = URL(string: "https://example.com")! // URL |
7let sizePreset = SizePreset() // SizePreset | Size preset: \"Default\" (1000x1000px) or \"CrossPlatform\" (creates sizes for popular devices) (optional)
8let urlId = "urlId_example" // String | Page id that upload is happening from, to configure (optional)
9
10PublicAPI.uploadImage(tenantId: tenantId, file: file, sizePreset: sizePreset, urlId: urlId) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getUserBadgeProgressById Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: GetUserBadgeProgressById200Response

Example

getUserBadgeProgressById Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7
8DefaultAPI.getUserBadgeProgressById(tenantId: tenantId, id: id) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getUserBadgeProgressByUserId Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
userId string path Yes

Response

Returns: GetUserBadgeProgressById200Response

Example

getUserBadgeProgressByUserId Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let userId = "userId_example" // String |
7
8DefaultAPI.getUserBadgeProgressByUserId(tenantId: tenantId, userId: userId) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getUserBadgeProgressList Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
userId string query No
limit number query No
skip number query No

Response

Returns: GetUserBadgeProgressList200Response

Example

getUserBadgeProgressList Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let userId = "userId_example" // String | (optional)
7let limit = 987 // Double | (optional)
8let skip = 987 // Double | (optional)
9
10DefaultAPI.getUserBadgeProgressList(tenantId: tenantId, userId: userId, limit: limit, skip: skip) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

createUserBadge Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes

Response

Returns: CreateUserBadge200Response

Example

createUserBadge Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let createUserBadgeParams = CreateUserBadgeParams(userId: "userId_example", badgeId: "badgeId_example", displayedOnComments: false) // CreateUserBadgeParams |
7
8DefaultAPI.createUserBadge(tenantId: tenantId, createUserBadgeParams: createUserBadgeParams) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

deleteUserBadge Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: UpdateUserBadge200Response

Example

deleteUserBadge Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7
8DefaultAPI.deleteUserBadge(tenantId: tenantId, id: id) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getUserBadge Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: GetUserBadge200Response

Example

getUserBadge Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7
8DefaultAPI.getUserBadge(tenantId: tenantId, id: id) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getUserBadges Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
userId string query No
badgeId string query No
type number query No
displayedOnComments boolean query No
limit number query No
skip number query No

Response

Returns: GetUserBadges200Response

Example

getUserBadges Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let userId = "userId_example" // String | (optional)
7let badgeId = "badgeId_example" // String | (optional)
8let type = 987 // Double | (optional)
9let displayedOnComments = true // Bool | (optional)
10let limit = 987 // Double | (optional)
11let skip = 987 // Double | (optional)
12
13DefaultAPI.getUserBadges(tenantId: tenantId, userId: userId, badgeId: badgeId, type: type, displayedOnComments: displayedOnComments, limit: limit, skip: skip) { (response, error) in
14 guard error == nil else {
15 print(error)
16 return
17 }
18
19 if (response) {
20 dump(response)
21 }
22}
23

updateUserBadge Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
id string path Yes

Response

Returns: UpdateUserBadge200Response

Example

updateUserBadge Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let id = "id_example" // String |
7let updateUserBadgeParams = UpdateUserBadgeParams(displayedOnComments: false) // UpdateUserBadgeParams |
8
9DefaultAPI.updateUserBadge(tenantId: tenantId, id: id, updateUserBadgeParams: updateUserBadgeParams) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

getUserNotificationCount Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
sso string query No

Response

Returns: GetUserNotificationCount200Response

Example

getUserNotificationCount Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let sso = "sso_example" // String | (optional)
7
8PublicAPI.getUserNotificationCount(tenantId: tenantId, sso: sso) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

getUserNotifications Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
pageSize integer query No
afterId string query No
includeContext boolean query No
afterCreatedAt integer query No
unreadOnly boolean query No
dmOnly boolean query No
noDm boolean query No
includeTranslations boolean query No
sso string query No

Response

Returns: GetUserNotifications200Response

Example

getUserNotifications Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let pageSize = 987 // Int | (optional)
7let afterId = "afterId_example" // String | (optional)
8let includeContext = true // Bool | (optional)
9let afterCreatedAt = 987 // Int64 | (optional)
10let unreadOnly = true // Bool | (optional)
11let dmOnly = true // Bool | (optional)
12let noDm = true // Bool | (optional)
13let includeTranslations = true // Bool | (optional)
14let sso = "sso_example" // String | (optional)
15
16PublicAPI.getUserNotifications(tenantId: tenantId, pageSize: pageSize, afterId: afterId, includeContext: includeContext, afterCreatedAt: afterCreatedAt, unreadOnly: unreadOnly, dmOnly: dmOnly, noDm: noDm, includeTranslations: includeTranslations, sso: sso) { (response, error) in
17 guard error == nil else {
18 print(error)
19 return
20 }
21
22 if (response) {
23 dump(response)
24 }
25}
26

resetUserNotificationCount Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
sso string query No

Response

Returns: ResetUserNotifications200Response

Example

resetUserNotificationCount Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let sso = "sso_example" // String | (optional)
7
8PublicAPI.resetUserNotificationCount(tenantId: tenantId, sso: sso) { (response, error) in
9 guard error == nil else {
10 print(error)
11 return
12 }
13
14 if (response) {
15 dump(response)
16 }
17}
18

resetUserNotifications Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
afterId string query No
afterCreatedAt integer query No
unreadOnly boolean query No
dmOnly boolean query No
noDm boolean query No
sso string query No

Response

Returns: ResetUserNotifications200Response

Example

resetUserNotifications Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let afterId = "afterId_example" // String | (optional)
7let afterCreatedAt = 987 // Int64 | (optional)
8let unreadOnly = true // Bool | (optional)
9let dmOnly = true // Bool | (optional)
10let noDm = true // Bool | (optional)
11let sso = "sso_example" // String | (optional)
12
13PublicAPI.resetUserNotifications(tenantId: tenantId, afterId: afterId, afterCreatedAt: afterCreatedAt, unreadOnly: unreadOnly, dmOnly: dmOnly, noDm: noDm, sso: sso) { (response, error) in
14 guard error == nil else {
15 print(error)
16 return
17 }
18
19 if (response) {
20 dump(response)
21 }
22}
23

updateUserNotificationCommentSubscriptionStatus Internal Link

Enable or disable notifications for a specific comment.

Parameters

Name Type Location Required Description
tenantId string query Yes
notificationId string path Yes
optedInOrOut string path Yes
commentId string query Yes
sso string query No

Response

Returns: UpdateUserNotificationStatus200Response

Example

updateUserNotificationCommentSubscriptionStatus Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let notificationId = "notificationId_example" // String |
7let optedInOrOut = "optedInOrOut_example" // String |
8let commentId = "commentId_example" // String |
9let sso = "sso_example" // String | (optional)
10
11PublicAPI.updateUserNotificationCommentSubscriptionStatus(tenantId: tenantId, notificationId: notificationId, optedInOrOut: optedInOrOut, commentId: commentId, sso: sso) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

updateUserNotificationPageSubscriptionStatus Internal Link

Enable or disable notifications for a page. When users are subscribed to a page, notifications are created for new root comments, and also

Parameters

Name Type Location Required Description
tenantId string query Yes
urlId string query Yes
url string query Yes
pageTitle string query Yes
subscribedOrUnsubscribed string path Yes
sso string query No

Response

Returns: UpdateUserNotificationStatus200Response

Example

updateUserNotificationPageSubscriptionStatus Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7let url = "url_example" // String |
8let pageTitle = "pageTitle_example" // String |
9let subscribedOrUnsubscribed = "subscribedOrUnsubscribed_example" // String |
10let sso = "sso_example" // String | (optional)
11
12PublicAPI.updateUserNotificationPageSubscriptionStatus(tenantId: tenantId, urlId: urlId, url: url, pageTitle: pageTitle, subscribedOrUnsubscribed: subscribedOrUnsubscribed, sso: sso) { (response, error) in
13 guard error == nil else {
14 print(error)
15 return
16 }
17
18 if (response) {
19 dump(response)
20 }
21}
22

updateUserNotificationStatus Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
notificationId string path Yes
newStatus string path Yes
sso string query No

Response

Returns: UpdateUserNotificationStatus200Response

Example

updateUserNotificationStatus Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let notificationId = "notificationId_example" // String |
7let newStatus = "newStatus_example" // String |
8let sso = "sso_example" // String | (optional)
9
10PublicAPI.updateUserNotificationStatus(tenantId: tenantId, notificationId: notificationId, newStatus: newStatus, sso: sso) { (response, error) in
11 guard error == nil else {
12 print(error)
13 return
14 }
15
16 if (response) {
17 dump(response)
18 }
19}
20

getUserPresenceStatuses Internal Link

Parameters

Name Type Location Required Description
tenantId string query Yes
urlIdWS string query Yes
userIds string query Yes

Response

Returns: GetUserPresenceStatuses200Response

Example

getUserPresenceStatuses Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlIdWS = "urlIdWS_example" // String |
7let userIds = "userIds_example" // String |
8
9PublicAPI.getUserPresenceStatuses(tenantId: tenantId, urlIdWS: urlIdWS, userIds: userIds) { (response, error) in
10 guard error == nil else {
11 print(error)
12 return
13 }
14
15 if (response) {
16 dump(response)
17 }
18}
19

searchUsers Internal Link

Parameters

Name Type Location Required Description
tenantId string path Yes
urlId string query Yes
usernameStartsWith string query Yes
mentionGroupIds array query No
sso string query No

Response

Returns: SearchUsers200Response

Example

searchUsers Example
Copy Copy
1
2// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
3import FastCommentsSwift
4
5let tenantId = "tenantId_example" // String |
6let urlId = "urlId_example" // String |
7let usernameStartsWith = "usernameStartsWith_example" // String |
8let mentionGroupIds = ["inner_example"] // [String] | (optional)
9let sso = "sso_example" // String | (optional)
10
11PublicAPI.searchUsers(tenantId: tenantId, urlId: urlId, usernameStartsWith: usernameStartsWith, mentionGroupIds: mentionGroupIds, sso: sso) { (response, error) in
12 guard error == nil else {
13 print(error)
14 return
15 }
16
17 if (response) {
18 dump(response)
19 }
20}
21

Need Help?

If you encounter any issues or have questions about the Swift SDK, please:

Contributing

Contributions are welcome! Please visit the GitHub repository for contribution guidelines.