Add examples for the use of the Promise APIs