jusibe 0.1.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 50

jusibe_dart ✉️ #

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

Installation #

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

jusibe: ^0.1.2

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.2 - 2019-02-24 #

  • Modify installation details

0.1.1 - 2019-02-24 #

  • Minor package modifications

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.2

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:jusibe/jusibe.dart';
  
Version Uploaded Documentation Archive
0.1.2 Feb 24, 2019 Go to the documentation of jusibe 0.1.2 Download jusibe 0.1.2 archive
0.1.1 Feb 24, 2019 Go to the documentation of jusibe 0.1.1 Download jusibe 0.1.1 archive
0.1.0 Feb 24, 2019 Go to the documentation of jusibe 0.1.0 Download jusibe 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
50
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

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

Health suggestions

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

Analysis of lib/src/jusibe.dart reported 3 hints:

line 45 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 93 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 130 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/jusibe.dart.

Run dartfmt to format lib/jusibe.dart.

Dependencies

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