edd_software_licensing 0.9.0 copy "edd_software_licensing: ^0.9.0" to clipboard
edd_software_licensing: ^0.9.0 copied to clipboard

A library for accessing Easy Digital Downloads software licensing API

Easy Digital Downloads software licensing package #

This Dart package encapsulates the web API requests available in the Easy Digital Downloads (EDD) software licensing extension. This extension allows for registering, deregistering, and checking license status. It also allows for checking the latest version info for a product.

EDD is a plugin for Wordpress websites and can be found here: https://easydigitaldownloads.com

The software licensing extension can be found here: https://easydigitaldownloads.com/downloads/software-licensing/

Features #

This package has a web API client class and four core methods in that class. One for each of the four EDD software licensing API endpoints.

  • activateLicense
  • deactivateLicense
  • checkLicense
  • getVersion

The responses have JSON serialization built in so that licensing server responses can be cached locally to cut down on server requests.

Usage #

Here is an example showing how to activate a license and check its validity:

var eddLicensingClient = EddSoftwareLicensingClient(licenseHost: 'myhost.com');

// Activate a license
var activateResponse = await eddLicensingClient.activateLicense(
    itemId: 1,
    licenseKey: 'USERS_LICENSEKEY',
);

if (activateResponse.isRequestSuccessful() && activateResponse.isLicenseValid()) {
    // License was activated
} else {
    // Figure out what went wrong
    if (!activateResponse.isRequestSuccessful()) {
        // We got a HTTP server error
    } else {
        // We got a licensing error
        var licenseStatus = activateResponse.license;
        var errorMessage = activateResponse.error;
    }
}
0
likes
150
points
21
downloads

Publisher

verified publisheratomic.city

Weekly Downloads

A library for accessing Easy Digital Downloads software licensing API

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on edd_software_licensing