Example #1
0
        public static async Task <T> GetResource <T>(this ApiResource <T> named, PokeClient client = null)
        {
            var cli = client ?? new PokeClient();

            return(await cli.GetByUrl <T>(named.URL));
        }
Example #2
0
        public static async Task FillResource <T>(this NamedApiResource <T> named, PokeClient client = null)
        {
            var cli = client ?? new PokeClient();

            named.Resource = await cli.GetByUrl <T>(named.URL);
        }
        public static async Task <List <T> > GetResourceList <T>(this string urlPart, PokeClient client = null)
        {
            var cli = client ?? new PokeClient();

            return(await cli.GetListByUrlPart <T>(urlPart));
        }