Comments (7)
Hi @akalex. But I tested it, and it worked. Just tested it again.
This code:
wh_filters = {
'filter[from_ts]': '2023-12-04T12:00:00Z',
'filter[to_ts]': '2023-12-04T16:00:00Z',
'filter[status]': 'success',
}
for inv in zenpy.webhooks.invocations('01G00WWJ8VEMXSE31ENNJ6H2R9', **wh_filters):
print(inv)
gives this debug output:
DEBUG:zenpy.lib.api:GET: https://pdi.zendesk.com/api/v2/webhooks/01G00WWJ8VEMXSE31ENNJ6H2R9/invocations?filter[status]=success&filter[to_ts]=2023-12-04T16:00:00Z&filter[from_ts]=2023-12-04T12:00:00Z - {'timeout': 60.0}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pdi.zendesk.com:443
DEBUG:urllib3.connectionpool:https://pdi.zendesk.com:443 "GET /api/v2/webhooks/01G00WWJ8VEMXSE31ENNJ6H2R9/invocations?filter%5Bstatus%5D=success&filter%5Bto_ts%5D=2023-12-04T16:00:00Z&filter%5Bfrom_ts%5D=2023-12-04T12:00:00Z HTTP/1.1" 200 None
...
Invocation(id='01HGTF4QZGCE5E9VEPDWH2PFQK')
Invocation(id='01HGTF2X41Q0VS2HD5CR9TCA38')
Invocation(id='01HGTF26DHR5QZE0T0EEJ0AN4C')
Invocation(id='01HGTEMY6NS3FBW61XENWGJSXY')
Invocation(id='01HGTEDV4HBJFNWH54W7WDQ8KN')
DEBUG:zenpy.lib.generator:No more results available, stopping iteration
from zenpy.
Hi! Hope fixed it here: #606 if @cryptomail won't mind, I'll merge it a bit later
from zenpy.
Great. Thanks for your prompt response. Looking forward to getting it merged soon.
from zenpy.
@akalex please try a new release. Docs are here.
from zenpy.
Thanks, @Ptr314,
I am checking the new version and will come back to you shortly.
from zenpy.
Hey @Ptr314,
I realized it has no effect because **kwargs
gets passed into the wrong method. This is how it is supposed to look I believe
@extract_id(Webhook)
def invocations(self, webhook, **kwargs):
"""
Get a webhook invocations
:param webhook: a webhook to get invocations
"""
url = self._build_url(endpoint=self.endpoint.invocations(id=webhook))
return self._get(url, **kwargs)
In that case, I should be able to pass query parameters as follows.
client.webhooks.invocations("webhook_id", params={"filter[status]": "failed"})
from zenpy.
Ok, I was wrong. It works.
from zenpy.
Related Issues (20)
- users.incremental() doesn't behave like tickets.incremental() HOT 7
- Fail to create many new users HOT 5
- Add lilnter to Zenpy HOT 3
- Create or Update many users does not work HOT 16
- Incremental API does not work, when passing `datetime.datime` HOT 6
- Ticket cannot be rated HOT 7
- Search export support for page[size] parameter HOT 4
- Users incremental endpoint is missing the cursor attribute HOT 3
- [Feature Request] zenpy to support cache backends HOT 4
- Setting ticket status to "pending" but the UI creates an "open" ticket HOT 14
- Question: Is it possible for me to simulate a conversation between a client and an Agent. HOT 1
- [Question] Facing a weird issue while creating a ticket HOT 3
- Question: Adding a comment as part of the actions of a Trigger HOT 3
- `SearchExportResultGenerator.next()` raises `IndexError` HOT 6
- Zenpy Cachetools implementation is not ThreadSafe and doesn't have a lock HOT 2
- `TicketCursorGenerator` returns no values HOT 15
- `Ticket.commets` return no values HOT 2
- TooManyValuesException: Parameter organization_memberships cannot specify more than 1 values HOT 1
- Resource not found when calling Zenpy.chats.triggers() HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenpy.