Releases: SpaceEEC/crux_rest
Releases · SpaceEEC/crux_rest
0.2.2
0.2.1
Deprecations
- The through
Rest.__using__/1injectedrequest/2andrequest!/2are now deprecated in favor of their single arity counter parts [b84ed09] c:Rest.get_guild_vanity_urlis now deprecated in favor ofc:Rest.get_guild_vanity_invite[9b6dc0b]
Fixes
- Convert
datato a map inRest.Functions.create_message/2,3[bee289c] - Fix invalid typespecs of
t:Util.channel_position_resolvable/0andt:Rest.modify_guild_emoji_data /0[1d96805] - Handle non-JSON responses properly [6c23b5f]
- Make
reasonnilable and optional everywhere [5ccb48b] - Use
:patchwhen editing the current user viamodify_current_user/1[23deae3] rolesin emoji creating and editing functions are now actually optional [c0f2724]- Use
:patchinmodify_current_user/1[23deae3] - Allow
c:Rest.get_current_user_guilds/1to be called as/0and query-string the parameters [fed13ad] t:Rest.create_message_data/0'snoncecan be negative or a string [185075f]- Satisfy / Silence the dialyzer everywhere [b7fd6ba...00a553b]
Features
- Use new
X-RateLimit-Reset-Afterheader withmillisecondX-RateLimit-Precision[d8c9c82]
This removes the need to calculate the time offset to Discord's servers and therefore also:timex.
This also removes the need to hard code sub second rate limits (was only done for creating reactions). - Add
c:Rest.get_current_user/0to fetch the current user [fcc7474] - Add
transformoption toRest.__using__to allow obtaining untransformed data [b644f9f] - Allow
String.tsnowflakes being used by using the newresolvablesfromCrux.Structs[33e5301] - Add
c:Rest.get_guild_vanity_invite/1[9b6dc0b] - Document
flagsproperty oft:Rrest.message_edit_data/0allowing to (un-)suppress embeds [dda771f]
Dependencies
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.
0.1.7
Deprecations
Crux.Rest.Endpoints.cdn/0is deprecated, please useCrux.Rest.CDN.base_url/0instead. [39c2149], [0e67edb]Crux.Rest.Endpoints.api/0is deprecated, please useCrux.Rest.Endpoints.base_url/0instead. [0e67edb]
Additions
- Add support for
rate_limit_per_user[fa50db8] - Add support for
AuditLogs[a54c107] - Add support for
Webhooks[a54c107]
Fixes
0.1.6
Deprecations
Crux.Rest.Endpoints.cdn/0is deprecated, please useCrux.Rest.CDN.base_url/0instead. [39c2149], [0e67edb]Crux.Rest.Endpoints.api/0is deprecated, please useCrux.Rest.Endpoints.base_url/0instead. [0e67edb]
Fixes
- Properly let HTTPoison errors bubble up [6493795]
- Properly resolve files when using
Crux.Rest.create_message/2with a keyword [bc450a7...aab5e95]
0.1.5
Deprecations
Crux.Rest.Endpoints.cdn/0is deprecated, please useCrux.Rest.CDN.base_url/0instead. [39c2149], [0e67edb]Crux.Rest.Endpoints.api/0is deprecated, please useCrux.Rest.Endpoints.base_url/0instead. [0e67edb]
Additions
- Add a CDN module [39c2149], [764f932], [f9cc296]
- Add bangified versions for
Crux.Rest's functions [660bf91], [efbee5c]
Fixes
0.1.4
0.1.3
0.1.2
0.1.1
Additions
- Add Tests for
almostall API independent functions - Add a few endpoints that were missing
- Add unified types for resolvables
- Add unified functions for resolving
Fixes
- Fix a few incorrect typedocs and specs
- Fixed a few incorrect resolving or incorrect default args