summaryrefslogtreecommitdiffstats
path: root/js/github-api.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/github-api.js')
-rw-r--r--js/github-api.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/github-api.js b/js/github-api.js
new file mode 100644
index 0000000..719fb08
--- /dev/null
+++ b/js/github-api.js
@@ -0,0 +1,22 @@
+(function($){
+
+ appendContributors = function(contributors){
+ var source = $('#contributors-tpl').html();
+ var template = Handlebars.compile(source);
+
+ $('#contributors').append(template({ contributors: contributors }));
+ }
+
+ $.ajax('https://api.github.com/repos/lou/multi-select/git/refs/tags')
+ .done(function(data){
+ var ref = data[data.length-1].ref;
+ var tagNumber = ref.match(/\d(.\d)*$/)[0];
+
+ $('#brand').append(' <span>'+tagNumber+'</span>')
+ })
+
+ $.ajax('https://api.github.com/repos/lou/multi-select/contributors')
+ .done(function(data){
+ appendContributors(data);
+ });
+})(jQuery)