forked from cogizmo/cogizmo.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (56 loc) · 1.67 KB
/
index.html
File metadata and controls
58 lines (56 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<title>Cogizmo</title>
<script src="https://www.gstatic.com/firebasejs/5.8.0/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyC3NZP3BVNZTFnqLHB9I51_DFeMsCtRdkE",
authDomain: "cogizmo-on-github.firebaseapp.com",
databaseURL: "https://cogizmo-on-github.firebaseio.com",
projectId: "cogizmo-on-github",
storageBucket: "cogizmo-on-github.appspot.com",
messagingSenderId: "1040737512834"
};
firebase.initializeApp(config);
</script>
<script type="module" src="components/cogizmo/src/Cogizmo.mjs" use-global></script>
<script nomodule src="components/cogizmo/src/Cogizmo.js"></script>
</head>
<body>
<header></header>
<main>
<p>This is just a test.</p>
</main>
<footer></footer>
<script>
let v = '{ "queryString": "org:cogizmo" }';
let q = `query myOrgRepos($queryString: String!) {
search(query: $queryString, type: REPOSITORY, first: 10) {
repositoryCount edges {
node {
... on Repository {
name
}
}
}
}
}`;
fetch('https://api.github.com/graphql', {
method: 'POST',
Accept: 'api_version=4',
'Content-Type': 'application/json',
body: JSON.stringify({ "query":q, "variables":v}),
headers: {
"Authorization": "Token f402a51cfd8030db30d2d5e29e18d35f8ef34d44"
}
})
.then(response => {
return response.json()
})
.then(data => {
console.log(data)
})
</script>
</body>
</html>