-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.js
42 lines (28 loc) · 1.22 KB
/
code.js
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
const BASE_JSERVICE = 'https://jservice.io'
const CLUE = `${BASE_JSERVICE}/api/clue`
let clueApiURL = `${BASE_JSERVICE}${CLUE}`
let scoreDiv = document.getElementById('#score')
let cluesResponseArray = [];
let randomClue;
// get random quesiton
randomQuestion = function() {
fetch(randomAPIURL)
}
// getAclue(clue);
function getAclue(clue) {
// return clue = object arrray promise
console.log('get a clue')
console.log('api url', clue)
// let request = 'https: //jservice.io/api/clues/?cateogy=5'
let getRandomClue = 'https: //jservice.io/api/random/'
// /?cateogy=5'
}
function cluesRequest() {
let request = 'https: //jservice.io/api/clues/?cateogy=5'
fetch(request) {
}
// // GET /api/random
fetch(`https://restcountries.eu/rest/v2/name/${country}`)
const BASE_CLUES = BASE + Clues
jservice.io / api / clues /
[{"id":59937,"answer":"Yiddish","question":"To kvell","value":800,"airdate":"2004-04-23T12:00:00.000Z","created_at":"2014-02-11T23:23:37.606Z","updated_at":"2014-02-11T23:23:37.606Z","category_id":7669,"game_id":null,"invalid_count":null,"category":{"id":7669,"title":"from what language","created_at":"2014-02-11T23:23:37.007Z","updated_at":"2014-02-11T23:23:37.007Z","clues_count":5}}]