Esempio n. 1
0
        static void Main(string[] args)
        {
            var goApi = new GoApi(AuthenticationService.pokemonClubLogin("PTC_ID", "PTC_PW"), AuthenticationService.AuthenticationType.PTC);
            var clientPlayerDetails = goApi.getPlayerDetails();

            Console.WriteLine($"[+] Username : {clientPlayerDetails.Username}");
            Console.WriteLine($"[+] Poke Storage : {clientPlayerDetails.PokeStorage}");
            Console.WriteLine($"[+] Item Storage : {clientPlayerDetails.ItemStorage}");
            Console.WriteLine($"[+] Account creation time : {clientPlayerDetails.CreationTime}");
            Console.ReadKey();
        }
Esempio n. 2
0
    public async Task HandleAsync()
    {
        var message = "Please specify at least 1 search term";

        if (_args.Count != 0)
        {
            var go     = new GoApi(_clientFactory);
            var result = await go.InvokeAsync(_args);

            message = result.Type switch
            {
                "A" => result.AbstractText,
                "D" => result.RelatedTopics?[0].Text,
                "E" => result.Redirect,
                "C" => result.AbstractUrl?.ToString(),
                _ => "Nothing found \uD83D\uDE22"
            };
        }

        await _botService.SendMessageAsync(message ?? "Nothing found \uD83D\uDE22", _chatId);
    }
}