bulksmszw 1.0.0 copy "bulksmszw: ^1.0.0" to clipboard
bulksmszw: ^1.0.0 copied to clipboard

bulksmszw api, a port for bulksmszw-api python library. Send bulk sms using bulksmsweb services

example/main.dart

/// bulksmszw example code
/// Donald Chinhuru Dec 2020
import 'package:bulksmszw/bulksmszw.dart';

void main() async {
  print('[INFO] Sending text `hello from dart` with bulksmszw api');

  final String message = 'hello from dart';

  // contacts supports all zim numbers and groups as defined on your portal
  final List<String> contacts = ['263770000000', '2637xxxxxxxx', '#customers'];

  // create bulksmszw object
  final api = BulkSmsZw(
    bulksmsWebKey: '<your-api-key>',
    bulksmsWebName: '<your-api-username>',
  );

  // send a message, set field `credits` to true to return number of texts left in your account
  ApiResponse response = await api.send(
    message: message,
    recipients: contacts,
    credits: true,
  );

  print('[INFO] ApiResponse: ${response.toMap()}');
}
11
likes
35
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

bulksmszw api, a port for bulksmszw-api python library. Send bulk sms using bulksmsweb services

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter, http

More

Packages that depend on bulksmszw