Coder Social home page Coder Social logo

gatomalo / arinwhois.net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maxhorstmann/arinwhois.net

0.0 2.0 0.0 352 KB

.NET client for ARIN's Whois RESTful Web Service, the API to accessing ARIN's Whois data

License: MIT License

C# 100.00%

arinwhois.net's Introduction

ARIN-Whois.NET

.NET client for ARIN's Whois RESTful Web Service, the API to accessing ARIN's Whois data.

The American Registry for Internet Numbers (ARIN) is the Regional Internet Registry (RIR) for North America. Their API is a directory service to access data in their registration database, such as networks, organizations, and point of contacts.

This is a simple .NET client to access the RESTful API programmatically with a set of statically typed helper classes.

Install

Use the NuGet package, run the following command in the Package Manager Console:

PM> Install-Package ArinWhois

Sample Usage

var arinClient = new ArinClient();

// Check single IP
var ipResponse = await arinClient.QueryIpAsync(IPAddress.Parse("69.63.176.0"));

Console.WriteLine(ipResponse.Network.Name);
Console.WriteLine(ipResponse.Network.NetBlocks.NetBlock.Cidr);

// Find out more about organization
var orgResponse = await arinClient.QueryResourceAsync(ipResponse.Network.OrgRef.Handle, 
							ArinClient.ResourceType.Organization);
Console.WriteLine(orgResponse.Organization.Name);
Console.WriteLine(orgResponse.Organization.City);

If you don't wanna do async, use .Result:

var response = arinClient.QueryIpAsync(IPAddress.Parse("69.63.176.0")).Result;

But you should do async, really.

Limitations

  • Read-only

Contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.