Home | Index

Address Book XML/JSON API Developer Guide

Interaction Diagrams

Let's consider the following scenario: A Yahoo! Address Book user starts using a new application that caches the Address Book. The first Request from the application retrieves the whole Address Book. The first check for changes is negative. However, a later check for changes propagates a recent change to the application. In the last step, the application carries out an update to the Address Book and, at the same time, it retrieves changes that allow it to bring its cached copy back up to date.

User         Application         Address Book API                User
  |                |                      |                        |
  |                |                      |    uses the Y! AB      |
  |                |                      +<-----------------------+
  |                |                      |                        |
  | uses app for   |                      |                        |
  | the first time |                      |                        |
  +--------------->+  read req. ?myrev=0  |                        |
  |                +--------------------->+                        |
  |                |                      |                        |
  |                | all events needed to |                        |
  |                | build full AB copy   |                        |
  |                +<---------------------+                        |
  +<---------------+   rev=23             |                        |
  |                |                      |                        |
  |                |                      |                        |
  | uses app again |                      |                        |
  +--------------->+  ?myrev=23           |                        |
  |                +--------------------->+                        |
  |                |                      |                        |
  |                |   empty response     |                        |
  |                +<---------------------+                        |
  +<---------------+   rev=23             |                        |
  |                |                      |                        |
  |                |                      |   changes the Y! AB    |
  |                |                      +<-----------------------+
  |                |                      |                        |
  |                |                      |                        |
  | uses app again |                      |                        |
  +--------------->+  ?myrev=23           |                        |
  |                +--------------------->+                        |
  |                |                      |                        |
  |                |   change event(s)    |                        |
  |                +<---------------------+                        |
  +<---------------+   rev=25             |                        |
  |                |                      |                        |
  |                |                      |                        |
  |                |                      |   changes the Y! AB    |
  |                |                      +<-----------------------+
  |                |                      |                        |
  |                |                      |                        |
  |  uses app to   |                      |                        |
  |   modify AB    |                      |                        |
  +--------------->+                      |                        |
  |                |   change event(s)    |                        |
  |                |  ?myrev=25           |                        |
  |                +--------------------->+                        |
  |                |                      |                        |
  |                |   change events      |                        |
  |                | update confirmations |                        |
  |                +<---------------------+                        |
  +<---------------+   rev=28             |                        |
  |                |                      |                        |
  |                |                      |                        |