Пример #1
0
        public Form1()
        {
            InitializeComponent();

            // Configure API key authorization: bearer
            Configuration.ApiKey.Add("Authorization", "YOUR_API_KEY_HERE");
            // Setup prefix (e.g. Bearer) for API key
            Configuration.ApiKeyPrefix.Add("Authorization", "Bearer");

            BudgetsApi budgetApi = new BudgetsApi();
            var        budgets   = budgetApi.GetBudgets();

            _selectedBudget = budgets.Data.Budgets[0];

            this.Text = $"YNAB Statistics - {_selectedBudget.Name}";
        }
 public BudgetsApiTests()
 {
     instance = new BudgetsApi();
 }
Пример #3
0
 public void Init()
 {
     instance = new BudgetsApi();
 }
Пример #4
0
        private async Task <BudgetSummaryResponse> GetBudgets(Configuration configuration)
        {
            BudgetsApi budgetsApi = new BudgetsApi(configuration);

            return(await budgetsApi.GetBudgetsAsync(true));
        }