Could the API show where things are on the site please?

46 views
Skip to first unread message

Helgosam

unread,
Apr 30, 2012, 10:07:08 AM4/30/12
to guardian...@googlegroups.com
I clicked on "Feedback and Questions" and it brought me here:

I want to use the API to return the articles which are on the homepage of the guardian site, in the order that they appear on the guardian site, in real time.

I could only get a list of articles through the search in order of "newest" or "relevance" - I tried leaving all other fields blank, and searching all articles ranked by relevance, hoping that the most relevant would be breaking news right now on the front page of the guardian site, but it was a random order!

Does this exist in the API?  Could it be built in to the API?

Cheers

Michael Brunton-Spall

unread,
Apr 30, 2012, 8:59:56 PM4/30/12
to guardian...@googlegroups.com
Hey Helgosam,

The homepage of the guardian site is more or less represented by the item endpoint '/'.
The reason for this is that the entire guardian.co.uk site should be represented by the same path on the api as exists on the website (excluding some weirder bits of it).
Doing a normal query for that endpoint wont return you anything because the front page is a little bit special.  For any normal navigation page, that would be just like a tag query, so /travel/france will show you anything that is tagged with the France tag.
But the front page is not a tag, so what you want is not the latest stuff from that item, but the editors picks for that item, which you can get by selecting the Show Editors Picks box at the bottom, or adding the show-editors-picks=true query parameter.


Hope that helps.  I'll see if I can get a bit of time tomorrow to write up a few answers to the other questions that came through here.

Michael Brunton-Spall
Developer Advocate
guardian.co.uk



--
You received this message because you are subscribed to the Google Groups "Guardian API Talk" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/guardian-api-talk/-/7fGLubQFZS0J.
To post to this group, send an email to guardian...@googlegroups.com.
To unsubscribe from this group, send email to guardian-api-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/guardian-api-talk?hl=en-GB.

Please consider the environment before printing this email.
------------------------------------------------------------------
Visit guardian.co.uk - newspaper of the year

www.guardian.co.uk    www.observer.co.uk     www.guardiannews.com 

On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone
 
To save up to 30% when you subscribe to the Guardian and the Observer
visit www.guardian.co.uk/subscriber 
---------------------------------------------------------------------
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News & Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

Helgosam

unread,
Jan 29, 2013, 12:23:01 PM1/29/13
to guardian...@googlegroups.com
Cool, many thanks Michael (sorry for the delay in replying)
Reply all
Reply to author
Forward
0 new messages