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

Set which region to fetch for Traveler's diary? #25

Closed
BobbyWibowo opened this issue Apr 30, 2022 · 5 comments
Closed

Set which region to fetch for Traveler's diary? #25

BobbyWibowo opened this issue Apr 30, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@BobbyWibowo
Copy link

I'm not too familiar with the actual API endpoint myself, but it seems the current implementation defaults to 1 region only? (I'm guessing at the mercy of the default returned values from the API endpoint)

@thesadru
Copy link
Owner

The region should be set through the client attribute. There's no reason to allow one client to access both region endpoints because a cookie can only ever work for either Overseas or Chinese, never both at the same time.

@BobbyWibowo
Copy link
Author

Ah, when I said regions, I meant servers, as in EU, Asia, etc.
Unlike real-time notes, where you just pass the desired region/server uid, there didn't seem to be something of equivalent for diary

@thesadru
Copy link
Owner

Is there any practical use for getting data for more than one server? The uid parameter has been removed in favor of client.uid since I assumed nobody would need it. I'm fine with adding it back if I can interpret this as a feature request.

@thesadru thesadru added the enhancement New feature or request label Apr 30, 2022
@BobbyWibowo
Copy link
Author

I wasn't aware client.uid can also be set, so I guess that works

Though yeah aside from that, get_diary()'s choice of server feels vague for the time being, since specifying uid isn't a requirement when initiating client for the first time
Or at least it feels more vague due to the existence of a comparison, that is get_notes()

I'm not particularly opinionated at how it should be done
Knowing client.uid can be set is enough for me, but I guess it's better to be documented somewhere
At least I don't recall seeing it in the docs

@thesadru
Copy link
Owner

client.uids is a new addition in 1.0.0 and client.uid is from the last version.

There's a mention of it in the docs but I forgot to add anything about client.uid so that's my bad.

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

No branches or pull requests

2 participants