din 0.1.0-alpha+8
din: ^0.1.0-alpha+8 copied to clipboard
Dart API for Discord.
0.1.0-alpha+8 #
- Made JSON parse failures more debuggable - throws a
FormatException. - Fixed a number of subtle bugs in the generated JSON parsers.
0.1.0-alpha+7 #
-
Updated to
code_builder: ^2.0.0-alpha+3. -
Fixed a bug where
List<Structure>types always returnedList<Map>. #11 -
Split most of the Gateway events into
GatewayClient.events. -
Renamed
GatewayReadytoReady, and moved toGatewayEvents.ready. -
Add support for resuming a connection (
ApiClient.resume).
0.1.0-alpha+6 #
- Added
FakeHttpClientinplatform/test.dartfor simple testing. - Changed
GatewayClient.onMessageto emit aMessagepayload. - Fixed a bug in the heartbeat mechanic.
- Added
Message#channelId.
0.1.0-alpha+5 #
HttpClientnow throws anHttpClientExceptionon an HTTP or network error.WebSocketClient,GatewayClientnow supportFuture<String> get onClose.- Added ability to customize the initial identification to
GatewayClient:
doConnect() async {
await apiClient.connect(gateway.url, onIdentify: (strategy) {
return strategy.asBrowser('...');
});
}
GatewayClient#onReadynow returns aGatewayReadyevent.GatewayClient#onSequenceemits sequence codes, when received. These are used internally to reply to heartbeats, but will also be usable in a future release to do a resume action (instead of an initial connection).
0.1.0-alpha+4 #
- Added incomplete web socket and gateway support:
test('should return a WSS gateway and be able to connect to it', () async {
final gateway = await apiClient.gateway.getGatewayBot();
expect(gateway.url, isNotEmpty);
expect(gateway.shards, greaterThan(0));
final connection = await apiClient.connect(gateway.url);
expect(await connection.onHello, isList);
expect(await connection.onReady, isNotNull);
await connection.close();
});
0.1.0-alpha+3 #
- Now exporting structures and resources via the main
din.dartimport. - Changes the definition of REST/requestJson to
Object(may be aList) - Renamed
Field#nullabletoField#optional. - Removed
Field.typeandFieldTypewhich was not used. - Added
channels.getMessages, adding support for APIs that returnList<T>. - Added more fields to
Channel,ChannelType, and support forenumtypes. - Added support for
DateTimefrom an ISO date string.
0.1.0-alpha+2 #
- Added support for
channels.createMessage. - Added support for
users.getCurrentUser. - Fixed a bug where JSON payloads did not have the right
Content-Type. - Added the
UserandMessagestructures.
0.1.0-alpha+1 #
- Small change to
REAMDE.md.
0.1.0-alpha #
- Initial release, mostly as a proof-of-concept only. See
README.md.