コード例 #1
0
ファイル: base.py プロジェクト: alessandro-sena/MWToolBox
    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
ファイル: helperFcts.py プロジェクト: ream88/aic13
def auth():
    # to switch to the sandbox
    mw.sandbox()
    # provide your username/password
    mw.username = "******"
    mw.password = "******"
コード例 #3
0
ファイル: cheatsheet.py プロジェクト: ream88/aic13
# 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)