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
- Host: GitHub
- URL: https://github.com/getbitpocket/cordova-dns-plugin
- Owner: getbitpocket
- License: apache-2.0
- Created: 2015-12-28T13:33:21.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-20T18:53:39.000Z (about 10 years ago)
- Last Synced: 2025-08-09T03:41:40.820Z (10 months ago)
- Language: Java
- Size: 282 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`