Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2030182769cc3221ee48a4864db44792 > files > 17

libyahoo2-devel-1.0.1-2.fc15.i686.rpm

Yahoo Addressbook Structure
---------------------------

<content time="time_t">
<addressbook time="time_t"><farm id="ddd"/><record userid="yahoo_id" fname="first_name" lname="last_name" nname="nick" email="email_addr" hphone="home_phone" wphone="work_phone" mphone="mobile_phone" dbid="db_id"/>
<record ..../>
<record ..../>
</addressbook>
</content>

time_t - a timestamp returned by the time(2) function.
ddd    - a three digit integer.  Don't know what it is yet
db_id  - record number - starts from 2, increments by 1.  
         Presumably your own information is record number 1.

All values (yahoo_id, first_name, last_name, etc.) are encoded as xml
entities, so _ becomes &#95;, @ becomes &#64;

Note: those are decimal values, not hex.

The <content></content> tags may contain tags other than the addressbook. 
For example, filters, imvironments, system, sms hosts, chat categories, etc.

To fetch the addressbook, make a HTTP GET request to:

http://insider.msg.yahoo.com/ycontent/?filter=timef&imv=timei&system=timesy&sms=timesm&chatcat=timec&ab2=timea&intl=us&os=win

Also send the Y and the T cookies.  These two cookies are only required for
the address book.

You may also send the B and the Q cookies, although their values never change
and it works without it:

	B=129gissujqlfc&b=2
	Q=q1=AACAAAAAAAAAfQ--&q2=Pi0iTg--

All values timef, timei, timesy, timesm, timec and timea are timestamps.
They specify the last time that you sync'ed with the server.

If you don't want to receive any particular block, set its timestamp to
the current time or just don't include it.  Set a timestamp to 0 to get
everything.

eg: To get only the addressbook, include only ab2=0

Apart from the address book, you can get everything else by typing in the
above url in your browser.


To set an addressbook entry, make a HTTP get request to:

http://insider.msg.yahoo.com/ycontent/?addab2=0&fname=<fname>&lname=<lname>&yid=<yahoo_id>&nname=<nname>....

The following fields are accepted:

fname - First Name
lname - Last Name
nname - Nick Name
email - Email
hphone - Home Phone
wphone - Work Phone
mphone - Mobile Phone
pp - Preferred Phone (0, 1, 2)
more to come...

Of these, at least fname, lname or company name must be set (any one of them).
yid must also obviously be set.

nname may not contain spaces, commas, or single/double quotes


The response to this request is the YAB entry in the above XML format.



To modify an addressbook entry, the above request is slightly modified.
Just after addab2=0 and before fname=..., we add the following url parameters:
&ee=1&ow=1&id=<db_id>

where db_id is the record number for this entry, set by the server.