Пример #1
0
    def postProject(self):
        if not self.tasksLoaded:
            print "Need to load some tasks"
            return



        if (self.username and self.password):

            #set the mode 
            if (self._production):
                mw.production()
            else:
                mw.sandbox()

            #set the user information
            mw.username = self.username
            mw.password = self.password

            self.project.post()
        else:
            print "Need to inform a username and password"
Пример #2
0
def auth():
    # to switch to the sandbox
    mw.sandbox()
    # provide your username/password
    mw.username = "******"
    mw.password = "******"
Пример #3
0
# import the MobileWorks library 
import mobileworks as mw 


# to switch to the sandbox
mw.sandbox()


# provide your username/password 
mw.username = '******'
mw.password = '******' 


# create a task object 
t = mw.Task(instructions="This question is created with Python2.7") 


# set some parameters 
t.set_params(resource="just_some_url")
 
 
# add the required fields 
t.add_field("Name", "t") 


# finally, post it and get the url of the newly created task 
task_url = t.post()


# use the task url that we got above (when we posted the task)
task_info = mw.Task.retrieve(task_url)