Last active
October 2, 2017 17:01
-
-
Save mattduggan/1b1d54ec1336b485cf1901c4b9c99cc1 to your computer and use it in GitHub Desktop.
Feature Tour - Service API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
this.FeatureTourService = function() { | |
return { | |
getFeatureTours: function() { | |
return Yesware | |
.get("Request") | |
.request({ | |
url: BASE + "api/v1/feature_tours/feature_tours", | |
type: "GET", | |
includeAuthToken: true | |
}) | |
.then(function(response) { | |
return response.feature_tours; | |
}) | |
.catch(function(reason) { | |
console.error(reason); | |
throw reason; | |
}); | |
}, | |
updateFeatureTour: function(featureTour) { | |
return Yesware | |
.get("Request") | |
.request({ | |
url: BASE + "api/v1/feature_tours/feature_tours/" + featureTour.id, | |
type: "PUT", | |
includeAuthToken: true, | |
data: { feature_tour: featureTour } | |
}) | |
.catch(function(reason) { | |
console.error(reason); | |
throw reason; | |
}); | |
} | |
}; | |
} | |
}).apply(Yesware); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment