Esempio n. 1
0
 public static void Main()
 {
     login = new TestLoginHelper();
     workbooks = login.testLogin();
     SimpleExample simpleEx = new SimpleExample ();
     simpleEx.createOrganisations (true, true, true);
     simpleEx.getOrganisations ();
     login.testExit(workbooks, 0);
 }
Esempio n. 2
0
        public static void Main()
        {
            login = new TestLoginHelper();
              workbooks = login.testLogin();

              PdfExample pdfExample = new PdfExample();
              pdfExample.generatePDFs();
              login.testExit(workbooks, 0);
        }
Esempio n. 3
0
 public static void Main()
 {
     testLoginHelper = new TestLoginHelper();
     workbooks = testLoginHelper.testLogin ();
     PeopleExample peopleExample = new PeopleExample ();
       peopleExample.createTwoPeople (true, false);
       peopleExample.getPeople ();
     //		testLoginHelper.testExit (workbooks, 0);
 }
Esempio n. 4
0
        public static void Main()
        {
            login     = new TestLoginHelper();
            workbooks = login.testLogin();

            PdfExample pdfExample = new PdfExample();

            pdfExample.generatePDFs();
            login.testExit(workbooks, 0);
        }
Esempio n. 5
0
    public static void Main()
    {
        login     = new TestLoginHelper();
        workbooks = login.testLogin();
        SimpleExample simpleEx = new SimpleExample();

        simpleEx.createOrganisations(true, true, true);
        simpleEx.getOrganisations();
        login.testExit(workbooks, 0);
    }
Esempio n. 6
0
        public static void Main()
        {
            login = new TestLoginHelper();
            //			consoleListener.WriteLine  ("Logged in");
            workbooks = login.testLogin ();
            //consoleListener.WriteLine ("Obtained the workbooks object");

            UploadFilesExample uploadEx = new UploadFilesExample ();
            uploadEx.createOrganisation ();
        }
Esempio n. 7
0
        public static void Main()
        {
            testLoginHelper = new TestLoginHelper();
            workbooks       = testLoginHelper.testLogin();
            PeopleExample peopleExample = new PeopleExample();

            peopleExample.createTwoPeople(true, false);
            peopleExample.getPeople();
            //		testLoginHelper.testExit (workbooks, 0);
        }
Esempio n. 8
0
        public static void Main()
        {
            login = new TestLoginHelper();
              workbooks = login.testLogin();

              MetaDataExample metaDataEx = new MetaDataExample();
              metaDataEx.fetchSummary();
              metaDataEx.fetchSomeMoreSummary();

              login.testExit(workbooks, 0);
        }
Esempio n. 9
0
        public static void Main()
        {
            login = new TestLoginHelper();
              workbooks = login.testLogin();

              sendTemplatedEmail();
              sendDraftTemplatedEmail();
              sendSimpleTestEmail();

              login.testExit(workbooks, 0);
        }
Esempio n. 10
0
 public void testExit(WorkbooksApi workbooks, int exitcode)
 {
     if (exitcode == 0) {
     //Console.WriteLine ("Scripted exited OK");
     workbooks.log("Script exited", new Object[] {"OK"}, "info");
     } else {
     //Console.WriteLine ("Scripted exited with error");
     workbooks.log("Script exited with error", new Object[] {(int)exitcode}, "error");
     }
     System.Environment.Exit(exitcode);
 }
Esempio n. 11
0
        public static void Main()
        {
            login = new TestLoginHelper();
            //			consoleListener.WriteLine  ("Logged in");
            workbooks = login.testLogin();
            //consoleListener.WriteLine ("Obtained the workbooks object");

            UploadFilesExample uploadEx = new UploadFilesExample();

            uploadEx.createOrganisation();
        }
Esempio n. 12
0
        public static void Main()
        {
            login     = new TestLoginHelper();
            workbooks = login.testLogin();

            sendTemplatedEmail();
            sendDraftTemplatedEmail();
            sendSimpleTestEmail();

            login.testExit(workbooks, 0);
        }
Esempio n. 13
0
        public static void Main()
        {
            login     = new TestLoginHelper();
            workbooks = login.testLogin();

            ApiDataExample apiDataEx = new ApiDataExample();

            // apiDataEx.createAPIData();
            apiDataEx.getNonExistenceAPIData();

            login.testExit(workbooks, 0);
        }
Esempio n. 14
0
        public static void Main()
        {
            login     = new TestLoginHelper();
            workbooks = login.testLogin();

            MetaDataExample metaDataEx = new MetaDataExample();

            metaDataEx.fetchSummary();
            metaDataEx.fetchSomeMoreSummary();

            login.testExit(workbooks, 0);
        }
Esempio n. 15
0
        public static void Main()
        {
            login = new TestLoginHelper();
              workbooks = login.testLogin();

              ApiDataExample apiDataEx = new ApiDataExample();

              // apiDataEx.createAPIData();
              apiDataEx.getNonExistenceAPIData();

              login.testExit(workbooks, 0);
        }
