paulschneider / b247-api

0 stars 0 forks source link

Some adverts mixed with articles in cycle are coming with displayStyle:1 instead of 2 #83

Closed pablocarrillo closed 10 years ago

pablocarrillo commented 10 years ago

This is the log, this is making the app render the adverts with incorrect sizes

response.body={"success":{"message":"Success.","statusCode":200,"method":"GET","endpoint":"v1\/subchannel\/4\/article","time":1408626308,"data":{"channel":{"id":1,"name":"News and Comment","description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.","colour":"#33b9f8","secondaryColour":"#222c5c","isEnabled":true,"subChannels":[{"id":4,"name":"Daily","description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.","sefName":"daily","path":"\/news-comment\/daily\/","displayType":{"id":1,"type":"Article"},"isEnabled":false,"categories":[{"id":1,"name":"Crime","sefName":"crime","path":"\/news-comment\/daily\/crime\/","isEnabled":true},{"id":2,"name":"Media","sefName":"media","path":"\/news-comment\/daily\/media\/","isEnabled":true},{"id":9,"name":"Politics","sefName":"politics","path":"\/news-comment\/daily\/politics\/","isEnabled":true},{"id":10,"name":"George Ferguson","sefName":"george_ferguson","path":"\/news-comment\/daily\/george_ferguson\/","isEnabled":false}]}]},"adverts":[{"id":1,"title":"1","url":"http:\/\/www.bristol247.com\/","isAdvert":true,"type":"letterbox","platform":"mobile","media":{"filepath":"http:\/\/b247cdn.co.uk\/ad-1\/letterbox\/mobile\/n-c_daily_banner-1407203046.jpg","alt":"2","title":"2","width":600,"height":100}},{"id":6,"title":"6","url":"http:\/\/www.bristol247.com\/","isAdvert":true,"type":"letterbox","platform":"mobile","media":{"filepath":"http:\/\/b247cdn.co.uk\/ad-6\/letterbox\/mobile\/n-c_daily_crime_5_banner-1407204396.jpg","alt":"2","title":"2","width":600,"height":100}},{"id":5,"title":"5","url":"http:\/\/www.bristol247.com\/","isAdvert":true,"type":"letterbox","platform":"mobile","media":{"filepath":"http:\/\/b247cdn.co.uk\/ad-5\/letterbox\/mobile\/n-c_daily_crime_4_banner-1407204367.jpg","alt":"1","title":"1","width":600,"height":100}}],"articles":[{"id":375,"title":"Kevin creating a test article","subHeading":"All the news about creating articles","isAdvert":false,"isPromoted":true,"published":"2014-08-07","displayType":{"id":1,"type":"Article"},"displayStyle":2,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":2,"name":"Media"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/375\/list\/mobile\/article-hero-image-1407424376.jpg"}},{"id":8,"title":"Bristol tobacco dealers freedom up in smoke after raids","subHeading":"A Bristol man has been jailed for eight months after council officers discovered an illegal stash of 750,000 cigarettes and 250kg of tobacco","isAdvert":false,"isPromoted":true,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/8\/list\/mobile\/cityscapes-night-traffic-city-lights-tiltshift-street-2560x1440-wallpaper_www.wallmay.com_13-1406735281.jpg"}},{"id":385,"title":"Bristol RPZ: Scheme for St Pauls and Bower Ashton to start","subHeading":"Scheme for Bower Ashton will go live on Sept 29, while St Pauls will be rolled out Oct 20","isAdvert":false,"isPromoted":false,"published":"2014-08-11","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":2,"name":"Media"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/385\/list\/mobile\/test-1407791674.jpg"}},{"id":6,"title":"Man charged over Cribbs Causeway stabbing","subHeading":"A man has been charged with attempted murder after another man was stabbed in the back at The Mall, Cribbs Causeway on Saturday lunchtime","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":2,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/6\/list\/mobile\/cc-1407370439.jpg"}},{"id":34,"title":"34","url":"http:\/\/www.bristol247.com\/","isAdvert":true,"type":"letterbox","platform":"mobile","media":{"filepath":"http:\/\/b247cdn.co.uk\/ad-34\/letterbox\/mobile\/f-d_o-c_indian_8_banner-1407205848.jpg","alt":"7","title":"7","width":600,"height":100},"displayStyle":2},{"id":7,"title":"Nick Gargan: Suspended police chief faces data protection questions","subHeading":"IPCC said it had uncovered evidence Mr Gargan may have sent \u00e2??emails concerning police business\u00e2?\u00a6 to individuals unconnected to the force\u00e2?\u009d","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/7\/list\/mobile\/city-q-c-800-450-1-1406734840.jpg"}},{"id":9,"title":"IPCC questions more police in Bijan Ebrahimi murder probe","subHeading":"Some 16 police officers and civilian staff are under investigation. Nine of this group are officers, three are under investigation for criminal offenc","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/9\/list\/mobile\/fashion-q-c-800-450-6-1406735614.jpg"}},{"id":10,"title":"Arrest made in Walkabout bar rape investigation","subHeading":"A 20-year-old man has been arrested after a woman was seriously sexually assaulted at the Walkabout bar in Bristol last month","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/10\/list\/mobile\/"}},{"id":11,"title":"Bristol police ready for World Cup domestic violence","subHeading":"Research reveals the risk of domestic abuse rises by 26% when England win or draw during the tournament, with a 38% increase reported when the team lo","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/11\/list\/mobile\/garylive2ass-1406737019.png"}},{"id":12,"title":"Police warn on courier fraudsters threat to elderly","subHeading":"Police launch campaign against a team of fraudsters who have swindled at least \u00c2\u00a3100,000 from mainly elderly victims across the South West","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/12\/list\/mobile\/grid_2__koenigsegg_agera_r_by_ultam1t3rac3r-d633b4o-1406737155.png"}},{"id":13,"title":"Bristol bomb hoax: Police appeal to taxi drivers for information","subHeading":"A 42-year-old man was arrested on suspicion of a bomb hoax (placing with intent) and was released on bail yesterday","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/13\/list\/mobile\/au1145201-1406737303.jpg"}},{"id":14,"title":"Five arrested over death of man in Stapleton","subHeading":"Those detained are all male, aged between 17 and 22, and have all been arrested on suspicion of murder and burglary","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/14\/list\/mobile\/"}},{"id":15,"title":"Man found dead in Stapleton is named","subHeading":"Simon Bowring was found in a house in Welsford Avenue on Sunday. Results of a post-mortem examination are \u00e2??inconclusive\u00e2??","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/15\/list\/mobile\/iohsunset11-24-13-1406737586.jpg"}},{"id":15,"title":"15","url":"http:\/\/www.bristol247.com\/","isAdvert":true,"type":"letterbox","platform":"mobile","media":{"filepath":"http:\/\/b247cdn.co.uk\/ad-15\/letterbox\/mobile\/n-c_features_health_4_banner-1407204758.jpg","alt":"3","title":"3","width":600,"height":100},"displayStyle":2},{"id":16,"title":"Death of man found in Stapleton house unexplained","subHeading":"Body of the 49-year-old man was found in a house in Welsford Avenue at about 1.50pm on Sunday","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":2,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/16\/list\/mobile\/landscapes-cityscapes-bridges-towns-city-skyline-rainbow-bridge_www.wallmay.net_80-1406737699.jpg"}},{"id":17,"title":"Avon and Somerset chief constable suspended over claims of inappropriate behaviour to women","subHeading":"Police and crime commissioner Sue Mountstevens said she had referred the allegations to IPCC and suspended Nick Gargan to protect integrity of investi","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/17\/list\/mobile\/nacho-monreal-of-arsenal-1406737810.jpg"}},{"id":1,"title":"Kerb crawler course profits pay for school pupils summer camp","subHeading":"Pupils from Millpond Primary School are affected by on-street prostitution, but effect is mitigated by funds for camp and visual improvements to their","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/1\/list\/mobile\/abstract-q-c-800-450-9-1406732805.jpg"}},{"id":18,"title":"Charity offers £1,000 reward to catch dog abuser","subHeading":"New award from PETA to catch man who kicked and choked greyhound, then went on to assault Good Samaritan who intervened to prevent further cruelty","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":2,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":null},{"id":30,"title":"30","url":"http:\/\/www.bristol247.com\/","isAdvert":true,"type":"letterbox","platform":"mobile","media":{"filepath":"http:\/\/b247cdn.co.uk\/ad-30\/letterbox\/mobile\/f-d_guide_italian_4_banner-1407205731.jpg","alt":"6","title":"6","width":600,"height":100},"displayStyle":2},{"id":2,"title":"Images of carers injuries released in hunt for attackers","subHeading":"A 28-year-old carer has released photos to highlight the injuries she received to provoke people into helping find the men who attacked her","isAdvert":false,"isPromoted":false,"published":"2014-07-30","displayType":{"id":1,"type":"Article"},"displayStyle":1,"assignment":{"channel":{"id":1,"name":"News and Comment"},"subChannel":{"id":4,"name":"Daily"},"category":{"id":1,"name":"Crime"}},"media":{"filepath":"http:\/\/b247cdn.co.uk\/2\/list\/mobile\/1-4x6kx8gru7dpviih57wvpa-1406732005.jpeg"}}],"pagination":{"totalItems":25,"perPage":20,"hasPages":false,"hasMultiplePages":true,"totalPages":2,"currentPage":1,"nextPage":2,"prevPage":null}}},"source":[{"platform":false,"browser":false}]}
paulschneider commented 10 years ago

Try now. I wouldn't say this is a bug though. They have the option of choosing single or double ads. They should be able to choose any combination of 1 & 2's (i.e singles and doubles) they like, as long as they add up to the 3 column layout that is.

paulschneider commented 10 years ago

PS.... I dont think we can rely on the imagery thats there at the moment. None of the ads render properly on the website, some are really pixelated and others are obviously just mean to be iOS ads.

Its test data after all, right?

pablocarrillo commented 10 years ago

AFAIK there is no single size adverts, but I use that key to render differently adverts at double size and adverts at full size (like letterbox). That's is a previous step to load the image, that as you said don't match the size of the advert in many places.

paulschneider commented 10 years ago

Happy this one is resolved Pablo? Just clearing down all my tickets and outstanding issues