circumstellar 0.1.51

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new48

Circumstellar logo
Travis Pub

A Dart wrapper for the Discord API. Feel free to contribute!

Documentation is available here, and examples can be found in the example directory.

Features

  • Speedy (built upon the latest versions of the Dart SDK and web APIs)
  • Small dependency tree (only one direct dependency - w_transport, for both WebSocket and REST // five development dependencies)
  • Predictable - robust and well-defined type checks included with all models
  • Multiplatform - runs anywhere Dart VM (Web support soon) does

Example

A quick example of the client in action:

import 'package:circumstellar/circumstellar.dart';

import 'package:w_transport/vm.dart' show vmTransportPlatform;
// Dart for Web: import 'package:w_transport/browser.dart' show browserTransportPlatform;

void main() {
  var client = new DiscordClient(new AuthSet('MY_TOKEN', TokenType.Bot), vmTransportPlatform /* dart for web: browserTransportPlatform */);
  client.dispatcher.messageCreate.listen((Message msg) async {
    print('Received message with ID ${msg.id} (Channel ID ${msg.channel.id})');
    print('Content: ${msg.content}');
    if (msg.content == '!ping') {
      await msg.channel.createMessage('Pong!');
    }
  });
  client.dispatcher.ready.listen((empty) {
    print('Ready');
  });
  client.start();
}

Contributing

Contributing guidelines:

  • Please use dartfmt and follow Dart's standard formatting rules for all your contributions
  • Please follow the naming conventions already laid out in the project
  • The tests haven't been fully written yet, so you can run bin/dev.dart (check file for the environment variables to set) to run a dev instance/test client of Circumstellar. You can also use the Shell script run_bot.sh.

Features and bugs

Please file feature requests and bugs at the issue tracker.

0.1.20-dev

  • Add logging system
  • Remove TObjectId type parameter from internal entities

0.1.12

  • Jump releases for Pub publishing

0.1.2

  • Added Guild object
    • Added guildUpdate and guildCreate events
  • Added caching system for most Discord objects
  • Added image CDN endpoints for User and Guild

0.1.11

  • Fixed docs

0.1.1

  • Added caching for channels
  • Added channelCreate and channelUpdate events
  • Refactor entity system
  • Fix REST requests

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  circumstellar: "^0.1.51"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:circumstellar/circumstellar.dart';
  
Version Uploaded Documentation Archive
0.1.51 Jun 22, 2018 Go to the documentation of circumstellar 0.1.51 Download circumstellar 0.1.51 archive
0.1.22 Jun 22, 2018 Go to the documentation of circumstellar 0.1.22 Download circumstellar 0.1.22 archive
0.1.12 Jun 20, 2018 Go to the documentation of circumstellar 0.1.12 Download circumstellar 0.1.12 archive
0.1.11 Jun 20, 2018 Go to the documentation of circumstellar 0.1.11 Download circumstellar 0.1.11 archive
0.1.2 Jun 20, 2018 Go to the documentation of circumstellar 0.1.2 Download circumstellar 0.1.2 archive
0.1.1 Jun 20, 2018 Go to the documentation of circumstellar 0.1.1 Download circumstellar 0.1.1 archive
0.1.0 Jun 19, 2018 Go to the documentation of circumstellar 0.1.0 Download circumstellar 0.1.0 archive
0.1.20-dev1 Jun 20, 2018 Go to the documentation of circumstellar 0.1.20-dev1 Download circumstellar 0.1.20-dev1 archive

Analysis

We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90 / 100
Overall score:
Weighted score of the above. [more]
48
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Primary library: package:circumstellar/circumstellar.dart with components: io.

Suggestions

  • Homepage does not exists.

    We were unable to access https://github.com/jacksonrakena/circumstellar/ at the time of the analysis.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use circumstellar.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.40.0 <=3.0.0
w_transport ^3.2.5 3.2.5
Transitive dependencies
browser 0.10.0+3
charcode 1.1.2
collection 1.14.10
dart2_constant 1.0.1+dart2
fluri 1.2.4
http_parser 3.1.2
intl 0.15.6
js 0.6.1
meta 1.1.5
mime 0.9.6+1
path 1.6.1
sockjs_client 0.3.3
sockjs_client_wrapper 1.0.4
source_span 1.4.0
string_scanner 1.0.2
typed_data 1.1.5
w_common 1.13.0
Dev dependencies
coverage ^0.8.0
dart_dev 2.0.0-alpha
dart_style ^0.2.0
dartdoc ^0.9.0
logging ^0.11.3+1 0.11.3+1
test ^0.12.0