Chapter 13 — Building an API from the HTML-Only Version 191
THREADID 10187696869432e6
STARRED Not Starred
SENDER Ben, me (3)
LABEL No Label
SUBJECT This is the third message
DATE: Jan 18
THREADID 101865b95fc7a35a
STARRED Not Starred
SENDER Ben Hammersley
LABEL No Label
SUBJECT This is the second message
DATE: Jan 18
THREADID 101480d8ef5dc74a
STARRED Starred
SENDER Ben Hammersley
LABEL Heads
SUBJECT Here’s a nice message.
This is a beautiful result. You can take all of the information out of the Inbox —
the sender, the date, the subject line, and so on — and do something with it pro-
grammatically. You are well on the way to producing your own API.
Now, place that aside for a moment and look at the individual messages. You
know that the individual message is identified by the ThreadID, and you now
know how to identify that. You can also see, by looking at the HTML code —
repeated here in Listing 13-5 — that the individual message is retrieved with a
URL constructed like so:http://gmail.google.com/gmail/h/CACHEBUST-
INGSTRING/?th=THREADID&v=c.
Listing 13-5: The Pertinent Bits of Listing A-4 for Finding
the Individual Message
...
<input type=checkbox name=t
value=”1025a4065d9b40bf”>
<img src=”/gmail/images/cleardot.gif”
Continued