How to implement application programming interface?