Skip to content

Update README tag/untag users #196

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

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

Oscarlsson
Copy link
Contributor

In python-intercom 3.1.0 I get the following error with tag_users and untag_users

AttributeError: 'Tag' object has no attribute 'tag_users'

According to https://developers.intercom.com/intercom-api-reference/reference#create-and-update-tags the others API:s use intercom.tags.tag and intercom.tags.untag which also works for in 3.1.0 with python 2.7.

$ intercom.tags.tag(name='main account', users=[{'email': 'email@email.com'}])
<intercom.tag.Tag at 0x1074a1e10>

# Tag is set on user
$ user = intercom.users.find(email="email@email.com')
$ user.tags
[<intercom.utils.Tag at 0x107570d90>]

$ intercom.tags.untag(name='main account', users=[{'email': 'email@email.com'}])
<intercom.tag.Tag at 0x107528cd0>

# Tag is not set on user
$ user = intercom.users.find(email="email@email.com')
$ user.tags
[]

Update README to reflect correct way of tagging / untagging users in
python-intercom 3.1.0
@apassant apassant merged commit c542f79 into intercom:master Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants