Exemplo n.º 1
0
        public ManagementApi(Uri baseAddress, Func <Task <string> > getToken, HttpMessageHandler handler)
        {
            var client = new HttpClient(new NoSchemeAuthenticationHeaderClient(getToken, handler))
            {
                BaseAddress = baseAddress
            };

            Skills = new SkillManagementApi(client);

            AccountLinking = new AccountLinkingApi(client);

            InteractionModel = new InteractionModelApi(client);

            Vendors = RestService.For <IVendorApi>(client);

            Enablement = new SkillEnablementApi(client);

            IntentRequestHistory = new IntentRequestHistoryApi(client);

            SkillValidation = new SkillValidationApi(client);

            InSkillProducts = new InProductSkillsApi(client);

            Beta = new SkillBetaApi(client);

            Package = new SkillPackageApi(client);

            UtteranceProfiler = new SkillUtteranceProfilerApi(client);
        }
        public ManagementApi(HttpClient client)
        {
            Skills = new SkillManagementApi(client);

            AccountLinking = new AccountLinkingApi(client);

            InteractionModel = new InteractionModelApi(client);

            Vendors = RestService.For <IVendorApi>(client, ManagementRefitSettings.Create());

            Enablement = new SkillEnablementApi(client);

            IntentRequestHistory = new IntentRequestHistoryApi(client);

            SkillValidation = new SkillValidationApi(client);

            InSkillProducts = new InProductSkillsApi(client);

            Beta = new SkillBetaApi(client);

            Package = new SkillPackageApi(client);

            UtteranceProfiler = new SkillUtteranceProfilerApi(client);

            Nlu = new NluApiContainer(
                new NluAnnotationSetApi(client),
                new NluEvaluationApi(client));

            CatalogManagement = new SkillCatalogManagementApi(client);

            Metrics = RestService.For <IMetricsApi>(client, ManagementRefitSettings.Create());

            SkillDevelopment = new SkillDevelopmentApi(client);

            SlotType = new SlotTypeApi(client);

            AuditLogs = RestService.For <IAuditLogsApi>(client, ManagementRefitSettings.Create());

            Asr = new AsrApi(client);

            ReferenceCatalogManagement = new ReferenceCatalogManagementApi(client);

            Experiments = new ExperimentApi(client);

            KnowledgeSkill = new KnowledgeSkillApi(client);
        }
        public ManagementApi(Uri baseAddress, Func <Task <string> > getToken, HttpMessageHandler handler)
        {
            var client = new HttpClient(new NoSchemeAuthenticationHeaderClient(getToken, handler))
            {
                BaseAddress = baseAddress
            };
            var v0Address = string.Join("", baseAddress.Scheme, "://", baseAddress.Host, "/v0");
            var v0Client  = new HttpClient(new NoSchemeAuthenticationHeaderClient(getToken, handler))
            {
                BaseAddress = new Uri(v0Address, UriKind.Absolute)
            };

            Skills = new SkillManagementApi(client);

            AccountLinking = new AccountLinkingApi(client);

            InteractionModel = new InteractionModelApi(client);

            Vendors = RestService.For <IVendorApi>(client, ManagementRefitSettings.Create());

            Enablement = new SkillEnablementApi(client);

            IntentRequestHistory = new IntentRequestHistoryApi(client);

            SkillValidation = new SkillValidationApi(client);

            InSkillProducts = new InProductSkillsApi(client);

            Beta = new SkillBetaApi(client);

            Package = new SkillPackageApi(client);

            UtteranceProfiler = new SkillUtteranceProfilerApi(client);

            Nlu = new NluApiContainer(
                new NluAnnotationSetApi(client),
                new NluEvaluationApi(client));

            CatalogManagement = new SkillCatalogManagementApi(v0Client);

            Metrics = RestService.For <IMetricsApi>(client, ManagementRefitSettings.Create());
        }