当前位置: 首页>>代码示例>>Python>>正文


Python Intercom.post方法代码示例

本文整理汇总了Python中intercom.Intercom.post方法的典型用法代码示例。如果您正苦于以下问题:Python Intercom.post方法的具体用法?Python Intercom.post怎么用?Python Intercom.post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在intercom.Intercom的用法示例。


在下文中一共展示了Intercom.post方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: reply

# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import post [as 别名]
 def reply(self, **reply_data):
     from intercom import Intercom
     collection = utils.resource_class_to_collection_name(self.__class__)
     url = "/%s/%s/reply" % (collection, self.id)
     reply_data['conversation_id'] = self.id
     response = Intercom.post(url, **reply_data)
     return self.from_response(response)
开发者ID:ArabellaTech,项目名称:python-intercom,代码行数:9,代码来源:reply.py

示例2: create

# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import post [as 别名]
    def create(cls, **params):
        from intercom import Intercom

        collection = utils.resource_class_to_collection_name(cls)
        response = Intercom.post("/%s/" % (collection), **params)
        if response:  # may be empty if we received a 202
            return cls(**response)
开发者ID:NiekvanderLinden,项目名称:python-intercom,代码行数:9,代码来源:save.py

示例3: save

# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import post [as 别名]
 def save(self):
     from intercom import Intercom
     collection = utils.resource_class_to_collection_name(self.__class__)
     params = self.attributes
     if self.id_present and not self.posted_updates:
         # update
         response = Intercom.put('/%s/%s' % (collection, self.id), **params)
     else:
         # create
         params.update(self.identity_hash)
         response = Intercom.post('/%s' % (collection), **params)
     if response:
         return self.from_response(response)
开发者ID:ArabellaTech,项目名称:python-intercom,代码行数:15,代码来源:save.py

示例4: _tag_collection

# 需要导入模块: from intercom import Intercom [as 别名]
# 或者: from intercom.Intercom import post [as 别名]
    def _tag_collection(
            cls, collection_name, name, objects, untag=False):
        from intercom import Intercom
        collection = utils.resource_class_to_collection_name(cls)
        object_ids = []
        for obj in objects:
            if not hasattr(obj, 'keys'):
                obj = {'id': obj}
            if untag:
                obj['untag'] = True
            object_ids.append(obj)

        params = {
            'name': name,
            collection_name: object_ids,
        }
        response = Intercom.post("/%s" % (collection), **params)
        return cls(**response)
开发者ID:50onRed,项目名称:python-intercom-1,代码行数:20,代码来源:tag.py


注:本文中的intercom.Intercom.post方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。