Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mr687/request-info
https://github.com/mr687/request-info
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mr687/request-info
- Owner: mr687
- Created: 2021-08-10T11:33:15.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-10T14:38:28.000Z (over 3 years ago)
- Last Synced: 2024-09-24T02:23:16.322Z (3 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @mr687/reqeust-info [![NPM version](https://img.shields.io/npm/v/request-info.svg?style=flat)](https://www.npmjs.com/package/@mr687/reqeust-info) [![NPM monthly downloads](https://img.shields.io/npm/dm/request-info.svg?style=flat)](https://npmjs.org/package/@mr687/reqeust-info) [![NPM total downloads](https://img.shields.io/npm/dt/request-info.svg?style=flat)](https://npmjs.org/package/@mr687/reqeust-info)
> get user info from request IP
actually, if you curious about my miss-spelling package name, that is intentionally the name!
## install
```sh
$ npm install @mr687/reqeust-info
```## usage
```js
const requestInfo = require('@mr687/reqeust-info')async function run() {
const ip = '8.8.8.8'
const info = await requestInfo(ip)
console.log(info)
}
run()
``````
// it will returns
{
title: '8.8.8.8 Tracking Report',
info: {
ip_address: '8.8.8.8',
hostname: 'dns.google',
latitude: '37.751',
longtitude: '-97.822',
continent: 'North America',
continent_code: 'NA',
country: 'United States',
country_code: 'US',
region: 'Not Detected',
city: 'Not Detected',
organization: 'GOOGLE',
internet_service_provider: 'GOOGLE',
asn: 'AS15169 GOOGLE',
monetary_currency: 'United States Dollar($) (USD)',
dial_out_code: '+1',
language: 'English',
blacklist: 'Not Detected',
proxy: 'Detected',
gmt: '09',
sunrise_time: '06',
greenwich_mean_time_zone: '-18000',
timezone: 'America/North_Dakota/Center'
}
}
```## api
**params**
* `ip` : ip address