update API example in README