Make DiscordApiClient public
Created by: IDoEverything
Big one, though technically not a breaking change.
Summary
Makes the DiscordApiClient
and it's methods public.
Details
This allows users to use the ApiClient
on their DiscordClient
to make requests without needing the objects they're implemented on. Also made some public overloads for DoRequestAsync
and DoMultipartAsync
to allow them to use endpoints not currently implemented.
Changes proposed
- Made the properties and methods on the
DiscordApiClient
public - Made the
BaseDiscordClient
'sApiClient
public - Made the constructor for
DiscordMessageFile
public
Notes
A few of the methods couldn't be made public because of one of the parameters or return type being internal. These are mostly transport entities etc. It would be possible to fix this, but would require a bit of work to make sure it doesn't mess any of them up. The ones left internal (for now) are
- ListGuildMembersAsync
- ModifyGuildChannelPositionAsync
- ModifyGuildRolePositionAsync
- GetAuditLogsAsync
- ModifyCurrentUserAsync
- GetApplicationInfoAsync
Also missing xml documentation for all the endpoints, but it would be nearly impossible (or too time consuming) to do them by hand. Maybe some kind of script to copy the descriptions from the
DiscordRestClient
.