pubnub / pubnub-angular

Official PubNub AngularJS SDK
Other
84 stars 43 forks source link

PubNub #12

Closed nolandubeau closed 9 years ago

nolandubeau commented 9 years ago

Hi, are the PN DataSync methods included in the latest version of pubnub-angular? If not, is there an ETA?

//taken from a beta version of DS $scope.get = function() { PubNub.datasync_BETA.ngGet($scope.getObjDesc()).then(function(x) { $scope.theObj = x; }); } $scope.remove = function() { PubNub.datasync_BETA.ngRemove({ object_id: $scope.object_id }).then(logit('remove')); }

    $scope.set = function() {
        PubNub.datasync_BETA.ngSet({
            object_id: $scope.object_id,
            data: $scope.theData
        }).then(logit('set'));
    }

    $scope.merge = function() {
        PubNub.datasync_BETA.ngMerge({
            object_id: $scope.object_id,
            data: {
                'time': new Date()
            }
        }).then(logit('merge'));
    }

    $scope.sync = function() {
        $scope.theObj = PubNub.datasync_BETA.ngSync($scope.object_id).content.data;
    }

    $scope.watch = function() {
        PubNub.datasync_BETA.ngWatch($scope.getObjDesc());
    }
geremyCohen commented 9 years ago

Hi Nolan-

Let me look into an ETA for you. I'll ping you on the existing support ticket with updates.