Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
Or this version which employs Async / Await:
(function(){
async function getDBID(name) {
var xml = await Promise.resolve(
$.get("main?act=API_GrantedDBs")
);
var dbid = $("dbname", xml).filter(function() {
return $(this).text() === name;
}).next("dbid").text();
return dbid;
}
var name = "250 Bottles of Beer on the Form";
getDBID(name).then(function(dbid) {
console.log(dbid, name)
});
})();
//output:
//bj4vxvurn 250 Bottles of Beer on the Form
RohitAgarwal
8 years agoQrew Cadet
Thank you so much,
One last question.
Is there any API to get Application ID.
for ex-
I am in Application X. I write some script in order to get Application ID.
One last question.
Is there any API to get Application ID.
for ex-
I am in Application X. I write some script in order to get Application ID.