Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most Popular API : incoherent type when empty value #38

Open
MickaelHrndz opened this issue Nov 30, 2017 · 4 comments
Open

Most Popular API : incoherent type when empty value #38

MickaelHrndz opened this issue Nov 30, 2017 · 4 comments

Comments

@MickaelHrndz
Copy link

Hello,

In the Most Popular API, the media element of an article is an empty string instead of an empty array. This causes type issues when parsing.

@MickaelHrndz
Copy link
Author

This issue seems to have been solved as I don't get empty media elements anymore.

@MickaelHrndz
Copy link
Author

This is happening again. To bring an exemple, this is an article with an empty media attribute, copied from a Most Popular API response :
{"url":"https:\/\/www.nytimes.com\/interactive\/2017\/10\/04\/opinion\/thoughts-prayers-nra-funding-senators.html","adx_keywords":"","column":"","section":"Opinion","byline":"By DAVID LEONHARDT, IAN PRASAD PHILBRICK and STUART A. THOMPSON","type":"Interactive","title":"The Congress Members Receiving the Most N.R.A. Funding","abstract":"Thoughts and prayers and the N.R.A.: Here are the top career recipients of N.R.A. campaign money.","published_date":"2017-10-04","source":"The New York Times","id":100000005478110,"asset_id":100000005478110,"views":3,"des_facet":["GUN CONTROL"],"org_facet":["NATIONAL RIFLE ASSN","SENATE","HOUSE OF REPRESENTATIVES"],"per_facet":"","geo_facet":"","media":""}

@MickaelHrndz MickaelHrndz reopened this Feb 16, 2018
@RayanZahab
Copy link

RayanZahab commented May 21, 2018

This is happening again !
http://api.nytimes.com/svc/mostpopular/v2/mostviewed/all-sections/7.json?apikey=XYZ

{
"url":"https://www.nytimes.com/2018/05/17/style/royal-wedding-time-date.html",
"adx_keywords":"Royal Wedding;Weddings and Engagements;Time;Harry, Prince of Wales;Markle, Meghan",
"column":null,
"section":"Style",
"byline":"By THE NEW YORK TIMES",
"type":"Article",
"title":"What Time Was the Royal Wedding in My Time Zone?",
"abstract":"Interesting news: The royal wedding is now in the past. ",
"published_date":"2018-05-17",
"source":"The New York Times",
"id":100000005904642,
"asset_id":100000005904642,
"views":4,
"des_facet":[
"WEDDINGS AND ENGAGEMENTS",
"TIME"
],
"org_facet":"",
"per_facet":[
"HARRY, PRINCE OF WALES",
"MARKLE, MEGHAN"
],
"geo_facet":"",
"media":""
},

@nyt-hughmandeville
Copy link
Collaborator

It is a moving 24 hour window that is updated every 20 minutes.
So currently window is 8:40pm Saturday to 8:40pm Sunday.
In 20 minutes it will calculate the window 9pm yesterday to 9pm today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants