0.2.0
Breaking Changes
-
There no longer is an application; You need to supervise a module using
Crux.Rest
yourself. -
Crux.Rest
is now a behaviour specifying rest functions
Crux.Rest
now 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-2
instead - Removed
encode_map_key/2
, useresolve_image_in_map/2
instead - Removed
map_file/1
, usetransform_attachment/1
instead - Removed
t:resolved_file/0
, no new type exists for it. - Add
t:attachment/0
used when sending files (and images) in messages as part of multipart - Add
t:image/0
used 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
banner
s [c7ae875] - Add
Crux.Rest.Request
struct holding all necessary details required to make requests - Add
Crux.Rest.Functions
implementingCrux.Rest
's specified functions returningCrux.Request
s
(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.