0.2.0
Breaking Changes
-
There no longer is an application; You need to supervise a module using
Crux.Restyourself. -
Crux.Restis now a behaviour specifying rest functions
Crux.Restnow provides a__using__macro in order to inject those into your own module. -
Configuration is now done via child spec / arg (
t:Crux.Rest.options/0)
Crux.Rest.Util
- Removed
resolve_file/1, useresolve_image/1-2instead - Removed
encode_map_key/2, useresolve_image_in_map/2instead - Removed
map_file/1, usetransform_attachment/1instead - Removed
t:resolved_file/0, no new type exists for it. - Add
t:attachment/0used when sending files (and images) in messages as part of multipart - Add
t:image/0used for images as part of the json as data uris - Both new types only accept binary or data uris
Local paths and http(s) are no longer accepted.
You need to obtain the binary yourself.
Additions
- Add support for guild
banners [c7ae875] - Add
Crux.Rest.Requeststruct holding all necessary details required to make requests - Add
Crux.Rest.FunctionsimplementingCrux.Rest's specified functions returningCrux.Requests
(Using it is optional, may come in handy where requests should be executed multiple times) - Add bunch of functions to
Crux.Rest.Endpoints
Fixes
- Add closing
)to user agent [5e526dc] - Document
Crux.Rest.ApiError's method as the atom it actually is.