I'm, unfortunately, not a developer, and the intricacies of the restful APIs are a little overwhelming to me. We use SOAP and web services for our own APIs, and while they are (also) somewhat over my head, once I see a javascript snippet that leverages one of our APIs, I can usually hack out a script that will leverage the other ones.
So, and forgive me if this is too stupid for words...
Is it possible to write javascript that will leverage Intervals APIs?
If so, would some kind soul be willing to post what such a script would look like that, for example, passes the authentication string and then outputs a task list (or virtually any other simple GET or PUT function)?
The jQuery library is perfectly suited for this. Observe a get request for all tasks:$.ajax({
url: "https://api.myintervals.com/task/",
dataType: "json",
headers: {
authorization: "Basic " + Base64.encode(api_token+":x"),
nocache: Math.random()
},
success: function(data, code, jqx) {
alert("it worked, and here's the response data: " + data);
},
error: function(jqx, err, ex) {
alert("FAIL: " + err);
},
complete: function(jqx, status) {
console.log("request complete");
}
});
1 to 3 of 3
Comments are closed.
For more Intervals help documentation, please visit help.myintervals.com