serverchan_sdk 1.0.6 copy "serverchan_sdk: ^1.0.6" to clipboard
serverchan_sdk: ^1.0.6 copied to clipboard

A Dart SDK for sending messages via Server Chan.

example/serverchan_sdk_example.dart

import 'package:serverchan_sdk/serverchan_sdk.dart';

void main() async {
  const sendkey = 'your-sendkey';
  const title = 'Hello, Server Chan!';
  const desp = 'This is a test message from Dart SDK.';

  // 可选参数
  ScSendOptions options = ScSendOptions(
    tags: 'test,serverchan',
    shortDesc: 'Test Message',
    noip: 1,
  );

  try {
    ScSendResponse response =
        await scSend(sendkey, title, desp: desp, options: options);
    print('Response Code: ${response.code}');
    print('Response Message: ${response.message}');
    if (response.data != null) {
      print('Response Data: ${response.data}');
    }
  } catch (e) {
    print('Error: $e');
  }
}
0
likes
120
points
50
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart SDK for sending messages via Server Chan.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on serverchan_sdk