How to use API in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

How to use API in python?

Actually, I'm new to API.i don't know how to use them. i got API for pubg mobile. can anyone tell me how i can use this API in python? I'm using Django for the server side. can i work with this API in Javascript? API documentation. https://documentation.pubg.com/en/index.html

1st Mar 2020, 1:39 PM
Maninder $ingh
Maninder $ingh - avatar
8 Answers
+ 7
usually by calling the api by http request, then process the response. ex. calling request to https://api.pubg.com/shards/players?filters[playerNames]=xGamer257 parse the response to get the data you need ex. for taking how many match the player ever had len(response.data[0].relationships.matches)
1st Mar 2020, 2:17 PM
Taste
Taste - avatar
+ 4
Maninder $ingh yes and here is only one of many examples. https://www.valentinog.com/blog/drf/
1st Mar 2020, 2:26 PM
BroFar
BroFar - avatar
+ 3
its your idetification, >"hey pubg let me get some player data" "who are you ?" >*show API key* "oh, yes you're registed, here's the data you need"
1st Mar 2020, 4:28 PM
Taste
Taste - avatar
+ 1
Taste thanks.
1st Mar 2020, 4:29 PM
Maninder $ingh
Maninder $ingh - avatar
0
Taste what is the use of the API key.
1st Mar 2020, 4:23 PM
Maninder $ingh
Maninder $ingh - avatar
0
API is used by our applications to access the data of something else. API is a type ok key
2nd Mar 2020, 2:34 AM
Suryaansh singh
Suryaansh singh - avatar
0
Suryaansh singh how can I integrate an external API on my blog?
7th Oct 2020, 2:09 PM
Emmanuel