The examples provided by google are quite simple and does not provide much information about the methods and events of the timeline. The code provided above uses most of the methods and might come in handy while integrating this timeline in a bigger project.
Cheers!!!