medium v0.1.0 Medium.Middlewares.Codec
This module acts as a Tesla
middleware in order to process
the responses coming from the Medium API.
Summary
Functions
This method is caled when this module is plugged as a middleware, and is in charge of processing the request by
Extract from the response Map the errors or the response data
Converts to snake_case all the keys of all maps inside a list
Converts all string keys in list of maps to atom keys
Functions
This method is caled when this module is plugged as a middleware, and is in charge of processing the request by:
- Handling error responses via
descompose_keys/1
- Converting all CamelCase keys to snake_case via
snake_keys/1
- Converting all string keys to atom keys via
string_to_atom_keys/1
Extract from the response Map the errors or the response data.