Update apple news article with isHidden property #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated articleMetadataFromOpts for supporting isHidden property
We will get an error code NOT_ALLOWED while trying to change isPreview flag from false to true.
Once an article has been published with isPreview set to false, the setting cannot be changed to true.
We could use isHidden property to temporarily keeping the article as hidden. We could make use of the update operation with isHidden set to true.
isHidden - Boolean that indicates whether the article should be temporarily hidden from display in the News feed. Note that a hidden article is accessible if you have a direct link to the article.
Default: false
Further reference:-
https://developer.apple.com/documentation/apple_news/update_an_article
https://developer.apple.com/documentation/apple_news/delete_an_article