Some time ago, my friend Monty and I considered integrating Medium API into our app, in.notes. At that time their API was relatively young and unpolished.
A couple of days ago I decide to take another look at it. What started as a single class with two functions for token retrieval turned into a full blown OAuth client with Keychain support. If you would rather skip the explanation and go straight to sample code, here it is!
I should mention that I tried keeping my implementation somewhat flexible to support other APIs. I agree that it would have been much better to work with at least two end points to map out similarities, my current implementation can be modded with relative ease in the future.