I want to make an API client but I'm not really sure where to start

I’m looking for some mentorship on how to best create an http api client.

I’ve started out in a new mix project https://github.com/digitalcake/nominatim_client

Since I’m fairly new to elixir I thought I would come here first to ask which other elixir api clients people think are good examples I could use to follow. I’m looking to see if there is a general pattern that works well for the community when creating api clients.

The base for this client I’m working on is using tesla and poison.

So far I have a very basic search function that passes only excepted api param keys.

There are many conditions I still need to work out in regards to the options,
“IE cant use some keys in tandem”.

Also there is a query option I’ve yet to incorporate since its more of a fuzzy finder.

I’d like to focus more on the pattern of results and how they should be returned from the html client.

All thoughts and criticisms welcome. :slight_smile:

Another thought would be since I need to write tests whats a good pattern for that considering I probably don’t want to hit the real api, though I can see wanting to validate with the real api once and a while.

Thanks - Josh

1 Like

I think I’m gonna start here. https://medium.com/@a4word/oh-the-api-clients-youll-build-in-elixir-f9140e2acfb6

1 Like

What’s the API that you want to write a client for? Oh, I see it in your github repo, sorry.

Open Street Map’s Nominatim https://wiki.openstreetmap.org/wiki/Nominatim