Skip to content

0.2.0

Compare
Choose a tag to compare
@SpaceEEC SpaceEEC released this 03 Apr 11:45
0.2.0
0a1549a

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, use resolve_image/1-2 instead
  • Removed encode_map_key/2, use resolve_image_in_map/2 instead
  • Removed map_file/1, use transform_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 banners [c7ae875]
  • Add Crux.Rest.Request struct holding all necessary details required to make requests
  • Add Crux.Rest.Functions implementing Crux.Rest's specified functions returning Crux.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.