當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。