Exemplo n.º 1
0
        public async Task <List <Team> > GetTeams()
        {
            var response = await authsomeService.GetAsync <Teams>("https://api.clickup.com/api/v2/team", (headerBuilder) =>
            {
                headerBuilder.IncludeHeader("Authorization", appSettings.ApiToken);
            });

            return(response.Content.teams.ToList());
        }
Exemplo n.º 2
0
        public async Task <AuthenticationResult> Authenticate()
        {
            var response = await authsomeService.GetAsync <AuthenticationResult>("https://api.apollo.io/v1/auth/health?api_key=" + apiKey);

            if (response.httpStatusCode == System.Net.HttpStatusCode.OK)
            {
                return(response.Content);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var api      = BaseUrl + "/api/reportapi";
            var response = await authsomeService.GetAsync <List <Report> >(api);

            Pages = new List <string>();

            foreach (var report in response.Content)
            {
                Pages.Add(BaseUrl + "/report/reports?reportType=" + report.id);
            }

            browser = new WebBrowser();
            clsWebbrowser_Errors.SuppressscriptErrors(browser, true);
            masterGrid.Children.Add(browser);

            timer          = new Timer(TimeSpan.FromMinutes(1).TotalMilliseconds);
            timer.Elapsed += Timer_Elapsed;
            timer.Start();

            Timer_Elapsed(null, null);
        }