Included expansions in collection retrieval
This commit is contained in:
parent
cfff61853a
commit
03936192fa
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ authenticated_session: requests.Session = requests.Session()
|
||||||
|
|
||||||
def url_to_xml_object(url: HttpUrl) -> ET.Element:
|
def url_to_xml_object(url: HttpUrl) -> ET.Element:
|
||||||
r = authenticated_session.get(url)
|
r = authenticated_session.get(url)
|
||||||
assert r.status_code == 200, "Got {} status code".format(r.status_code)
|
assert r.status_code == 200 or r.status_code == 202, "Got {} status code".format(r.status_code)
|
||||||
root = ET.fromstring(r.content)
|
root = ET.fromstring(r.content)
|
||||||
return root
|
return root
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ def get_boardgames_from_collection_url(collection_url: str) -> list[BoardGame]:
|
||||||
return collection_list
|
return collection_list
|
||||||
|
|
||||||
def get_user_owned_collection() -> list[BoardGame]:
|
def get_user_owned_collection() -> list[BoardGame]:
|
||||||
url = 'https://boardgamegeek.com/xmlapi2/collection?username={}&own=1&stats=1&excludesubtype=boardgameexpansion&showprivate=1&version=1'.format(auth_manager.username)
|
url = 'https://boardgamegeek.com/xmlapi2/collection?username={}&own=1&stats=1&showprivate=1&version=1'.format(auth_manager.username)
|
||||||
owned_boardgames = get_boardgames_from_collection_url(url)
|
owned_boardgames = get_boardgames_from_collection_url(url)
|
||||||
|
|
||||||
return owned_boardgames
|
return owned_boardgames
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue