Code Generation from Remote APIs

You took your metaprogramming skills to the next level with our last exercise and created a couple of essential tools to add to your Elixir arsenal. Now let’s take a break from serious work and explore just how extensible Elixir really is. We aren’t limited to generating code just from flat text files or Elixir data structures. Let’s create a Hub mix project to define a module’s functions directly from GitHub’s public API. We’ll produce a module that contains embedded information about our public repositories with the ability to launch a web browser directly to the project from a function call.

Mix Project Setup

Let’s create a new mix project to house our implementation and application dependencies. After a couple ...

Get Metaprogramming Elixir now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.