Exemplo n.º 1
0
        public async Task <List <OvCardResponse> > GetCardsAsync()
        {
            await EnsureAuthorized();

            Response <List <OvCardResponse> > result = await client.GetCardsAsync();

            return(result.Data);
        }
Exemplo n.º 2
0
        private static async Task Run(string username, string password)
        {
            using (var client = new OvClient())
            {
                var loginResponse = await client.LoginAsync(username, password);

                if (!loginResponse)
                {
                    return;
                }

                Console.WriteLine(JsonConvert.SerializeObject(client.OAuthTokens, Formatting.Indented));
                Console.WriteLine(client.AuthorizationToken);

                var cards = await client.GetCardsAsync();

                Console.WriteLine(JsonConvert.SerializeObject(await client.GetTransactionsAsync(cards.Data[0].MediumId), Formatting.Indented));
            }
        }