A .NET Wrapper for http://www.pokeapi.co/

Name Last Update
PokeApi.NET Loading commit data...
PokeApi.NET.Tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
LICENSE.txt Loading commit data...
PokeApi.NET.sln Loading commit data...
README.md Loading commit data...
Use of LitJSON.txt Loading commit data...


A .NET Wrapper for http://www.pokeapi.co/. See the master branch for the v1 version.



using System;
using PokeAPI;

// [...]

// in async method

PokemonSpecies p = await DataFetcher.GetApiObject<PokemonSpecies>(395);
// or:
PokemonSpecies p = await DataFetcher.GetNamedApiObject<PokemonSpecies>("lucario");

float cRate = p.CaptureRate;
// etc

To get the value behind the Task<T> object synchronously, use the Result property.


open System
open PokeAPI

// [...]

    let! p = DataFetcher.GetApiObject<PokemonSpecies> 395 |> Async.AwaitTask;
    // or:
    let! p = DataFetcher.GetNamedApiObject<PokemonSpecies> "lucario" |> Async.AwaitTask;

    let cRate = p.CaptureRate;
    // etc

To get the value behind the Async<T> object synchronously, use the Async.RunSynchronously function. If it's a Task<T>, do as described under 'C#'.


Separate docs for this library aren't really needed, everything is made to look like the pokeapi.co docs, but using more C#-like names. I might add separate methods for every api object type later.