Example #1
0
File: _libMA.py Project: lfk0/libMA
class Device(object):

    def __init__(self, token):
        self.token = token
        self.app = App()

    def check_inspection(self):
        data = self.app.check__inspection()
        return data

    def notification_postDevicetoken(self, loginId, password,
                                     token=None, S="nosessionid"):
        if token == None:
            token = self.token
        params = {
            "S": S,  # magic,don't touch
            "login_id": loginId,
            "password": password,
            "token": token.encode("base64")
        }
        data = self.app.notification_post__devicetoken(params)
        return data

    def newUser(self, loginId, password):
        # self.notification_postDevicetoken(loginId, password)
        return User(self.app, loginId, password)
Example #2
0
class Device(object):
    def __init__(self, token):
        self.token = token
        self.app = App()

    def check_inspection(self):
        data = self.app.check__inspection()
        return data

    def notification_postDevicetoken(self,
                                     loginId,
                                     password,
                                     token=None,
                                     S="nosessionid"):
        if token == None:
            token = self.token
        params = {
            "S": S,  # magic,don't touch
            "login_id": loginId,
            "password": password,
            "token": token.encode("base64")
        }
        data = self.app.notification_post__devicetoken(params)
        return data

    def newUser(self, loginId, password):
        # self.notification_postDevicetoken(loginId, password)
        return User(self.app, loginId, password)
Example #3
0
File: _libMA.py Project: lfk0/libMA
 def __init__(self, token):
     self.token = token
     self.app = App()
Example #4
0
 def __init__(self, token):
     self.token = token
     self.app = App()