Skip to content

Commit aa5396c

Browse files
committed
Add new params as vars in ParselyMetadata class
1 parent 83103cb commit aa5396c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Sources/Metadata.swift

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,66 @@ import Foundation
33
public class ParselyMetadata {
44
var canonical_url: String?
55
var pub_date: Date?
6+
var save_date: Date?
67
var title: String?
78
var authors: Array<String>?
89
var image_url: String?
910
var section: String?
1011
var tags: Array<String>?
1112
var duration: TimeInterval?
1213
var page_type: String?
14+
var urls: String?
15+
var post_id: String?
16+
var pub_date_tmsp: Date?
17+
var custom_metadata: String?
18+
var save_date_tmsp: Date?
19+
var thumb_url: String?
20+
var full_content_word_count: Int?
21+
var share_urls: Array<String>?
22+
var data_source: String?
23+
var canonical_hash: String?
24+
var canonical_hash64: String?
25+
var video_platform: String?
26+
var language: String?
27+
var full_content: String?
28+
var full_content_sha512: String?
29+
var network_id_str: String?
30+
var network_canonical: String?
31+
var content_enrichments: Dictionary<String, Any>?
32+
1333

1434
/**
1535
A class to manage and re-use metadata. Metadata contained in an instance of this
1636
class will conform to Parsely's schema.
1737

1838
- Parameter canonical_url: A post's canonical url. For videos, it is overridden with the vId and thus can be omitted.
1939
- Parameter pub_date: Date this piece of content was published.
40+
- Parameter save_date: Date this piece of content was saved.
2041
- Parameter title: Title of the content.
2142
- Parameter authors: Up to 10 authors are accepted.
2243
- Parameter image_url: Where the main image for this post is hosted.
2344
- Parameter section: Same as section for website integration.
2445
- Parameter tags: Up to 20 tags on an event are allowed.
2546
- Parameter duration: Durations passed explicitly to trackVideoStart take precedence over any in metadata.
2647
- Parameter page_type: The type of page being tracked
48+
- Parameter urls: A list of urls associated with this post.
49+
- Parameter post_id: A unique identifier for this post.
50+
- Parameter pub_date_tmsp: Date this piece of content was published.
51+
- Parameter custom_metadata: A string of custom metadata.
52+
- Parameter save_date_tmsp: Date this piece of content was saved.
53+
- Parameter thumb_url: Where the thumbnail image for this post is hosted.
54+
- Parameter full_content_word_count: The number of words in the full content.
55+
- Parameter share_urls: A list of urls associated with this post.
56+
- Parameter data_source: The data source for this post.
57+
- Parameter canonical_hash: The canonical hash for this post.
58+
- Parameter canonical_hash64: The canonical hash for this post.
59+
- Parameter video_platform: The video platform for this post.
60+
- Parameter language: The language for this post.
61+
- Parameter full_content: The full content for this post.
62+
- Parameter full_content_sha512: The full content sha512 for this post.
63+
- Parameter network_id_str: The network id for this post.
64+
- Parameter network_canonical: The network canonical for this post.
65+
- Parameter content_enrichments: The content enrichments for this post.
2766
*/
2867
public init(canonical_url: String? = nil,
2968
pub_date: Date? = nil,

0 commit comments

Comments
 (0)