Exemple #1
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)
Exemple #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)
Exemple #3
0
 def __init__(self, token):
     self.token = token
     self.app = App()
Exemple #4
0
 def __init__(self, token):
     self.token = token
     self.app = App()