biemster / FindMy

Query Apple's Find My network
346 stars 53 forks source link

Amend/change look-back time for report on map POST /get_locations #47

Closed Furtivo360 closed 1 month ago

Furtivo360 commented 10 months ago

Hi!

Thanks you so much for this project!

I've got a question:

how and where can I amend the look-back time for the report?

Based on your documentation:

__POST /get_locations This endpoint fetch the data from icloud server, decode it and return as an array. Note: hours is optional, default to 24 (meaning get all reports in the last 24 hours)__

thanks

biemster commented 9 months ago

The actual look-back time is not functioning properly on Apple's side, either only the last 20 reports are returned or all reports available on the server (which is about 10 days worth) The script can filter the retrieved reports to display only those from the last X hours, which is controlled by the -H parameter: https://github.com/biemster/FindMy/blob/113ebf4017729b92a381624c1932065588c3ebde/request_reports.py#L41

Furtivo360 commented 9 months ago

Hi @biemster! Thanks for the reply!

Can you explain me a bit better how I can amend that parameter myself?

Thanks

biemster commented 9 months ago

I'm not exactly sure what you mean, you can run something like ./request_reports.py -H 96 for 4 days worth of reports?

Furtivo360 commented 9 months ago

I mean, can I amend that parameter somewhere on the backend of the code in order to see only the report of last hour for example?

biemster commented 9 months ago

There is just request_reports.py, no backend. You could set -H 1 to see only the reports of the last hour, but Apple's servers only allow us to request either the last 20 reports, or everything it has.

Furtivo360 commented 9 months ago

Oh! Right! Thanks man 💪🏼

Furtivo360 commented 9 months ago

Hi again...sorry man but where can I find the " request_reports.py"? Thank you very much for your help

biemster commented 9 months ago

What have you been running up to now? That's basically the only thing there!

Furtivo360 commented 9 months ago

I am using the docker image from https://github.com/ngxson/FindMy_Docker

All works fine but I don't understand (I don't find) where to change the -H parameter

biemster commented 9 months ago

Ah that explains a lot! That's not mine, please reach out there I don't know what they are doing..