Creator Methods

MethodMethod detail
getHashtagSuggestion()

Convenient getter method to get hashtag auto suggestion list which can be used further on creator and other screen.

getContentUploadUrl()

Convenient getter method to get signed url for upload new content on server.

getTagFriendList()

Convenient getter method to get tag friends list which can be used on creator module while creating post.

getContentUploadCategories()

Convenient getter method to get categories list which user will tag with the posting content during creating the post.

uploadContentMetaData()

Convenient getter method to get categories list which user will tag with the posting content during creating the post.

getSoundList()

Convenient getter method to get sound list which user will tag with the posting content during creating the post.

Get Hashtag suggestion list method

API Class: CreatorData

Method: getHashtagSuggestion

Convenient getter method to get hashtag auto suggestion list which can be used further on creator and other screen.

Request:

Requested parameter.
text: parameter text used to rander related name list.
// Call to get hashtag auto suggestion list based on search string
 CreatorData.sharedInstance.getHashtagSuggestion(text: "search String") {result in
    if (result?.data) != nil {
       // Do Something
       print(result?.data as Any)
      }
} failure: {error in
      print(error)
      // Do Something
 }

Response:

  • Response Object: Hashtag auto suggestion model Object

  • Keys which object have::

    • id:

    • backgroundImage: hashtag background image to use further

    • bannerImage: hashtag banner image to use further

    • createdAt: hashtag created at

    • createdBy: token of the user

    • createdTimestamp: access token of the user

    • descriptionField: userid of the user

    • hashtagId: hashtag created at

    • createdBy: hashtag created by user name

    • createdTimestamp: content language

    • descriptionField: description of the field

    • hashtagId: hashtag id

    • image: Image of the hashtag

    • status: Status of hashtag

    • taggedVideos: i[ ] tagged video list array

    • title: hashtag title string

    • updatedAt: Updated at timestamp

    • updatedTimestamp: Updated timestamp

    • videoCount: video count on this hashtag

Get Content upload Signed URL method

API Class: CreatorData

Method: getContentUploadUrl

Convenient getter method to get signed url for upload new content on server.

Request:

Requested parameter.
type: parameter text type which define what type of content user wanted to upload.
// Call to get hashtag auto suggestion list based on search string
CreatorData.sharedInstance.getContentUploadUrl(type: CreatorOptions.video.rawValue) { [weak self] result in
                guard let weakSelf = self else { return }
                //result

            } failure: { [weak self] (error, code) in
                guard let weakSelf = self else { return }
                // Error message
          }

Response:

  • Response Object: Content upload response Object

  • Keys which object have::

    • StatusCode: Status code to know response status from API

    • Message: message status to upload the content

    • Success: True/False

Get Tag User List

API Class: CreatorData

Method: getTagFriendList

Convenient getter method to get tag friends list which can be used on creator module while creating post.

Request:

Requested parameter.
text: parameter text used to rander related name list.
limit: Total number of record which you wanted to get in single call
offset: Number of page which you wanted to trigger

CreatorData.sharedInstance.getTagFriendList(text: "",
          limit: 10,
          offset: 1) {result in
  if (result?.data) != nil {
           // Do Something
  }
} failure: {error in
  // Do Something
}

Response:

  • Response Object: User Model Object

  • Keys which object have::

    • description: “description field for the user information”

    • email: “User email address”

    • fullName: “Full name of the user”

    • profileImageUrl: “profile image for the user”

    • token: “token of the user”

    • accessToken: “access token of the user”

    • userId: “userid of the user”

    • userName: “user name of the user”

    • blockedByUser: “Array of the blocked user”

    • blockedUser: “Array of the user who blocked me”

    • id: “id of the content”

    • followersCount: “follower count of the user”

    • videoCount: “video count of the user”

    • creator: “creator id”

    • follow: “is follow”

    • followingCount: “following Count”

    • imageUrl: “Image url of the user”

Get Content Upload Categories List

API Class: creator

Method: getContentUploadCategories

Convenient getter method to get categories list which user will tag with the posting content during creating the post.

Request:

Requested parameter.
text: parameter text used to rander related name list.
limit: Total number of record which you wanted to get in single call
offset: Number of page which you wanted to trigger
CreatorData.sharedInstance.getContentUploadCategories(text: "", limit: 100, offset: 1) { [weak self] postVideoCategoryList in
                guard let weakSelf = self else { return }
            } failure: { [weak self] error, code in
                guard let weakSelf = self else { return }
            }

Response:

  • Response Object: Upload signed data Model Object

  • Keys which object have::

    • StatusCode: Status code to know response status from API

    • Message: message status to upload the content

    • Success: True/False

    • Response Object: category model Object

    • categoryId: category id

    • categoryName: Name of the category

    • coverImage: category cover image

Upload single or multiple content

API Class: CreatorData

Method: uploadContentMetaData

Convenient getter method to get categories list which user will tag with the posting content during creating the post.

Request:

Requested parameter.
userId: parameter text used to rander related name list.
url: Total number of record which you wanted to get in single call
title: Number of page which you wanted to trigger
videoCoverImage:"content cover image"
description: "Content description"
follow: "Follow user of the content"
type: "Type of the content, Video/Iamge"
categoryId: "category Id which is selected with content"
categoryName: "Category name which is selected with content"
taggedUser: "Tagged user list which tagged with content"
ContentURLs: "Array: Content urls list which is posting with content"
CreatorData.sharedInstance.uploadContentMetaData(
                userId: userId,
                url: s3Url,
                title: title,
                videoCoverImage: dataString,
                description: description,
                follow: follow,
                type: videoType,
                categoryId: categoryId,
                categoryName: categoryName,
                taggedUsers: taggedUsers,
                contentUrls: contentUrlArray) { [weak self] result in
                    guard let weakSelf = self else { return }
                    weakSelf.isLoading = false
                    guard result?.result != nil else { return }
                    weakSelf.videoInfoUploadToServerResponse = result
                    weakSelf.didGetVideoUploadToServerResponse?()
            } failure: { [weak self] error, code in
                guard let weakSelf = self else { return }
                weakSelf.isLoading = false
            }

Response:

  • StatusCode: Status code to know response status from API

  • Message: message status to upload the content

  • Success: True/False

Get Sound list data

API Class: CreatorData

Method: getSoundList

Convenient getter method to get sound list which user will tag with the posting content during creating the post.

Request:

Requested parameter.
searchText: parameter text used to rander related sound.
limit: Total number of record which you wanted to get in single call
offset: Number of page which you wanted to trigger
CreatorData.sharedInstance.getSoundList(searchText: searchText, limit: limit, offset: pageOffset) { [weak self] result in
                guard let weakSelf = self else { return }
                weakSelf.isLoading = false
                if result.result != nil {
                    weakSelf.soundObject = result
                }
            } failure: { [weak self] error, code in
                guard let weakSelf = self else { return }
                weakSelf.isLoading = false
                weakSelf.alertMessage = error
            }

Response:

  • StatusCode: Status code to know response status from API

  • Message: message status to upload the content

  • Success: True/False

  • Sound: [SoundData]