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


Python AccountElsewhere.upsert方法代码示例

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


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

示例1: make_elsewhere

# 需要导入模块: from gratipay.models.account_elsewhere import AccountElsewhere [as 别名]
# 或者: from gratipay.models.account_elsewhere.AccountElsewhere import upsert [as 别名]
 def make_elsewhere(self, platform, user_id, user_name, **kw):
     info = UserInfo( platform=platform
                    , user_id=unicode(user_id)
                    , user_name=user_name
                    , **kw
                    )
     return AccountElsewhere.upsert(info)
开发者ID:beerm,项目名称:gratipay.com,代码行数:9,代码来源:__init__.py

示例2: make_elsewhere

# 需要导入模块: from gratipay.models.account_elsewhere import AccountElsewhere [as 别名]
# 或者: from gratipay.models.account_elsewhere.AccountElsewhere import upsert [as 别名]
 def make_elsewhere(self, platform, user_id, user_name, **kw):
     """Factory for :py:class:`~gratipay.models.account_elsewhere.AccountElsewhere`.
     """
     info = UserInfo( platform=platform
                    , user_id=unicode(user_id)
                    , user_name=user_name
                    , **kw
                    )
     return AccountElsewhere.upsert(info)
开发者ID:PeterDaveHello,项目名称:gratipay.com,代码行数:11,代码来源:harness.py

示例3: make_elsewhere

# 需要导入模块: from gratipay.models.account_elsewhere import AccountElsewhere [as 别名]
# 或者: from gratipay.models.account_elsewhere.AccountElsewhere import upsert [as 别名]
 def make_elsewhere(self, platform, user_id, user_name, is_locked=False, **kw):
     info = UserInfo( platform=platform
                    , user_id=unicode(user_id)
                    , user_name=user_name
                    , **kw
                    )
     account = AccountElsewhere.upsert(info)
     if is_locked:
         account.set_is_locked(True)
     return account
开发者ID:9cat,项目名称:templecoin-gratipay,代码行数:12,代码来源:__init__.py

示例4: test_upsert

# 需要导入模块: from gratipay.models.account_elsewhere import AccountElsewhere [as 别名]
# 或者: from gratipay.models.account_elsewhere.AccountElsewhere import upsert [as 别名]
 def test_upsert(self):
     for platform in self.platforms:
         user_info = getattr(user_info_examples, platform.name)()
         account = AccountElsewhere.upsert(platform.extract_user_info(user_info))
         assert isinstance(account, AccountElsewhere)
开发者ID:Irkinosor,项目名称:gratipay.com,代码行数:7,代码来源:test_elsewhere.py

示例5: test_github_get_friends_for

# 需要导入模块: from gratipay.models.account_elsewhere import AccountElsewhere [as 别名]
# 或者: from gratipay.models.account_elsewhere.AccountElsewhere import upsert [as 别名]
 def test_github_get_friends_for(self):
     platform = self.platforms.github
     user_info = platform.extract_user_info(user_info_examples.github())
     account = AccountElsewhere.upsert(user_info)
     friends, nfriends, pages_urls = platform.get_friends_for(account)
     assert nfriends > 0
开发者ID:PeterDaveHello,项目名称:gratipay.com,代码行数:8,代码来源:test_elsewhere.py


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