Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ for convo in Conversation.find_all(
# the users email
for convo in Conversation.find_all(email='joe@example.com',type='user'):
...
# Iterate over through all conversations (read + unread) with a user based on
# Iterate over through all conversations (read + unread) with a user based on
# the users email
for convo in Conversation.find_all(
email='joe@example.com', type='user', unread=False):
Expand Down Expand Up @@ -226,7 +226,7 @@ conversation.reply(
message_type= comment', body='foo')
# Admin (identified by email) replies with a comment
conversation.reply(
type='admin', email='bob@example.com',
type='admin', email='bob@example.com',
message_type='comment', body='bar')

# MARKING A CONVERSATION AS READ
Expand Down Expand Up @@ -271,7 +271,7 @@ Tag.count()

``` python
# InApp message from admin to user
Message.create({
Message.create(**{
"message_type": "inapp",
"body": "What's up :)",
"from": {
Expand All @@ -285,7 +285,7 @@ Message.create({
})

# Email message from admin to user
Message.create({
Message.create(**{
"message_type": "email",
"subject": "Hey there",
"body": "What's up :)",
Expand All @@ -301,7 +301,7 @@ Message.create({
})

# Message from a user
Message.create({
Message.create(**{
"from": {
"type": "user",
"id": "536e564f316c83104c000020"
Expand Down Expand Up @@ -404,3 +404,18 @@ BadRequestError
RateLimitExceeded
AttributeNotSetError # Raised when you try to call a getter that does not exist on an object
```


## Running the Tests

Unit tests:

```bash
PYTHONPATH=. describe tests/unit
```

Integration tests:

```bash
PYTHONPATH=. INTERCOM_APP_ID=xxx INTERCOM_APP_API_KEY=xxx nosetests tests/integration
```