Created
July 28, 2015 15:16
-
-
Save joshkh/13f78c1df7a978e2f2d0 to your computer and use it in GitHub Desktop.
lang test
This file contains 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
var selector = '#some-elem'; | |
var service = {root: 'http://localhost:8080/flymine/service/'}; | |
<!doctype html> | |
<html> | |
<head> | |
<script src="http://cdn.intermine.org/js/intermine/imjs/3.14.0/im.js"></script> | |
</head> | |
<body> | |
<script> | |
var flymine = new imjs.Service({root: 'www.flymine.org/query'}); | |
var query = { | |
"from": "Gene", | |
"select": [ | |
"secondaryIdentifier", | |
"symbol", | |
"primaryIdentifier", | |
"organism.name" | |
], | |
"orderBy": [ | |
{ | |
"path": "secondaryIdentifier", | |
"direction": "ASC" | |
} | |
], | |
"where": [ | |
{ | |
"path": "Gene", | |
"op": "LOOKUP", | |
"value": "zen", | |
"extraValue": "", | |
"code": "A" | |
} | |
] | |
}; | |
flymine.query(query).then(function() { | |
var i, lang, len, ref, showCode; | |
ref = ['py', 'pl', 'rb', 'java']; | |
for (i = 0, len = ref.length; i < len; i++) { | |
lang = ref[i]; | |
showcode(lang); | |
} | |
return showCode = function(lang) { | |
return queryfetchCode(lang).then(function(result) { | |
console.log("lang", lang); | |
return console.log("produced", result); | |
}); | |
}; | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment