Comments (2)
Passing parameters as JSON is something new to Twitter API, as it wasn't an option when birdy
was written and it looks like we can't currently handle this use case.
I have a general idea how to handle this and should have a new version out in a day or two, time permitting.
Thanks for bringing this to my attention, haven't really worked with twitter API in a while, so this change went unnoticed.
from birdy.
@cherdt can you check out this branch (features/json-params) and let me know if it works. I don't have time to test this fully, but a quick test with requestb.in indicates that it should.
For API methods that require JSON params, the syntax is:
params = {
"type": "message_create",
"message_create": {
"target": {
"recipient_id": "6039192"
},
"message_data": {
"text": "hi there"
}
}
}
response = self.client.api.direct_messages.events.new.post(params)
You just pass a dict
to post() and birdy
will handle the rest.
If all is OK, i'll release a new version ASAP.
from birdy.
Related Issues (20)
- SSL certificate error while using pyinstaller HOT 1
- more verbose error reporting HOT 1
- streaming api does not return HOT 2
- Quick Question... HOT 1
- How to post an image with a status?
- How can we use cursors?
- users.lookup request not working
- TwitterRateLimitError: Response headers are always None
- Infinite recursion in class JSONObject
- Media upload
- Add supported Python version to README and setupy.py HOT 1
- Crash with no error report
- Streaming User returns no data HOT 2
- Tweets are being truncated at 140 chars HOT 4
- Public stream does not respond with any data HOT 1
- How to search tweets? HOT 1
- Twitter API docs links in Readme are outdated HOT 1
- Direct Message HOT 1
- Need help for /1.1/users/lookup request
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 birdy.