Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting in README #18

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 22 additions & 20 deletions README.md
Expand Up @@ -30,31 +30,33 @@ _Note:_ You must obtain a token for the user/bot. You can find or generate these

###Basic API methods

import time
from slackclient import SlackClient

token = "xoxp-28192348123947234198234" # found at https://api.slack.com/#auth)
sc = SlackClient(token)
print sc.api_call("api.test")
print sc.api_call("channels.info", {"channel": "C1234567890"})
```python
import time
from slackclient import SlackClient

token = "xoxp-28192348123947234198234" # found at https://api.slack.com/#auth)
sc = SlackClient(token)
print sc.api_call("api.test")
print sc.api_call("channels.info", {"channel": "C1234567890"})
````


### Real Time Messaging
---------


import time
from slackclient import SlackClient
token = "xoxp-28192348123947234198234"# found at https://api.slack.com/#auth)
sc = SlackClient(token)
if sc.rtm_connect():
while True:
print sc.rtm_read()
time.sleep(1)
else:
print "Connection Failed, invalid token?"

```python
import time
from slackclient import SlackClient

token = "xoxp-28192348123947234198234"# found at https://api.slack.com/#auth)
sc = SlackClient(token)
if sc.rtm_connect():
while True:
print sc.rtm_read()
time.sleep(1)
else:
print "Connection Failed, invalid token?"
```

####Objects
-----------
Expand Down