AirMapDotNet is an open source library for accessing and manipulating the AirMap API.
Before you begin, you will need to sign up for a developer account to create an API key so you can begin to make API calls. Here are the steps to getting an account:
- Sign up for a free AirMap account on the Developer Portal.
- Apply to become a developer. This may take several days.
- Create a new application.
- Generate an API key.
To install AirMapDotNet, simply run the following command in the Package Manager Console:
Install-Package AirMapDotNet
Or install the library from NuGet using the following command:
nuget install AirMapDotNet
First, download the airmap.config.json
file from your dashboard and place it in the project's working directory.
Then, load the file using APIConfiguration.LoadFromFileAsync
.
Finally, create a new AirMap
instance with the configuration and explore to your heart's content!
APIConfiguration config = await APIConfiguration.LoadFromFileAsync("airmap.config.json");
AirMap am = new AirMap(config);
Manufacturers[] manus = await am.GetManufacturers();
If the code above does not produce an AirMapException
, you're good to go!
To use some features of the AirMap API, you must authenticate the user. To do this, simply use AuthenticationService.LoginAsync
:
APIConfiguration config = await APIConfiguration.LoadFromFileAsync("airmap.config.json");
AirMap am = new AirMap(config);
am.AuthenticationToken = await AuthenticationService.LoginAsync(am, username, password);
PilotProfile profile = await am.GetProfile();
Documentation is hosted on ReadTheDocs here.
Disclaimer: AirMapDotNet is not, and does not claim to be affiliated with AirMap or any of its products or employees. This is an open source project available to the public under the GNU Public License. Trademarks referenced, including AIRMAP, NOFLYZONE, and DRONEZONING and any associated logos are owned exclusively by AirMap, Inc.