Пример #1
0
 def __init__(self, django_request_obj):
     self.secret_key = settings.FIVEONE_SECRET_KEY
     self.api_key = settings.FIVEONE_API_KEY
     self.app_name = settings.FIVEONE_APP_NAME
     self.callback_path = settings.FIVEONE_CALLBACK_PATH
     self.fo = FiveOne(api_key=self.api_key, secret_key=self.secret_key, app_name=self.app_name, callback_path=self.callback_path, internal=True)
     
     self.checked = self.fo.check_session(django_request_obj)
     self.name = '51'
Пример #2
0
 def check_session(self, request=None):
     """The request parameter is now optional."""
     if request is None:
         request = pylons.request
     return FiveOne.check_session(self, request)
Пример #3
0
class Wuyao(object):
    def __init__(self, django_request_obj):
        self.secret_key = settings.FIVEONE_SECRET_KEY
        self.api_key = settings.FIVEONE_API_KEY
        self.app_name = settings.FIVEONE_APP_NAME
        self.callback_path = settings.FIVEONE_CALLBACK_PATH
        self.fo = FiveOne(api_key=self.api_key, secret_key=self.secret_key, app_name=self.app_name, callback_path=self.callback_path, internal=True)
        
        self.checked = self.fo.check_session(django_request_obj)
        self.name = '51'
        
    
    def getFriendsID(self):
        return self.fo.friends.get(uid=self.fo.user)


    def getFriendsInfo(self):
        return self.fo.friends.get(uid=self.fo.user)


    def areFriends(self, uids1, uids2):
        return self.fo.friends.areFriends(uids1, uids2)


    def getAppUsers(self):
        return self.fo.friends.getAppUsers()


    def getAppFriends(self):
        return self.fo.friends.getAppUsers()
    

    def publishTemplatizedAction(self, template_id, title_data=None, body_data=None, resource_id=None):
        return self.fo.feed.publishTemplatizedAction(template_id, body_data)
    
    
    def getUsersInfo(self, uids, fields):
        return self.fo.users.getInfo(uids=uids,fields=fields)
    

    def getLoggedInUser(self):pass
    

    def isAppAdded(self, uid):pass
    

    def getXNML(self, uid):pass
    

    def setXNML(self, uid, profile, profile_action):pass
    

    def sendNotifications(self, to_ids, notification):pass
    

    def getIsInviters(self, uids):pass
    

    def getOsInfo(self, invite_ids):pass
    

    def getUserOsInviteCnt(self, uids):pass
    

    def getAllocation(self):pass
    

    def regOrder(self, order_id, amount):pass
    

    def isOrderCompleted(self, order_id):pass
    

    def regOrder4Test(self, order_id, amount):pass
    

    def isOrderCompleted4Test(self, order_id):pass