Releases: SpaceEEC/crux_rest
Releases · SpaceEEC/crux_rest
0.2.2
0.2.1
Deprecations
- The through
Rest.__using__/1
injectedrequest/2
andrequest!/2
are now deprecated in favor of their single arity counter parts [b84ed09] c:Rest.get_guild_vanity_url
is now deprecated in favor ofc:Rest.get_guild_vanity_invite
[9b6dc0b]
Fixes
- Convert
data
to a map inRest.Functions.create_message/2,3
[bee289c] - Fix invalid typespecs of
t:Util.channel_position_resolvable/0
andt:Rest.modify_guild_emoji_data /0
[1d96805] - Handle non-JSON responses properly [6c23b5f]
- Make
reason
nilable and optional everywhere [5ccb48b] - Use
:patch
when editing the current user viamodify_current_user/1
[23deae3] roles
in emoji creating and editing functions are now actually optional [c0f2724]- Use
:patch
inmodify_current_user/1
[23deae3] - Allow
c:Rest.get_current_user_guilds/1
to be called as/0
and query-string the parameters [fed13ad] t:Rest.create_message_data/0
'snonce
can be negative or a string [185075f]- Satisfy / Silence the dialyzer everywhere [b7fd6ba...00a553b]
Features
- Use new
X-RateLimit-Reset-After
header withmillisecond
X-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/0
to fetch the current user [fcc7474] - Add
transform
option toRest.__using__
to allow obtaining untransformed data [b644f9f] - Allow
String.t
snowflakes being used by using the newresolvables
fromCrux.Structs
[33e5301] - Add
c:Rest.get_guild_vanity_invite/1
[9b6dc0b] - Document
flags
property oft:Rrest.message_edit_data/0
allowing 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.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.
0.1.7
Deprecations
Crux.Rest.Endpoints.cdn/0
is deprecated, please useCrux.Rest.CDN.base_url/0
instead. [39c2149], [0e67edb]Crux.Rest.Endpoints.api/0
is deprecated, please useCrux.Rest.Endpoints.base_url/0
instead. [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/0
is deprecated, please useCrux.Rest.CDN.base_url/0
instead. [39c2149], [0e67edb]Crux.Rest.Endpoints.api/0
is deprecated, please useCrux.Rest.Endpoints.base_url/0
instead. [0e67edb]
Fixes
- Properly let HTTPoison errors bubble up [6493795]
- Properly resolve files when using
Crux.Rest.create_message/2
with a keyword [bc450a7...aab5e95]
0.1.5
Deprecations
Crux.Rest.Endpoints.cdn/0
is deprecated, please useCrux.Rest.CDN.base_url/0
instead. [39c2149], [0e67edb]Crux.Rest.Endpoints.api/0
is deprecated, please useCrux.Rest.Endpoints.base_url/0
instead. [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