din 0.1.0-alpha+5 din: ^0.1.0-alpha+5 copied to clipboard
Dart API for Discord.
0.1.0-alpha+5 #
HttpClient
now throws anHttpClientException
on an HTTP or network error.WebSocketClient
,GatewayClient
now 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#onReady
now returns aGatewayReady
event.GatewayClient#onSequence
emits 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.dart
import. - Changes the definition of REST/requestJson to
Object
(may be aList
) - Renamed
Field#nullable
toField#optional
. - Removed
Field.type
andFieldType
which was not used. - Added
channels.getMessages
, adding support for APIs that returnList<T>
. - Added more fields to
Channel
,ChannelType
, and support forenum
types. - Added support for
DateTime
from 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
User
andMessage
structures.
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
.