Okay so this is the API that we're going to use to build our 1
application so it's open trivia database it's open source so 2
basically there is I think an API section here and it explain 3
how it's working but I'm going to make it short for you so 4
basically we can send four parameters to this API a number 5
of question that can be for example between one and 30, I 6
don't know exactly what's the maximum but we're going to stay 7
between one and 30 for our application then you can send a 8
category or no category actually so there are a list of 9
categories that are available and we'll have to make a 10
request to these very specific API to get all the possible 11
categories that we can send okay so there is two fetch 12
request that we will have to do first one is to get this list 13
so we can send one category okay for example science or we 14
can send an empty string and this means that in the for 15
example 10 questions that we'll have ... they can add Any kind 16
of category, okay? We can have one that has science, one that 17
has sport, one that has art et cetera. So if you send an empty 18
string it basically means send me a mix of question with 19
different categories. So it's going to be almost exactly the 20
same thing with difficulty but we won't have to fetch the data 21
okay we are going to art code easy medium and hard and we can 22
also send an empty string and if we do that well we're going 23
to again have a mix of difficulties into our questions 24
and finally again it's going to be the same thing for the type 25
so we can use multiple boolean or an empty string so we're 26
going to always use multiple because that's what we're 27
building okay we're bridging a quiz with four possible answers 28
but you could also ask for true false questions if you want, 29
okay? So maybe that could be an improvement for after this 30
project. Uh and you can also send an empty string here and 31
you will have a mix of multiple and boolean types in your 32
questions. Okay? So that's all the data that we will have to 33
build before starting a game. So we're going to ask the user 34
for all this data and after that we will create the HTTP 35
request and as you can see here I have asked for three 36
questions that all have the difficulty easy that are all of 37
multiple type and I have not specified a very specific 38
categories so I will have a mix of categories and this is going 39
to give me something like this okay I will have an object with 40
a response code okay and then inside a result array that 41
contains all the information for each my questions so we'll 42
have all the information of the question so the the type and 43
the difficulty and we'll finally have the actual 44
question. And we'll have the correct answer and we also have 45
three wrong answers. Okay? And we'll have that for each 46
questions. So once we'll have this array of question we'll be 47
able to play the game. So basically we're going to split 48
the work, okay? The first part of the work will be to really 49
be able to generate this URL, okay? So we'll have to create 50
the HTTP request, create the screens to ask the user to send 51
the number of question, the categories, the difficulty and 52
the type and once all of this will be good we will work on 53
the the actual game okay using the data that will have 54
received from the API okay and if you want you can try the API 55
already for example here I could ask for three question 56
with a category that would be I don't know general knowledge 57
easy, multiple choice and I'm not going to modify this encoding 58
and okay this generate an API URL and I can try it and I will 59
have some data, okay? All right. Um okay so I hope it's 60
clear well in the next video we are going to start really 61
working. See you in the next one.