din 0.1.0-alpha+5 copy "din: ^0.1.0-alpha+5" to clipboard
din: ^0.1.0-alpha+5 copied to clipboard

outdatedDart 1 only

Dart API for Discord.

0.1.0-alpha+5 #

  • HttpClient now throws an HttpClientException on an HTTP or network error.
  • WebSocketClient, GatewayClient now support Future<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 a GatewayReady 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 a List)
  • Renamed Field#nullable to Field#optional.
  • Removed Field.type and FieldType which was not used.
  • Added channels.getMessages, adding support for APIs that return List<T>.
  • Added more fields to Channel, ChannelType, and support for enum 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 and Message 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.
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Dart API for Discord.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

async, meta

More

Packages that depend on din