Skip to content

Commit

Permalink
Add optional pageType parameter to ParselyMetadata class in Android SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinAkram committed Jan 17, 2024
1 parent 7307e21 commit 28623b5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class ParselyMetadata {
* @param thumbUrl URL at which the main image for this content is located.
* @param title The title of the content.
* @param pubDate The date this piece of content was published.
* @param pageType The type of page being tracked.
*/
public ParselyMetadata(
@Nullable ArrayList<String> authors,
Expand All @@ -38,7 +39,8 @@ public ParselyMetadata(
@Nullable ArrayList<String> tags,
@Nullable String thumbUrl,
@Nullable String title,
@Nullable Calendar pubDate
@Nullable Calendar pubDate,
@Nullable String pageType
) {
this.authors = authors;
this.link = link;
Expand All @@ -47,6 +49,7 @@ public ParselyMetadata(
this.thumbUrl = thumbUrl;
this.title = title;
this.pubDate = pubDate;
this.pageType = pageType;
}

/**
Expand Down Expand Up @@ -77,6 +80,9 @@ public Map<String, Object> toMap() {
if (this.pubDate != null) {
output.put("pub_date_tmsp", this.pubDate.getTimeInMillis() / 1000);
}
if (this.pageType != null) {
output.put("page_type", this.pageType);
}
return output;
}
}
Expand Down

0 comments on commit 28623b5

Please sign in to comment.