#lockekosta_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1255906072229707847
đ Have more to share? Add details, code, screenshots, videos, etc. below.
I'm doing something like this:
timeToCheck = datetime.today() - timedelta(days=30) subs = stripe.Subscription.list(limit=50, created= timeToCheck)
Of course, this is only checking for subs created on that specific date but I'm trying to get any made on or after said date.
The documentation says that the created parameter can return subs "created during the given date interval" but I can't seem to figure out how to set an interval instead of a specific date.
You need to pass created.gte: https://docs.stripe.com/api/subscriptions/list#list_subscriptions-created-gte
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
that is greater than or equal to
created.gte = doesn't work, nor does timeToCheck,gte so I'm at a loss as to how to implement the .gte
I've also tried gte(timeToCheck) and (timeToCheck).gte
subs = stripe.Subscription.list(limit=50, created.gte= timeToCheck)
returns: SyntaxError: expression cannot contain assignment, perhaps you meant "=="?
subs = stripe.Subscription.list(limit=50, created.gte== timeToCheck)
returns: positional argument follows keyword argument
Yeah that's not valid python syntax
If using python you need to pass as a dictionary
ie: created={'gte': time}
What kind of data is it looking for? I now keep getting "Invalid integer" in response and I'm tried both unix and just normal datetime notation
Nvm
I was being dumb.
Thank you for your help
No problem