edwardjmena / npr-android-app

Automatically exported from code.google.com/p/npr-android-app
0 stars 0 forks source link

Pull in secondary photos #148

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Pull up this story in the app: 
http://www.npr.org/2012/03/29/149617086/headed-for-the-butcher-chinese-dogs-are-
rescued
2. Compare to the website
3. Note the secondary photos on the web

What is the expected output? What do you see instead?
One would expect other photos to show up in the same order relative to the 
paragraph count.

Original issue reported on code.google.com by jpenn...@gmail.com on 12 Apr 2012 at 7:31

GoogleCodeExporter commented 8 years ago
This requires a website level key to obtain. Using that key, query the NPR API 
for the same story ID. You will find a node called <storytext>. Inside this 
parent, you will find child nodes containing information needed to insert 
secondary images inside the paragraph order. 

Example:

<text refId="149617759" num="7" paragraphNum="7" fieldNum="40"/>
<image refId="149618612" num="8" fieldNum="0"/>
<text refId="149617759" num="9" paragraphNum="8" fieldNum="40"/>

This would mean between graphs 7 and 8 there is a photo.

Original comment by jpenn...@gmail.com on 12 Apr 2012 at 8:07

GoogleCodeExporter commented 8 years ago

Original comment by jpenn...@gmail.com on 12 Apr 2012 at 8:16

GoogleCodeExporter commented 8 years ago
Currently, we're just parsing the story list feed for the stories.  This feed 
just gives us a subset of each story and doesn't include the storytext tag that 
has information for laying out the story.

- Is there any chance that the storytext tag could be added to query call?  It 
would certainly simplify additional image parsing.  The rest of the information 
needed to lay out the story is included in the query call.

- Assuming not, we'll need to switch to getting the list and requesting the 
individual stories sequentially.  This will add a fair amount of additional 
traffic to/from the app, since we'll request the list of 10 stories, then 
request and parse each of the stories.  Note that we could wait until the user 
brings up the story activity itself before requesting and parsing it, but 
that'll make the app feel slower and also make the swipe between stories less 
functional (i.e. bring up a story then swipe right to see the next one).

Obviously this can be done technically, but if it's not feasible to update the 
feed, it may not be worth the additional overhead to add secondary images.

Original comment by justinfr...@gmail.com on 11 Jun 2012 at 5:25

GoogleCodeExporter commented 8 years ago
Missed the layout tag in the story list.  I should be able to handle it from 
here.

Original comment by justinfr...@gmail.com on 14 Jun 2012 at 6:16

GoogleCodeExporter commented 8 years ago

Original comment by justinfr...@gmail.com on 9 Jul 2012 at 5:29

GoogleCodeExporter commented 8 years ago

Original comment by jpenn...@gmail.com on 13 Nov 2012 at 10:28