🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

SpeciesDatabaseApi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

SpeciesDatabaseApi

Queries and fetch data from species, taxon, regions and conservation database(s) to retrieve information using the provider API.

1.2.2
Source
NuGet
Version published
Maintainers
1
Created
Source

License GitHub repo size Code size Nuget GitHub Sponsors

Icon Species Database Api

Queries and fetch data from species, taxon, regions and conservation database(s) to retrieve information using the provider API.

🌐 Clients

Name / ProviderClassTerms of use
Barcode of Life Data Sytem (BoldSystems)BoldSystemsClientTerms of use
International Union for Conservation of Nature (IUCN)IucnClientTerms of use
Marine RegionsMarineRegionsClientTerms of use
Species+/CITESSpeciesPlusClientTerms of use
World Register of Marine Species (WoRMS)WormsClientTerms of use

🤝 Terms of use

Before the use of any provider you must accept and follow the terms of use of each used client. Please refer to the "terms of use" from the above links.

🧬 Structure

  • Calls follow the async programming
  • Returned data have a class data model

Example (WoRMS)

  private static readonly WormsClient Client = new WormsClient();

  private async void Main()
  {
     var result = await Client.GetAphiaRecordByAphiaId(105792);
     Console.WriteLine(result);
  }
Result:
AphiaId: 105792  
Url: https://marinespecies.org/aphia.php?p=taxdetails&id=105792  
ScientificName: Carcharhinus leucas  
Authority: (Müller & Henle 1839)  
TaxonRankId: 220  
Rank: Species  
Status: accepted  
UnacceptReason:  
ValidAphiaID: 105792  
ValidName: Carcharhinus leucas  
ValidAuthority: (Müller & Henle 1839)  
ParentNameUsageId: 105719  
Kingdom: Animalia  
Phylum: Chordata  
Class: Elasmobranchii  
Order: Carcharhiniformes  
Family: Carcharhinidae  
Genus: Carcharhinus  
Citation: Froese R. and D. Pauly. Editors. (2023). FishBase. Carcharhinus leucas (Müller & Henle 1839). Accessed through: World Register of Marine Species at: https://marinespecies.org/aphia.php?p=taxdetails&id=105792 on 2023-08-09  
lsId: urn:lsid:marinespecies.org:taxname:105792  
IsMarine: 1  
IsBrackish: 1  
IsFreshwater: 1  
IsTerrestrial: 0  
IsExtinct:  
MatchType: Exact  
Modified: 15/01/2008 17:27:08  

Example (IUCN)

  private static readonly IucnClient Client = new IucnClient("your-api-key");

  private async void Main()
  {
     var results = await Client.GetSpecieCommonNames("Carcharodon carcharias");
     foreach(var result in results)
     {
        Console.WriteLine(result);
     }
  }
Result:
TaxonName: White Shark, Primary: True, Language: eng
TaxonName: Great White Shark, Primary: False, Language: eng

🗔 Command-line

The project SpeciesDatabaseCmd allow to call all the API using the command-line and also provide a sample on how to use the library.
Run the "SpeciesDatabaseCmd.exe" and follow the in-terminal instructions to call the commands.

Example:

# Usage:
#   SpeciesDatabaseCmd [command] [options]
# 
# Options:
#   --version       Show version information
#   -?, -h, --help  Show help and usage information
# 
# Commands:
#  BOLDSYSTEMS    Query - Barcode of Life Data Sytem (https://www.boldsystems.org)
#  IUCN           Query - International Union for Conservation of Nature (http://www.iucnredlist.org)
#  MARINEREGIONS  Query - Marine Regions (https://www.marineregions.org)
#  SPECIES+       Query - Species+/CITES (https://www.speciesplus.net)
#  WORMS          Query - World Register of Marine Species (https://www.marinespecies.org)

SpeciesDatabaseCmd.exe IUCN SpecieCommonNames "Carcharodon carcharias"

> Name: Carcharodon carcharias
> Error:
> Message:
> IsSuccess: True
> Count: 2
> Results: 2
> ## Result[0]:
> TaxonName: White Shark
> Primary: True
> Language: eng
> ## Result[1]:
> TaxonName: Great White Shark
> Primary: False
> Language: eng
  • Via "Manage NuGet packages"
  • Manually via terminal:
dotnet add package SpeciesDatabaseApi

Keywords

species

FAQs

Package last updated on 20 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts