Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to access the private information? #61

Open
Flope opened this issue Nov 21, 2019 · 2 comments
Open

Is it possible to access the private information? #61

Flope opened this issue Nov 21, 2019 · 2 comments

Comments

@Flope
Copy link

Flope commented Nov 21, 2019

Hi,
I was wondering if it is possible to access the private information of the collections. I understand that we need to be login but I am not sure how to do it from your API.

Thanks

@outis
Copy link

outis commented Jan 16, 2022

The API currently doesn't support log-ins. I've got a solution for this, though I have a few testing related questions for @lcosmin (or any other responsible devs):

  1. I'd like to add some tests for add_collection_items_from_xml (in loaders/collection.py), as that function must be updated to support private info. Is there a preference for putting it in a new test file or an existing file?
    1. Where & how are the files in test/xml/ used?
  2. Should test/_bgg.py be used for anything? It seems to be a slightly different version of test/test_utils.py.

@outis
Copy link

outis commented Jan 16, 2022

I think I see the answer for 1.i.: the xml files are loaded by simulate_bgg and simulate_legacy_bgg (in test/_common.py), which simulate BGG.com's response to a request by setting one as a mocked side effect for "requests.sessions.Session.get". To determine which file to load, the simulator functions first sort the parameters by key and join them as a query string. Thus, to create & use a sample XML file, the file must include all parameters used in the query in order of the keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants