EarnIn interview question

How would you design a library API?