Documentation and Naming
Update Naming conventions and Docs
This commit is contained in:
parent
1fb557b178
commit
9f71ca3a36
3 changed files with 16 additions and 3 deletions
13
README.md
13
README.md
|
|
@ -89,5 +89,18 @@ Plugins can also run methods on a schedule. This allows a plugin to poll for upd
|
|||
####Plugin misc
|
||||
The data within a plugin persists for the life of the rtmbot process. If you need persistent data, you should use something like sqlite or the python pickle libraries.
|
||||
|
||||
####Direct API Calls
|
||||
You can directly call the Slack web API in your plugins by allowing the following import:
|
||||
|
||||
from client import client
|
||||
|
||||
You can also rename the client on import so it can be easily referenced like shown below:
|
||||
|
||||
from client import client as sc
|
||||
|
||||
Direct API calls can be called in your plugins in the following form:
|
||||
|
||||
sc.api_call("API.method", "parameters")
|
||||
|
||||
####Todo:
|
||||
Some rtm data should be handled upstream, such as channel and user creation. These should create the proper objects on-the-fly.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue