Skip to content

Commit

Permalink
Issue #1198 - media_product_type added to IgMedia and some comments a…
Browse files Browse the repository at this point in the history
…dded
  • Loading branch information
nbartels committed Feb 18, 2022
1 parent 751ff6b commit b98ecfd
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/lombok/com/restfb/types/instagram/IgMedia.java
Expand Up @@ -64,7 +64,13 @@ public class IgMedia extends IgMediaChild {
/**
* Count of likes on the media.
*
* Excludes likes on album child media and likes on promoted posts created from the media. Includes replies on comments.
* Excludes likes on album child media and likes on promoted posts created from the media. Includes replies on
* comments.
*
* <ul>
* <li><strong>v10.0 and older calls</strong>: value will be 0 if the media owner has hidden like counts it.</li>
* <li><strong>v11.0+ calls</strong>: field will be omitted if media owner has hidden like counts on it.</li>
* </ul>
*/
@Getter
@Setter
Expand Down
27 changes: 27 additions & 0 deletions src/main/lombok/com/restfb/types/instagram/IgMediaChild.java
Expand Up @@ -46,11 +46,23 @@ public class IgMediaChild extends FacebookType {
@Facebook("media_type")
private String mediaType;

/**
* Media URL. Will be omitted from responses if the media contains copyrighted material, or has been flagged for a
* copyright violation.
*/
@Getter
@Setter
@Facebook("media_url")
private String mediaUrl;

/**
* Surface where the media is published. Can be AD, FEED, or STORY.
*/
@Getter
@Setter
@Facebook("media_product_type")
private String mediaProductType;

/**
* ID of Instagram user who created the media. Only returned if the app user making the query also created the media,
* otherwise <code>username</code> field will be returned instead.
Expand All @@ -63,26 +75,41 @@ public class IgMediaChild extends FacebookType {
@Deprecated
private IgUser owner;

/**
* Permanent URL to the media.
*/
@Getter
@Setter
@Facebook
private String permalink;

/**
* Shortcode to the media.
*/
@Getter
@Setter
@Facebook
private String shortcode;

/**
* Media thumbnail URL. Only available on VIDEO media.
*/
@Getter
@Setter
@Facebook("thumbnail_url")
private String thumbnailUrl;

/**
* ISO 8601 formatted creation date in UTC (default is UTC ±00:00)
*/
@Getter
@Setter
@Facebook
private Date timestamp;

/**
* Username of user who created the media.
*/
@Getter
@Setter
@Facebook
Expand Down

2 comments on commit b98ecfd

@xberger
Copy link

@xberger xberger commented on b98ecfd Jul 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nbartels

Is it on purpose, that now IgMediaChild and IgMedia both have media_product_type / mediaProductType fields, while IgMediaChild is extending IgMedia?

@nbartels
Copy link
Contributor Author

@nbartels nbartels commented on b98ecfd Jul 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the mediaProductType in IgMedia is a duplicate from the IgMediaChild and can be removed.

#1241

Please sign in to comment.