Today is your day.
You’re off to Build API Clients!
You’re off and away!
You have Elixir in your head.
You have GenServer, GenStage, and Streams to use.
You can pipe (|>) your functions
any many times as you choose.
You interact with a web service usign a client. That could be as minimialistic as Curl, or your browser, but most likley you will access the API through a library written in the language of your application (e.g. Ruby, Elixir, PHP, etc).
Some APIs publish official clients. (Un?)fortunately Elixir is not as in demand (yet!) as we would like, and usually is not available. Open source to the rescue, but some (well I) feel that implementing client access to an API is a great way to learn the API, as well as learn Elixir; especially if you want to take advantage of some of the unique characteristics Elixir has to offer.
In this talk, we will be exploring a few popular APIs for
+ Infrastructure: DigitalOcean
+ Ecommerce: Questrade, Stripe
+ Email: Mailgun
The talk will provide some more abstract implementation patterns that can generically apply to API client development including:
+ Elixir project structure (using Dave Thomas' template generator)
+ Managing API Endpoint / Payloads (e.g. URLs, HTTP verb, encoding, headers)
+ Authentication like OAuth
+ Logging / Persistence
+ Retries / Error Handling
+ Testing / Deployment
Don't be afraid of NIH (Not Invented Here) syndrome when you are learning. Once your client is feature complete, you will now know the API relatively well, and at least one way to implement it. This should make your evaluation of existing clients much easier.
Software Developer (CrossFit HQ)