An open API service indexing awesome lists of open source software.

https://github.com/getbitpocket/cordova-dns-plugin

A Plugin for querying IP addresses to domain names
https://github.com/getbitpocket/cordova-dns-plugin

Last synced: about 2 months ago
JSON representation

A Plugin for querying IP addresses to domain names

Awesome Lists containing this project

README

          

# Cordova DNS Query Plugin

A Plugin for querying IP addresses to domain names

## Installation

`cordova plugin add cordova-dns-plugin`

## Quick Example

```javascript

// Resolving single IP address
cordova.plugins.dns.resolve('seed.bitcoin.sipa.be',function (ip) {
console.log("Resolved IP address: " + ip);
},function(error) {
console.log("Error: " + error);
});

// Resolving all available IP addresses
cordova.plugins.dns.resolveAll('seed.bitcoin.sipa.be',function (ips) {
ips.forEach(function(ip) {
console.log("Resolved IP address: " + ip);
});
},function(error) {
console.log("Error: " + error);
});

```

## Supported Platforms

- Android

## Running Tests

- Add tests as plugin `cordova plugin add https://github.com/getbitpocket/cordova-dns-plugin.git#:/tests`
- Follow the [Cordova Plugins Tests](https://github.com/apache/cordova-plugin-test-framework#running-plugin-tests) guide
- Run the tests by launching app `cordova emulate`