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

FritzCall: how are the calls ordered? [Enhancement] #64

Open
bufemc opened this issue Aug 6, 2020 · 2 comments
Open

FritzCall: how are the calls ordered? [Enhancement] #64

bufemc opened this issue Aug 6, 2020 · 2 comments

Comments

@bufemc
Copy link
Contributor

bufemc commented Aug 6, 2020

Hi, I found in the documentation with URL:

https://fritzconnection.readthedocs.io/en/1.3.4/sources/library.html#module-fritzconnection.lib.fritzcall

this:

get_calls(calltype=0, update=True, num=None, days=None)

I did not inspect the code yet, but I think it would be great to mention at least in which order the calls are returned. Is it random, or first is last call, first is first call?

If it's random, could we establish additional parameters, something like:

  • sort/order="lifo" or "fifo" (just a quick idea, kbr knows better solutions I am sure)
  • limit=10 (optional)

Background: if someone just wants to check the last 10 calls, it is currently not clear if that would work with this libary module. Maybe it's just enough to extend the explanation in the documentation how to do so? Maybe it is already ordered in some way, but that should be written explicitely on top I guess.

@kbr
Copy link
Owner

kbr commented Aug 6, 2020

get_calls() returns the calls just in the order provided by the router. At time of writing it is the most recent call first.

The returned calls are instances of the class Call. So i.e. it's possible to inspect the attribute 'date' (which is of type datetime) or sort the list of calls by some attributes according to the needs.

The parameter 'num' corresponds to your suggestion of 'limit'.

@bufemc
Copy link
Contributor Author

bufemc commented Aug 6, 2020

"returns the calls just in the order provided by the router. At time of writing it is the most recent call first."

=> That could go into the documentation :)

BTW, I would even not know how to enable the "dial-help service", there is just a note: "Note: To make this work it is required to activate the dial-help service of the router first." Is it that? Example: https://service.avm.de/help/de/FRITZ-Box-Fon-WLAN-7490/017p1/hilfe_fon_waehlhilfe - could have been also the reason for #62

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