Socket
Socket
Sign inDemoInstall

ip-geolocation-api-jquery-sdk

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-geolocation-api-jquery-sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

60

ipgeolocation.js

@@ -1,19 +0,19 @@

function ipgeoByApikeyFieldsAndIp(apikey="", fields="" ,ip="") {
request("ipgeo", apikey, fields, ip,"");
function ipgeoByApikeyFieldsAndIp(apikey="", fields="" ,ip="") {
return request("ipgeo", apikey, fields, ip,"");
};
function ipgeoByApikeyAndFields(apikey="", fields="") {
request("ipgeo", apikey, fields);
return request("ipgeo", apikey, fields, "","");
};
function ipgeoByApikeyAndIp(apikey="", ip="") {
request("ipgeo", apikey, "", ip);
return request("ipgeo", apikey, "", ip,"");
}
function ipgeoByApikeyAndIps(apikey="", ips="") {
postRequest("ipgeo-bulk", apikey, ips);
return postRequest("ipgeo-bulk", apikey, ips);
}
function ipgeoByApikey(apikey=""){
request("ipgeo", apikey)
return request("ipgeo", apikey, "", "","")
}

@@ -23,18 +23,19 @@

function timezoneByApikeyAndIp(apikey="" ,ip="") {
request("timezone", apikey, "", ip);
return request("timezone", apikey, "", ip, "");
}
function timezoneByApikeyAndTz(apikey="", tz="") {
request("timezone", apikey, "", "",tz);
return request("timezone", apikey, "", "",tz);
}
function timezoneByApikey(apikey="") {
request("timezone", apikey);
return request("timezone", apikey, "", "","");
}
function timezoneByApikeyLatitudeAndLongitude(apikey="", latitude="", longitude=""){
request("timezone", apikey, "", "","", latitude, longitude);
return request("timezone", apikey, "", "","", latitude, longitude);
}
function request(subUrl=null, apiKey="",fields="",ip="", tz="", latitude="", longitude=""){
var responseData;
var URL = "";

@@ -67,15 +68,18 @@ if(apiKey){

$.get( "https://api.ipgeolocation.io/"+URL+"", function( data ) {
console.log(data);
})
.done(function(data) {
console.log("success");
console.log(data);
return data;
})
.fail(function(error) {
console.log("error");
console.log(error.responseText);
return error.responseText;
});
$.ajax({
type: "GET",
url: "https://api.ipgeolocation.io/"+URL+"",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function (data, status, jqXHR) {
responseData = data;
return data;
},
error: function (data, jqXHR, status) {
responseData = data.responseText;
return data.responseText;
}
});
return responseData;

@@ -85,2 +89,3 @@ }

function postRequest(subUrl=null, apiKey="", ips=""){
var responseData;
$.ajax({

@@ -93,14 +98,15 @@ type: "POST",

dataType: "json",
async: false,
success: function (data, status, jqXHR) {
console.log(data);
responseData = data;
return data;
},
error: function (data, jqXHR, status) {
console.log(data.responseText);
responseData = data.responseText;
return data.responseText;
}
});
return responseData;
}
{
"name": "ip-geolocation-api-jquery-sdk",
"version": "1.0.1",
"description": "",
"main": "ipgeolocation.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"_from": "ip-geolocation-api-jquery-sdk",
"_id": "ip-geolocation-api-jquery-sdk@1.0.2",
"_inBundle": false,
"_integrity": "sha512-F5iXvZ6RbQK6cKNzS9JP89fNPF1yLex2YOjaCqGcgOImOKGPpenGC+TydHISwyEgpvde8knKJVyCMUXhP0AtOQ==",
"_location": "/ip-geolocation-api-jquery-sdk",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "ip-geolocation-api-jquery-sdk",
"name": "ip-geolocation-api-jquery-sdk",
"escapedName": "ip-geolocation-api-jquery-sdk",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/ip-geolocation-api-jquery-sdk/-/ip-geolocation-api-jquery-sdk-1.0.1.tgz",
"_shasum": "b19cbc2f89c2789b8cd17a3cfb4c78f21dbece03",
"_spec": "ip-geolocation-api-jquery-sdk",
"_where": "/home/developer/jQry/gitHub",
"author": {
"name": "ipgeolocation"
},
"bundleDependencies": false,
"deprecated": false,
"description": "## Basic Usage Add the following script in your page: ```html <script src=\"https://cdn.jsdelivr.net/npm/ip-geolocation-api-jquery-sdk@1.0.0/ipgeolocation.min.js\"></script> ``` ## Geolocation Lookup ```html ipgeoByApikey('YOUR_API_KEY') ipgeoByApikeyAndIp('YOUR_API_KEY', '1.1.1.1') ipgeoByApikeyAndFields('YOUR_API_KEY', 'geo,time_zone,currency') ipgeoByApikeyFieldsAndIp('YOUR_API_KEY', 'geo,time_zone,currency', '1.1.1.1') ``` ## Bulk Geolocations Lookup ```html ipgeoByApikeyAndIps('YOUR_API_KEY', ['1.1.1.1','2.2.22.2','34.1.1.3']) ``` ## Time Zone API ```html timezoneByApikey('YOUR_API_KEY') timezoneByApikeyAndIp('YOUR_API_KEY', '1.1.1.1') timezoneByApikeyAndTimezone('YOUR_API_KEY', 'America/Los_Angeles')",
"keywords": [

@@ -21,4 +44,9 @@ "ip",

],
"author": "ipgeolocation",
"license": "ISC"
"license": "ISC",
"main": "ipgeolocation.js",
"name": "ip-geolocation-api-jquery-sdk",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.2"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc