I have just started using APIv1 and wanted to check im using it correctly, (in python) as i cant seem to get it to work
My code looks like this
import requests
response = requests.get('https://osu.ppy.sh/forum/t/----/api/get_beatmaps/[MY CODE]')
print(response.status_code)
print(response.json())
The error looks like this
Traceback (most recent call last):
File "C:\Users\willi\PycharmProjects\osu!+\main.py", line 10, in <module>
print(requests.get('https://osu.ppy.sh/forum/t/----/api/get_beatmaps/[KEY]').json())
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Any help is appreciated, Im not even sure if this is the correct place to send this
Thanks
My code looks like this
import requests
response = requests.get('https://osu.ppy.sh/forum/t/----/api/get_beatmaps/[MY CODE]')
print(response.status_code)
print(response.json())
The error looks like this
Traceback (most recent call last):
File "C:\Users\willi\PycharmProjects\osu!+\main.py", line 10, in <module>
print(requests.get('https://osu.ppy.sh/forum/t/----/api/get_beatmaps/[KEY]').json())
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\willi\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Any help is appreciated, Im not even sure if this is the correct place to send this
Thanks