![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
('The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools.',)
The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools (https://github.com/sixohsix/twitter/).
Simply:
$ easy_install chatter
Even better:
$ pip install chatter
See this quickstart tutorial: http://www.salesforce.com/us/developer/docs/chatterapi/Content/quickstart.htm from Salesforce.
Instantiation:
client_id = "YOUR_CHATTER_CLIENT_ID"
client_secret = "YOUR_CHATTER_CLIENT_SECRET"
auth = chatter.ChatterAuth(client_id, client_secret)
instance_url = "YOUR_USER_INSTANCE_URL"
access_token = "YOUR_USER_ACCESS_TOKEN"
refresh_token = "YOUR_USER_REFRESH_TOKEN"
chatter = chatter.Chatter(auth=auth, instance_url=instance_url,
access_token=access_token, refresh_token=refresh_token)
Get authenticated user's details:
me = chatter.users.me.get()
Note 'GET' is implied, so you can reduce the above to:
me = chatter.users.me()
Get another user's details
other_user = chatter.users["005E0000000FpoxIAC"].get()
Again, this can be reduced:
other_user = chatter.users["005E0000000FpoxIAC"]()
Another way to achieve this, using the '_' magic method:
other_user = chatter.users._("005E0000000FpoxIAC").get()
Updating the authenticated user's Chatter status:
chatter.feeds.news.me.feed_items.post(text="Hello world!")
Occassionally it is necessary to refresh the user's access token, due to session expiration. The underlying ChatterCall class will handle this automatically, however you may wish to be notified of access token changes so you can reflect this in your user model.
It's possible to do this via the access_token_refreshed_callback, pass in a callable, and your callback will get called with the refreshed access token.
e.g.
def my_callback(access_token):
print "New access_token", access_token
chatter = chatter.Chatter(auth=auth, instance_url=instance_url,
access_token=access_token, refresh_token=refresh_token,
access_token_refreshed_callback=my_callback)
The rest is hopefully self-explanatory! :)
Send feedback / questions etc. to:
FAQs
('The minimalist yet fully featured Chatter API class, heavily inspired by Python Twitter Tools.',)
We found that chatter demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.