Welcometo the .NET client for the Parks and Rec API. For information and documentation for the API, check the API Wiki.
First things first, right? To use this API you'll need a Token. To request a token, go to www.parksandrecapi.com and follow the steps.
To implement the Library into your project, install the NuGet package into your solution/project by running it in the Package Manager Console:
PM> Install-Package ParksRecClient -Version 1.0.0
Or by searching ParksRecClient in the Package Manager searching bar.
To implement the client into your project, include the ParksRec.Client
namespace:
using ParksRec.Client;
To instantiate a new client in your program, include the following:
ParksRecConfig parksRecConfig = new ParksRecConfig {Token = "<TOKEN>"};
ParksRecClient client = new ParksRecClient(parksRecConfig);
To retrieve the band names, you can use:
var bands = await client.Bands.Get();
Or, to use the name filter, use:
var bands = await client.Bands.Get("name of band");
To retrieve the characters of the show, you can use:
var characters = await client.Characters.Get();
Or, to use the name filter, use:
var characters = await client.Characters.Get("leslie");
To retrieve the episodes, you can use:
var episodes = await client.Episodes.Get();
Or, to filter by the title of the episode, use:
var episodes = await client.Episodes.Get("knope");
To retrieve the seasons, you can use:
var seasons = await client.Seasons.Get();
Or, to filter by the season, use:
var seasons = await client.Seasons.Get("special");
Not that you have to, but if you want to support me, you can by buying me a bottle of vanilla coke ✌ PayPal, Venmo
This library is provided "as is" without expressed or implied warranty of any kind. Please use at your own risk and discretion.
This API is provided under the MIT License. See the LICENSE file for details.