Add a detailed example of usage with promises