From 8720a6c546693ed3a33ebc663ca9b4faee6f5d7c Mon Sep 17 00:00:00 2001 From: John Keyes Date: Wed, 16 Nov 2016 20:51:48 +0000 Subject: [PATCH 1/3] Update code samples in index document to use new client. --- docs/index.rst | 114 ++++++++++++++++++++----------------------------- 1 file changed, 47 insertions(+), 67 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 06e61de0..edcdd7ac 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -45,8 +45,7 @@ Intercom documentation: `Create or Update Users `_. +Intercom documentation: `Getting Counts `_. :: - from intercom import Count - # Conversation Admin Count - Count.conversation_counts_for_each_admin + intercom.counts.for_type(type='converation', count='admin') # User Tag Count - Count.user_counts_for_each_tag + intercom.counts.for_type(type='user', count='tag') # User Segment Count - Count.user_counts_for_each_segment - - # Company Segment Count - Count.company_counts_for_each_segment - + intercom.counts.for_type(type='user', count='segment') + # Company Tag Count - Count.company_counts_for_each_tag - + intercom.counts.for_type(type='company', count='tag') + # Company User Count - Count.company_counts_for_each_user + intercom.counts.for_type(type='company', count='user') # Global App Counts - Company.count - User.count - Segment.count - Tag.count + intercom.counts.for_type() Conversations ------------- @@ -358,7 +341,6 @@ Intercom documentation: `Admin Initiated Conversation Date: Wed, 16 Nov 2016 20:52:08 +0000 Subject: [PATCH 2/3] Fix up some errors in the code samples in the README. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6edb0550..a87b8e47 100644 --- a/README.rst +++ b/README.rst @@ -84,7 +84,7 @@ Users intercom.users.save(user) # Perform incrementing user.increment('karma') - intercom.users.save() + intercom.users.save(user) # Iterate over all users for user in intercom.users.all(): ... @@ -468,7 +468,7 @@ Counts .. code:: python # App-wide counts - intercom.counts.for_app + intercom.counts.for_app() # Users in segment counts intercom.counts.for_type(type='user', count='segment') From aca801c61af10df96b268f1943e5fd2975291cc4 Mon Sep 17 00:00:00 2001 From: John Keyes Date: Wed, 16 Nov 2016 21:22:03 +0000 Subject: [PATCH 3/3] Update documentation. * added collaborators to the AUTHORS file * added version 3 changed to the CHANGES file * fixed the code syntax in the FAQ * updated dependencies in the Development Guide --- AUTHORS.rst | 7 ++++++- CHANGES.rst | 10 ++++++++++ docs/development.rst | 3 ++- docs/faq.rst | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index b67e5af4..7c2a50bd 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -17,9 +17,14 @@ Patches and Suggestions - `Grant McConnaughey `_ - `Robert Elliott `_ - `Jared Morse `_ -- `neocortex `_ +- `Rafael `_ - `jacoor `_ - `maiiku `_ +- `Piotr Kilczuk `_ +- `Forrest Scofield `_ +- `Jordan Feldstein `_ +- `François Voron `_ +- `Gertjan Oude Lohuis `_ Intercom ~~~~~~~~ diff --git a/CHANGES.rst b/CHANGES.rst index d64e5af6..c885da27 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,16 @@ Changelog ========= +* 3.0b3 + * Added UTC datetime everywhere. (`#130 `_) + * Fixed connection error when paginating. (`#125 `_) + * Added Personal Access Token support. (`#123 `_) + * Fixed links to Intercom API documentation. (`#115 `_) +* 3.0b2 + * Added support for Leads. (`#113 `_) + * Added support for Bulk API. (`#112 `_) +* 3.0b1 + * Moved to new client based approach. (`#108 `_) * 2.1.1 * No runtime changes. * 2.1.0 diff --git a/docs/development.rst b/docs/development.rst index 94cc62c4..994f3f05 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -42,6 +42,7 @@ Runtime Dependencies * `inflection `_ – Inflection is a string transformation library. It singularizes and pluralizes English words, and transforms strings from CamelCase to underscored string. * `six `_ – Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python versions with the goal of writing Python code that is compatible on both Python versions. * `certifi `_ – Certifi is a carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. +* `pytz `_ – pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations. It also solves the issue of ambiguous times at the end of daylight saving time. Development Dependencies ------------------------ @@ -50,7 +51,7 @@ Development Dependencies * `coverage `_ – code coverage. * `mock `_ – patching methods for unit testing. * `Sphinx `_ – documentation decorator. - +* `Sphinx theme for readthedocs.org `_ – theme for the documentation. Authors ------- diff --git a/docs/faq.rst b/docs/faq.rst index bb1b66a8..505b6508 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -6,7 +6,7 @@ How do I start a session? :: - user = User.create(email='bingo@example.com') + user = intercom.users.create(email='bingo@example.com') # register a new session user.new_session = True - user.save() + intercom.users.save(user)