Skip to content

project-sunbird/sb-cordova-plugin-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sb-cordova-plugin-sync

A plugin to sync telemetry events and course progress.

Installation

cordova plugin add https://github.com/project-sunbird/sb-cordova-plugin-sync.git#<branch_name>

To install it locally

Clone the repo then execute the following command

cordova plugin add <location_of plugin>/sb-cordova-plugin-sync

API Reference

sbsync

sbsync.sync(successCallback, errorCallback)

Syncs event to the platform

sbsync.enqueue(data, model, shouldSync, successCallback, errorCallback)

Add the events to the queue to be synced.

  • data represents data to be synced.
  • model represents the model of events to be synced.
  • shouldSync represents whether the events to be synced or not.

db.onSyncSucces(filePath, successCallback)

When telemetry events are synced this callback is fired.

  • filePath represents filePath of the database file.

db.onAuthorizationError(isExternalDb, successCallback)

When there is an authorization error this.

About

Cordova Plugin primarily used for telemetry, course sync.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published