ContentItem
public struct ContentItem : Codable, Equatable
An input content item that the service is to analyze.
-
The MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is analyzed; plain text is processed as submitted.
See moreDeclaration
Swift
public enum Contenttype : String -
The language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is
See moreen(English). Regional variants are treated as their parent language; for example,en-USis interpreted asen. A language specified with the Content-Type parameter overrides the value of this parameter; any content items that specify a different language are ignored. Omit the Content-Type parameter to base the language on the most prevalent specification among the content items; again, content items that specify a different language are ignored. You can specify any combination of languages for the input and response content.Declaration
Swift
public enum Language : String -
The content that is to be analyzed. The service supports up to 20 MB of content for all
ContentItemobjects combined.Declaration
Swift
public var content: String -
A unique identifier for this content item.
Declaration
Swift
public var id: String? -
A timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
Declaration
Swift
public var created: Int? -
A timestamp that identifies when this content was last updated. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
Declaration
Swift
public var updated: Int? -
The MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is analyzed; plain text is processed as submitted.
Declaration
Swift
public var contenttype: String? -
The language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is
en(English). Regional variants are treated as their parent language; for example,en-USis interpreted asen. A language specified with the Content-Type parameter overrides the value of this parameter; any content items that specify a different language are ignored. Omit the Content-Type parameter to base the language on the most prevalent specification among the content items; again, content items that specify a different language are ignored. You can specify any combination of languages for the input and response content.Declaration
Swift
public var language: String? -
The unique ID of the parent content item for this item. Used to identify hierarchical relationships between posts/replies, messages/replies, and so on.
Declaration
Swift
public var parentid: String? -
Indicates whether this content item is a reply to another content item.
Declaration
Swift
public var reply: Bool? -
Indicates whether this content item is a forwarded/copied version of another content item.
Declaration
Swift
public var forward: Bool? -
Initialize a
ContentItemwith member variables.Declaration
Swift
public init( content: String, id: String? = nil, created: Int? = nil, updated: Int? = nil, contenttype: String? = nil, language: String? = nil, parentid: String? = nil, reply: Bool? = nil, forward: Bool? = nil )Parameters
contentThe content that is to be analyzed. The service supports up to 20 MB of content for all
ContentItemobjects combined.idA unique identifier for this content item.
createdA timestamp that identifies when this content was created. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
updatedA timestamp that identifies when this content was last updated. Specify a value in milliseconds since the UNIX Epoch (January 1, 1970, at 0:00 UTC). Required only for results that include temporal behavior data.
contenttypeThe MIME type of the content. The default is plain text. The tags are stripped from HTML content before it is analyzed; plain text is processed as submitted.
languageThe language identifier (two-letter ISO 639-1 identifier) for the language of the content item. The default is
en(English). Regional variants are treated as their parent language; for example,en-USis interpreted asen. A language specified with the Content-Type parameter overrides the value of this parameter; any content items that specify a different language are ignored. Omit the Content-Type parameter to base the language on the most prevalent specification among the content items; again, content items that specify a different language are ignored. You can specify any combination of languages for the input and response content.parentidThe unique ID of the parent content item for this item. Used to identify hierarchical relationships between posts/replies, messages/replies, and so on.
replyIndicates whether this content item is a reply to another content item.
forwardIndicates whether this content item is a forwarded/copied version of another content item.
Return Value
An initialized
ContentItem.
View on GitHub
ContentItem Structure Reference