Open antonioli86 opened 1 year ago
How will it check if a specific product jumps to 1 qty. Instead of 0. In that code u sent i saw theres 0 qty
Brace yourself. :P In the request from app I see (after decoding URL):
https:\/\/api.foodsi.pl\/api\/v3\/user\/offers?filter[package_category_ids][not_eq]=[13]&filter[pickup_to][gt]=2023-09-20T23:18:44+02:00&filter[package_category_ids][eq]=[9, 1]&filter[active][eq]=true&filter[current_quantity][gt]=0&sort=distance,pickup_from
How will i be able to set the bot up then, would need to add 9 shops if theres that much? @antonioli86
How will i be able to set the bot up then, would need to add 9 shops if theres that much? @antonioli86
Current quantity bigger than 0 - as filter in URL:
https://api.foodsi.pl/api/v3/user/offers?filter[active][eq]=true&filter[current_quantity][gt]=0
Do you have any ideas how to implement the code into foodsi notify bot though
Do you have any ideas how to implement the code into foodsi notify bot though
First would like to filter by region - find out the proper request - and then work on the parse. Bot already manages it based on monitoring the quantity.
# Check, if the stock has changed. Send a message if so.
if new_stock != old_stock:
Is just a matter to change to the proper variable names based on the new structure.
what do you need help with that i can help you implementing the code. because i dont know the way how to implement it i can help u finding apis for specific things etc @antonioli86
what do you need help with that i can help you implementing the code. because i dont know the way how to implement it i can help u finding apis for specific things etc @antonioli86
First would be perfect to find out the correct request body to filter by area based on the coordinate and range. Old request json format does not work.
what do you need help with that i can help you implementing the code. because i dont know the way how to implement it i can help u finding apis for specific things etc @antonioli86
First would be perfect to find out the correct request body to filter by area based on the coordinate and range. Old request json format does not work.
could u tell me where should i find this
and ill try then
because i have no idea where should i find these @antonioli86
what do you need help with that i can help you implementing the code. because i dont know the way how to implement it i can help u finding apis for specific things etc @antonioli86
First would be perfect to find out the correct request body to filter by area based on the coordinate and range. Old request json format does not work.
could u tell me where should i find this
No idea at this moment. :(
@antonioli86 how did yall make it compatible with the old version then
Maybe someone is working is parallel and will help us here... 🥇
Maybe someone is working is parallel and will help us here... 🥇
i dont think so we are the only ones talking there we might work on ourselves for now
@antonioli86 i feel like nobody will help
If you want you can filter by given name
...&filter[venue_name][eq]=Kuchnia Vikinga Kawaleryjska
If you want you can filter by given name
...&filter[venue_name][eq]=Kuchnia Vikinga Kawaleryjska
i have 9 shops in my app. i would need to filter 9 shops all by 1
i hope there will be a solution soon i dont wanna miss any packages lol they get sold quick still probably even when there are no notify bots
@antonioli86 have u tried chatgpt?? to maybe help
If you want you can filter by given name ...&filter[venue_name][eq]=Kuchnia Vikinga Kawaleryjska
i have 9 shops in my app. i would need to filter 9 shops all by 1
you can ask for specific names in one endpoint
e.g.
https://api.foodsi.pl/api/v3/user/offers?filter[venue_name][]=Piekarnia Szwajcarska Światowida&filter[venue_name][]=Kuchnia Vikinga Kawaleryjska
Updated version - not fully tested but seems fine: watch_script2.zip
I was "sleeping" when I was writing about request body... now is a GET request, not a POST as before, so no body is passed. All goes in the filter. Coordinates and distance are taken from user profile (from the authentication) - information is visible on https://api.foodsi.pl/api/v3/user/users/current
In filter I'm passing several things: [package_category_ids][not_eq]=[13] - this is to exclude Dostawa [package_category_ids][eq]=[9,1] - I want only meals and Bread & Pastries [active][eq]=true - only active [current_quantity][gt]=0 - meals available bigger than 0 [pickup_to][gt]='+waw_dt.strftime('%Y-%m-%dT%H:%M:%S%z') - offer that are available to pick in the future. Without this filter from API comes packages that were not picked up - current_quantity is bigger than 0 but time to pickup already passed.
Other thing I did - removed the loop to go page by page and increased the page size to 50. I don't expect more than 50 offers active... if someone has more can increase it or can always try do the loop the check page by page.
I will test on poznań, because everything is available there
@antonioli86 doesnt seem to work, after i open it closes after few seconds i noticed its flashing some code
It was working but now I have timeout in the telegram part - also I changed a bit from original code. :( Later I will check.
It was working but now I have timeout in the telegram part - also I changed a bit from original code. :( Later I will check.
could u send me the new code, it seems to work for me it now prints "total foodsi items 50" do i have to change anything in the code? or if the lang and long / distance is in my city its fine in the config ? @antonioli86
pls send me the new code lol... telegram i think is rate limiting
Seems is the same issue I have... only later or tomorrow will check.
@antonioli86 its not about the foodsi its working fine.. the telegram bot is rate limiting
@antonioli86 its not about the foodsi its working fine.. the telegram bot is rate limiting
I know. I should not use big page size - need to limit (or keep 20) and do a loop as before.
how can i change to my favorite item it keeps sending cofix instead of my product @antonioli86
and the sofix is not even in my city. something bugged
how can i change to my favorite item it keeps sending cofix instead of my product @antonioli86
Change in line of request to this
foodsi_api = requests.get('https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13]', headers = {'Content-type':'application/json', 'system-version':'android_3.0.0', 'user-agent':'okhttp/3.12.0', 'Access-Token': access_token, 'Client': client, 'Uid': uid})
and the sofix is not even in my city. something bugged
Please be patient. :) For favorites seems fine...
if ill add 9 favorites all with other filters like coffee, cakes, then pizza and other will be fine?
if ill add 9 favorites all with other filters like coffee, cakes, then pizza and other will be fine?
Check above. Remove all filters except the one for deliveries (Dostawa) - https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13]
omg.. it works
if ill add 9 favorites all with other filters like coffee, cakes, then pizza and other will be fine?
Check above. Remove all filters except the one for deliveries (Dostawa) - https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13]
is it setup only for dostawa?
@antonioli86 but my all products have "Odbiór Osobisty" not "Dostawa" is that fine?
Will it really work @antonioli86 ? I set it up with my city favourites and ran the script. However i didnt add the current_quantity qt option and when i changed lang and long to poznań and added to favourites some available items it didnt work
Tell me please
if ill add 9 favorites all with other filters like coffee, cakes, then pizza and other will be fine?
Check above. Remove all filters except the one for deliveries (Dostawa) - https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13]
is it setup only for dostawa?
This is only to pickup (odbior) - not equal to 13. If you want all, remove the filter.
https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13] But after i add no filter will it still notify me if any product gets on stock ? @antonioli86 And it should look like this after i remove the filter? https://api.foodsi.pl/api/v3/user/favourites Or should i replace it with https://api.foodsi.pl/api/v3/user/favourites?filter[current_quantity][gt]=0
Because [current_quantity][gt]=0 - meals available bigger than 0 Could u send me the code so it will check my all favourites if they are more than 1 on stock? Then send me notify
if ill add 9 favorites all with other filters like coffee, cakes, then pizza and other will be fine?
Check above. Remove all filters except the one for deliveries (Dostawa) - https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13]
is it setup only for dostawa?
This is only to pickup (odbior) - not equal to 13. If you want all, remove the filter.
And its not equal to 13 what? Currency i dont understand
https://api.foodsi.pl/api/v3/user/favourites?filter[package_category_ids][not_eq]=[13] But after i add no filter will it still notify me if any product gets on stock ? @antonioli86 And it should look like this after i remove the filter? https://api.foodsi.pl/api/v3/user/favourites Or should i replace it with https://api.foodsi.pl/api/v3/user/favourites?filter[current_quantity][gt]=0
Because [current_quantity][gt]=0 - meals available bigger than 0 Could u send me the code so it will check my all favourites if they are more than 1 on stock? Then send me notify
Would help me alot if u could give me the ready code to check all my 9 favorites some are 25 pln some are less.
@Robertnoob12 - I only can back to this later...
@Robertnoob12 - I only can back to this later...
But u know how to do it? I think u just need to change the api right? To make it work on all my favorites i have 10 right now and to make the bot notify me when 1 will get to any stock when it checks like from sold out to last one available @antonioli86
@Robertnoob12 - I only can back to this later...
But u know how to do it? I think u just need to change the api right? To make it work on all my favorites i have 10 and to make the bot notify me when 1 will get to any stock when it checks like from sold out to last one available or any @antonioli86
So the request should be as you wrote - https://api.foodsi.pl/api/v3/user/favourites?filter[current_quantity][gt]=0
@Robertnoob12 - I only can back to this later...
But u know how to do it? I think u just need to change the api right? To make it work on all my favorites i have 10 and to make the bot notify me when 1 will get to any stock when it checks like from sold out to last one available or any @antonioli86
So the request should be as you wrote - https://api.foodsi.pl/api/v3/user/favourites?filter[current_quantity][gt]=0
@antonioli86 so it will check my favourites. If any goes on available it sends me to telegram bot that the specific shop got a item available right? The price wont matter?
Hi,
Seems with latest update they changed something:
Someone already debug it?