jusibe 0.1.0

jusibe_dart ✉️ #

Jusibe SMS library for Dart. Based on the Official API Documentation provided by Jusibe.

Installation #

Add jusibe_dart as a dependency in your pubspec.yaml file.

jusibe_dart: ^0.1.0

Usage #

Import the library in your dart file.

import 'package:jusibe/jusibe.dart';

Initialize SMS #

Jusibe jusibe = Jusibe.initialize(
    publicKey: 'PUBLIC_KEY_HERE',
    accessToken: 'ACCESS_TOKEN_HERE',
);

Send SMS #

This lets you make a request to send an SMS to the Jusibe API. It returns a type SMSDetails containing the message status, ID and number of SMS credits used.

SMSDetails smsDetails = await jusibe.sendSMS(
    from: "Fabusuyi", to: "08101563800", message: "Jusibe test");
print(smsDetails.messageID);

Check SMS Delivery Status #

This gives you information on the delivery status of previously sent messages. It returns a type SMSDeliveryStatus containing the message status, ID, date sent and date delivered.

SMSDeliveryStatus smsDeliveryStatus =
    await jusibe.getDeliveryStatus(messageID: 'w53j2p6v12');
print(smsDeliveryStatus.status);

Get SMS Credits #

This gives you information about your available SMS credit balance. It returns a type int representing the number of units left.

int creditsRemaining = await jusibe.checkCredits();
print(creditsRemaining);

Check out the example program here

Contributing #

Please feel free to fork this package and contribute by submitting a pull request to enhance its functionalities.

How can I thank you? #

Just star and share the repo 🙂.

0.1.0 - 2019-02-24 #

  • Initial release

example/main.dart

import 'package:jusibe/jusibe.dart';

void main() async {
  Jusibe jusibe = Jusibe.initialize(
    publicKey: 'PUBLIC_KEY_HERE',
    accessToken: 'ACCESS_TOKEN_HERE',
  );

  SMSDeliveryStatus smsDeliveryStatus =
      await jusibe.getDeliveryStatus(messageID: 'w53j2p6v12');
  print(smsDeliveryStatus.status);

  SMSDetails smsDetails = await jusibe.sendSMS(
      from: "Fabusuyi", to: "08101563800", message: "Jusibe test");
  print(smsDetails.messageID);

  int creditsRemaining = await jusibe.checkCredits();
  print(creditsRemaining);
}

Use this package as a library

1. Depend on it

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


dependencies:
  jusibe: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:jusibe/jusibe.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
13
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
16
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms:

Low code quality prevents platform classification.

Health issues and suggestions

Fix lib/src/jusibe.dart. (-86.85 points)

Analysis of lib/src/jusibe.dart failed with 7 errors, 3 hints, including:

line 4 col 8: Target of URI doesn't exist: 'package:meta/meta.dart'.

line 22 col 5: Undefined name 'required' used as an annotation.

line 23 col 5: Undefined name 'required' used as an annotation.

line 46 col 5: Undefined name 'required' used as an annotation.

line 47 col 5: Undefined name 'required' used as an annotation.

Format lib/jusibe.dart.

Run dartfmt to format lib/jusibe.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
dio ^2.0.5 2.1.13
Transitive dependencies
cookie_jar 1.0.1
Dev dependencies
build_runner ^0.9.1
console ^3.0.0
test ^1.3.0

Admin