Dialog2API: Task-Oriented Dialogue with API Description and Example Programs