Exemplo n.º 1
0
        public TestOutcome CreateQuery(string referenceName)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Queries";
            outcome.methodName = "QueriesBuild";
            try
            {
                QueriesApi         queriesApi = new QueriesApi(_url);
                QueryTemplateArray templates  = queriesApi.QueriesTemplates(_session.SessionId, "QueueItem");
                foreach (QueryTemplate template in templates)
                {
                    Console.WriteLine(template.Title);
                }
                QueryTemplate a_template = templates[0];

                Dictionary <string, string> options = new Dictionary <string, string>();
                options["reference"]  = referenceName;
                options["properties"] = "";

                Query query = queriesApi.QueriesBuild(_session.SessionId, a_template.InternalRef, new QueryArguments(options));
                Console.WriteLine(query.Id);
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
 public AnalyticsApi(IBitmovinApiClientFactory apiClientFactory)
 {
     Exports     = new ExportsApi(apiClientFactory);
     Impressions = new ImpressionsApi(apiClientFactory);
     Insights    = new InsightsApi(apiClientFactory);
     Metrics     = new MetricsApi(apiClientFactory);
     Ads         = new AdsApi(apiClientFactory);
     Queries     = new QueriesApi(apiClientFactory);
     Licenses    = new LicensesApi(apiClientFactory);
     Outputs     = new OutputsApi(apiClientFactory);
 }
Exemplo n.º 3
0
        public TestOutcome GetQueriesByFilter(string filterstring)
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Queries";
            outcome.methodName = "QueriesSearch";
            try
            {
                QueriesApi queriesApi = new QueriesApi(_url);
                NamedArray queries    = queriesApi.QueriesSearch(_session.SessionId, 100, FilterGenerator.SimpleFilter("name", "like", filterstring + "%"));
                foreach (Named query in queries)
                {
                    Console.WriteLine(query.Name);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 4
0
        public TestOutcome GetQueriesByTemplate()
        {
            TestOutcome outcome = new TestOutcome();

            outcome.moduleName = "Queries";
            outcome.methodName = "QueriesTemplates";
            try
            {
                QueriesApi         queriesApi = new QueriesApi(_url);
                QueryTemplateArray templates  = queriesApi.QueriesTemplates(_session.SessionId, "ResultTask", "", 100);
                foreach (QueryTemplate template in templates)
                {
                    Console.WriteLine(template.Title);
                }
                outcome.outcome = "Success";
                return(outcome);
            }
            catch (Exception ex)
            {
                outcome.outcome = ex.Message;
                return(outcome);
            }
        }
Exemplo n.º 5
0
 public AdsApi(IBitmovinApiClientFactory apiClientFactory)
 {
     Queries = new QueriesApi(apiClientFactory);
 }