paulschneider / b247-api

0 stars 0 forks source link

Articles JSON format broken on Production and Server #65

Closed benvium closed 10 years ago

benvium commented 10 years ago

The JSON that API is spitting out for an article page has changed in a way that breaks the apps.

The issue is that the ‘html’ key in the article object was an HTML string, but is now suddenly an object with all kinds of properties:

                  "name": "Daily", 
                        "path": "/news-comment/daily/", 
                        "sefName": "daily"
                    }
                ]
            }, 
            "html": {// <— this was a string previously
                "apiKey": "AIzaSyDCxI1zC59DcR_rO5gKkpr_g7aT-1luIeA", 
                "article": {
                    "assignment": {
                        "category": {
                            "id": "1", 
                            "name": "Crime", 
                            "path": "b247://category/1/article/articles?subChannel=4", 
                            "sefName": "crime"
                        }, 
                        "channel": {
                            "id": "1", 
                            "name": "News and Comment", 
                            "path": "b247://channel/1", 
                            "sefName": "news-comment"
                        }, 
                        "subChannel": {
                            "id": "4", 
                            "name": "Daily", 
                            "path": "b247://subchannel/4/article", 
                            "sefName": "daily"
                        }
                    }, 
                    "author": "David Woodall", 
                    "body": "<p style=\"font-family: 'palatino linotype', palatino, serif; font-size: 14px; line-height: 21px;\">Police in Bristol have said they are ready to deal with an expected surge in the rate of domestic abuse during the World Cup which starts tonight.</p>\r\n<p style=\"font-family: 'palatino linotype', palatino, serif; font-size: 14px; line-height: 21px;\">Research by a team at Lancaster University reveals the risk of domestic abuse rises by 26% when England win or draw during the tourn...

http://b247api.co.uk/v1/articles?category=1&article=11&subchannel=4

paulschneider commented 10 years ago

Ben,

Have you tried this in the last hour or two? This was a bug I resolved this morning.

From the link you've provided : http://b247api.co.uk/v1/articles?category=1&article=11&subchannel=4

Screenshot (prod):

screen shot 2014-08-11 at 13 56 06

And on staging:

screen shot 2014-08-11 at 13 56 26

benvium commented 10 years ago

Nope, I tried it first thing (when it was broken) and only just submitted the issue. Glad you fixed it!

paulschneider commented 10 years ago

Can I close this one?