public static async Task <object> ExecuteApiPrereq(string uniqueId)
        {
            switch (uniqueId)
            {
            case "Group-0-Item-10":
            case "Group-1-Item-7":
                return(await GetNotebooksExample.GetAllNotebooksExpand(false));

            case "Group-1-Item-1":
                return(await GetPagesExample.GetAllPages(false));

            case "Group-1-Item-6":
                return(await GetPagesExample.GetAllPages(false));

            case "Group-2-Item-2":
                return(await GetNotebooksExample.GetAllNotebooks(false));

            case "Group-2-Item-4":
                return(await GetSectionsExample.GetAllSections(false));

            case "Group-2-Item-9":
                return(await GetNotebooksExample.GetAllNotebooks(false));

            case "Group-2-Item-12":
                return(await GetNotebooksExample.GetAllNotebooks(false));
            }
            return(null);
        }
Example #2
0
        public static async Task <object> ExecuteApiPrereq(string uniqueId, AuthProvider provider, bool useBeta)
        {
            var apiEndPoint = ApiEndPoint(useBeta);

            switch (uniqueId)
            {
            case "Group-0-Item-0":
            case "Group-0-Item-1":
            case "Group-0-Item-2":
            case "Group-0-Item-3":
            case "Group-0-Item-4":
            case "Group-0-Item-5":
            case "Group-0-Item-6":
            case "Group-0-Item-7":
            case "Group-0-Item-8":
            case "Group-0-Item-10":
            case "Group-1-Item-7":
                return(await GetNotebooksExample.GetAllNotebooksExpand(false, provider, apiEndPoint));

            case "Group-1-Item-1":
                return(await GetPagesExample.GetAllPages(false, provider, apiEndPoint));

            case "Group-1-Item-6":
                return(await GetPagesExample.GetAllPages(false, provider, apiEndPoint));

            case "Group-2-Item-2":
                return(await GetNotebooksExample.GetAllNotebooks(false, provider, apiEndPoint));

            case "Group-2-Item-4":
                return(await GetSectionsExample.GetAllSections(false, provider, apiEndPoint));

            case "Group-2-Item-9":
                return(await GetNotebooksExample.GetAllNotebooks(false, provider, apiEndPoint));

            case "Group-2-Item-12":
                return(await GetNotebooksExample.GetAllNotebooks(false, provider, apiEndPoint));

            case "Group-2-Item-13":
                return(await GetSectionGroupsExample.GetAllSectionGroups(false, provider, apiEndPoint));

            case "Group-2-Item-14":
                return(await GetNotebooksExample.GetAllNotebooks(false, provider, apiEndPoint));

            case "Group-2-Item-15":
                return(await GetSectionGroupsExample.GetAllSectionGroups(false, provider, apiEndPoint));

            case "Group-3-Item-0":
                return(await GetPagesExample.GetAllPages(false, provider, apiEndPoint));

            case "Group-3-Item-1":
            case "Group-4-Item-0":
                return(await GetPagesExample.GetAllPages(false, provider, apiEndPoint));
            }
            return(null);
        }
        public static async Task <object> ExecuteApi(string uniqueId, bool debug, string requiredSelectedId, string requiredInputText)
        {
            switch (uniqueId)
            {
            case "Group-0-Item-0":
                return(await PostPagesExample.CreateSimplePage(debug));

            case "Group-0-Item-1":
                return(await PostPagesExample.CreatePageWithImage(debug));

            case "Group-0-Item-2":
                return(await PostPagesExample.CreatePageWithEmbeddedWebPage(debug));

            case "Group-0-Item-3":
                return(await PostPagesExample.CreatePageWithUrl(debug));

            case "Group-0-Item-4":
                return(await PostPagesExample.CreatePageWithAttachedFile(debug));

            case "Group-0-Item-5":
                return(await PostPagesExample.CreatePageWithNoteTags(debug));

            case "Group-0-Item-6":
                return(await PostPagesExample.CreatePageWithAutoExtractBusinessCard(debug));

            case "Group-0-Item-7":
                return(await PostPagesExample.CreatePageWithAutoExtractRecipe(debug));

            case "Group-0-Item-8":
                return(await PostPagesExample.CreatePageWithAutoExtractProduct(debug));

            case "Group-0-Item-9":
                return(await PostPagesExample.CreateSimplePageInAGivenSectionName(debug, requiredInputText));

            case "Group-0-Item-10":
                return(await PostPagesExample.CreateSimplePageInAGivenSectionId(debug, requiredSelectedId));

            case "Group-1-Item-0":
                return(await GetPagesExample.GetAllPages(debug));

            case "Group-1-Item-1":
                return(await GetPagesExample.GetASpecificPageMetadata(debug, requiredSelectedId));

            case "Group-1-Item-2":
                return(await GetPagesExample.GetAllPagesWithTitleContainsFilterQueryParams(debug, requiredInputText));

            case "Group-1-Item-3":
                return(await GetPagesExample.GetAllPagesWithSkipAndTopQueryParams(debug, 20, 3));

            case "Group-1-Item-4":
                return(await GetPagesExample.GetAllPagesWithOrderByAndSelectQueryParams(debug, "title asc", "id,title"));

            case "Group-1-Item-5":
                return(await GetPagesExample.SearchAllPages(debug, requiredInputText));

            case "Group-1-Item-6":
                return(await GetPagesExample.GetASpecificPageContent(debug, requiredSelectedId));

            case "Group-1-Item-7":
                return(await GetPagesExample.GetAllPagesUnderASpecificSectionId(debug, requiredSelectedId));

            case "Group-2-Item-0":
                return(await GetNotebooksExample.GetAllNotebooksExpand(debug));

            case "Group-2-Item-1":
                return(await GetNotebooksExample.GetAllNotebooks(debug));

            case "Group-2-Item-2":
                return(await GetNotebooksExample.GetASpecificNotebook(debug, requiredSelectedId));

            case "Group-2-Item-3":
                return(await GetSectionsExample.GetAllSections(debug));

            case "Group-2-Item-4":
                return(await GetSectionsExample.GetASpecificSection(debug, requiredSelectedId));

            case "Group-2-Item-5":
                return(await GetSectionGroupsExample.GetAllSectionGroups(debug));

            case "Group-2-Item-6":
                return(await GetNotebooksExample.GetAllNotebooksWithNameMatchingFilterQueryParam(debug, requiredInputText));

            case "Group-2-Item-7":
                return(await GetNotebooksExample.GetAllNotebooksWithUserRoleAsNotOwnerFilterQueryParam(debug));

            case "Group-2-Item-8":
                return(await GetNotebooksExample.GetAllNotebooksWithOrderByAndSelectQueryParams(debug, "name asc", "id,name"));

            case "Group-2-Item-9":
                return(await GetSectionsExample.GetSectionsUnderASpecificNotebook(debug, requiredSelectedId));

            case "Group-2-Item-10":
                return(await GetSectionsExample.GetAllSectionsWithNameMatchingFilterQueryParam(debug, requiredInputText));

            case "Group-2-Item-11":
                return(await PostNotebooksExample.CreateSimpleNotebook(debug, requiredInputText));

            case "Group-2-Item-12":
                return(await PostSectionsExample.CreateSimpleSection(debug, requiredSelectedId, requiredInputText));
            }
            return(null);
        }