From 3dc217e3c51007f43da481f7767aa6ec12db6534 Mon Sep 17 00:00:00 2001 From: Kaushal Marakana Date: Mon, 22 Oct 2018 17:25:29 +0530 Subject: [PATCH] Github user API done --- .DS_Store | Bin 0 -> 8196 bytes Fetch-GitHub-User-And-Search-Opration/app.js | 19 +++++++++++++ .../index.html | 26 ++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .DS_Store create mode 100644 Fetch-GitHub-User-And-Search-Opration/app.js create mode 100644 Fetch-GitHub-User-And-Search-Opration/index.html diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c6e4337d6851058d277668a18f42b0858889fe1d GIT binary patch literal 8196 zcmeHM+iuf95S?ucxB=QoptceMSwcuWG^i+Cgb-551qcFK;g&uCf?N!>NbSgRNFfB} zg?|A4fKTBI_z*q-&di$1c2n_!5Td)0ch>fv+1)dO6Wi(DFEaQ9!o(Rd4OQ-Se9Zr)>5F*sj~+aLsgt&C=JJZo4Z4n zVma1Q!%1m4sd!`+XDCWW2hNu6q)J+v+Av@k*vkOt?x&Hnhxj#8`Fn&MJ|G_%{e9|F zhxon==}`+kJp4=HF7ok?kSpf41pPcNZ&6S^YW!qYxvfo?(i z&^}rBmyGUts?aJupmlmkbt=;aTB~R~bb+?1ot~Lm%%B&jDk~mf+%;KGM6RrMgL;^k zp5Z;rEud~j*N2R*V-t0Sdp!s`yX{8vk>?JcmcOT%HYczM|_Ub;3~wue`*t}NS^idROXS!?m!#T)hK+i%_u-;LgX z0v#wSK09b$-|yC+(fWfFy>>#s6ZkKANL(jjW_BnxVg;sVBNpJQE&TduhvIlGa?|cY z?C?n=9!uzPVmD!@h|)N5^&~Ej?GeG9cy!*-FEE?7jLFW^piTzQ?w!QX(OoznZ#ABE z7s!1bPqB+9u}A10Mz2r}XoqU)kvLo^E8(Vd=S+uVc8B>boSW7%X`THLN%=vH5 Ke{sD7UHt^xg*W^F literal 0 HcmV?d00001 diff --git a/Fetch-GitHub-User-And-Search-Opration/app.js b/Fetch-GitHub-User-And-Search-Opration/app.js new file mode 100644 index 0000000..e6592cc --- /dev/null +++ b/Fetch-GitHub-User-And-Search-Opration/app.js @@ -0,0 +1,19 @@ +function search () { + var name = document.getElementById("name").value; + + $.getJSON("https://api.github.com/users/"+name, function(result){ + console.log(result); + + $('#fullname').html(result.name); + $('#dp').attr("src",result.avatar_url); + $('#followers').html("followers : "+result.followers); + $('#following').html("following : "+result.following); + $('#created_at').html("created_at : "+result.created_at); + + }).fail(function() { + $('#fullname,#dp,#followers,#following,#created_at').hide(); + // $('#dp ').hide(); + $('#msg').html('This Username is not available'); + + }) +} \ No newline at end of file diff --git a/Fetch-GitHub-User-And-Search-Opration/index.html b/Fetch-GitHub-User-And-Search-Opration/index.html new file mode 100644 index 0000000..d699125 --- /dev/null +++ b/Fetch-GitHub-User-And-Search-Opration/index.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+ + +
+ +
+

+ +

+

+

+

+

+
+ + + \ No newline at end of file