The phone and online coding exercises are called pre-screening. Their goal is not to find out if you're a good programmer, but if you can write code at all. This is to save time and see as many candidates as possible.
Yes, i get the screening process; but asking a candidate to spend 8 hours on implementing a client library for their API at the beginning of the application process is definitely unreasonable. It's not a coding exercise, but a full blown deliverable.