Esempio n. 16
0
        public static void Main()
        {
            login     = new TestLoginHelper();
            workbooks = login.testLogin();

            FilterExample filterEx = new FilterExample();

            filterEx.populateSelectLimit();

            filterEx.getOrganisationsViaFilter();
            filterEx.getOrganisationsViaFilterArray();
            filterEx.getOrganisationsViaFilterJson();
        }
 public TestUsernamePasswordSessionHelper()
 {
     if (service != null) {
     loginParams.Add("service", service);
       }
       loginParams.Add("application_name", application_name);
       loginParams.Add("user_agent", user_agent);
       loginParams.Add("verify_peer", verify_peer);
       try {
     workbooks = new WorkbooksApi(loginParams);
       } catch(Exception e) {
     Console.WriteLine ("Exception while getting the workbooks object" + e.Message);
       }
 }
Esempio n. 18
0
 public void testExit(WorkbooksApi workbooks, int exitcode)
 {
     if (exitcode == 0)
     {
         //Console.WriteLine ("Scripted exited OK");
         workbooks.log("Script exited", new Object[] { "OK" }, "info");
     }
     else
     {
         //Console.WriteLine ("Scripted exited with error");
         workbooks.log("Script exited with error", new Object[] { (int)exitcode }, "error");
     }
     System.Environment.Exit(exitcode);
 }
 public TestUsernamePasswordSessionHelper()
 {
     if (service != null)
     {
         loginParams.Add("service", service);
     }
     loginParams.Add("application_name", application_name);
     loginParams.Add("user_agent", user_agent);
     loginParams.Add("verify_peer", verify_peer);
     try {
         workbooks = new WorkbooksApi(loginParams);
     } catch (Exception e) {
         Console.WriteLine("Exception while getting the workbooks object" + e.Message);
     }
 }
 public void testExit(WorkbooksApi workbooks, int exitcode)
 {
     try {
     Dictionary<string, object> logout = workbooks.logout();
     if (!logout.ContainsKey("success") ) {
       workbooks.log("Logout failed", new Object[] {logout}, "error");
       System.Environment.Exit(0);
     }
     workbooks.log("Logout Complete", new Object[] {this.GetType()}, "info");
       } catch(Exception e) {
     workbooks.log("Errors while logging out: ", new Object[] {e}, "error");
       }
       if (exitcode == 0) {
     workbooks.log("Script exited", new Object[] {"OK"}, "info");
       } else {
     workbooks.log("Script exited with error", new Object[] {exitcode}, "error");
       }
       System.Environment.Exit(exitcode);
 }
Esempio n. 21
0
 public WorkbooksApi testLogin()
 {
     if (service != null) {
         loginParams.Add("service", service);
     }
     loginParams.Add("application_name", application_name);
     loginParams.Add("user_agent", user_agent);
     loginParams.Add("verify_peer", verify_peer);
     if (api_key != null && api_key != "") {
         loginParams.Add("api_key", api_key);
     }
     try {
         workbooks = new WorkbooksApi(loginParams);
         Console.WriteLine("Workbooks: " + workbooks.Service);
         //				workbooks.log("Logged in with these loginParams: ", new Object[] {loginParams} );
     } catch(Exception e) {
         workbooks.log("Error while creating the Workbooks API object: ", new Object[] {e}, "error", WorkbooksApi.DEFAULT_LOG_LIMIT);
         Console.WriteLine ("Stacktrace: " + e.StackTrace);
     }
     return workbooks;
 }
 public void testExit(WorkbooksApi workbooks, int exitcode)
 {
     try {
         Dictionary <string, object> logout = workbooks.logout();
         if (!logout.ContainsKey("success"))
         {
             workbooks.log("Logout failed", new Object[] { logout }, "error");
             System.Environment.Exit(0);
         }
         workbooks.log("Logout Complete", new Object[] { this.GetType() }, "info");
     } catch (Exception e) {
         workbooks.log("Errors while logging out: ", new Object[] { e }, "error");
     }
     if (exitcode == 0)
     {
         workbooks.log("Script exited", new Object[] { "OK" }, "info");
     }
     else
     {
         workbooks.log("Script exited with error", new Object[] { exitcode }, "error");
     }
     System.Environment.Exit(exitcode);
 }
Esempio n. 23
0
 public WorkbooksApi testLogin()
 {
     if (service != null)
     {
         loginParams.Add("service", service);
     }
     loginParams.Add("application_name", application_name);
     loginParams.Add("user_agent", user_agent);
     loginParams.Add("verify_peer", verify_peer);
     if (api_key != null && api_key != "")
     {
         loginParams.Add("api_key", api_key);
     }
     try {
         workbooks = new WorkbooksApi(loginParams);
         Console.WriteLine("Workbooks: " + workbooks.Service);
         //				workbooks.log("Logged in with these loginParams: ", new Object[] {loginParams} );
     } catch (Exception e) {
         workbooks.log("Error while creating the Workbooks API object: ", new Object[] { e }, "error", WorkbooksApi.DEFAULT_LOG_LIMIT);
         Console.WriteLine("Stacktrace: " + e.StackTrace);
     }
     return(workbooks);
 }