You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-10
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
hlr-lookup-api-nodejs-sdk
2
-
=========================
1
+
node-hlr-client
2
+
===============
3
3
Official HLR Lookup API Node JS SDK by www.hlr-lookups.com
4
4
5
5
This SDK implements the REST API documented at https://www.hlr-lookups.com/en/api-docs
6
6
7
-
For SDKs in different languages, see https://www.hlr-lookups.com/en/sdks
7
+
For SDKs in other programming languages, see https://www.hlr-lookups.com/en/sdks
8
8
9
9
Requirements
10
10
------------
@@ -21,6 +21,8 @@ npm install node-hlr-client
21
21
#!/usr/bin/env node
22
22
23
23
var HlrLookupClient =require("node-hlr-client");
24
+
var StringDecoder =require('string_decoder').StringDecoder;
25
+
var decoder =newStringDecoder('utf8');
24
26
25
27
var client =newHlrLookupClient(
26
28
'username',
@@ -36,14 +38,29 @@ var client = new HlrLookupClient(
36
38
* @paramstorage - An optional storage assignment, see: http://www.hlr-lookups.com/en/storages
37
39
* @returns{*}
38
40
*
39
-
* Callback example: {"success":true,"results":[{"id":"e1fdf26531e4","msisdncountrycode":"DE","msisdn":"+491788735000","statuscode":"HLRSTATUS_DELIVERED","hlrerrorcodeid":null,"subscriberstatus":"SUBSCRIBERSTATUS_CONNECTED","imsi":"262031300000000","mccmnc":"26203","mcc":"262","mnc":"03","msin":"1300000000","servingmsc":"140445","servinghlr":null,"originalnetworkname":"E-Plus","originalcountryname":"Germany","originalcountrycode":"DE","originalcountryprefix":"+49","originalnetworkprefix":"178","roamingnetworkname":"Fixed Line Operators and Other Networks","roamingcountryname":"United States","roamingcountrycode":"US","roamingcountryprefix":"+1","roamingnetworkprefix":"404455","portednetworkname":null,"portedcountryname":null,"portedcountrycode":null,"portedcountryprefix":null,"portednetworkprefix":null,"isvalid":"Yes","isroaming":"Yes","isported":"No","usercharge":"0.0100","inserttime":"2014-12-28 06:22:00.328844+08","storage":"SDK-TEST-SYNC-API","route":"IP1"}]}
41
+
* Callback example: {"success":true,"results":[{"id":"e1fdf26531e4","msisdncountrycode":"DE","msisdn":"+491788735000","statuscode":"HLRSTATUS_DELIVERED","hlrerrorcodeid":null,"subscriberstatus":"SUBSCRIBERSTATUS_CONNECTED","imsi":"262031300000000","mccmnc":"26203","mcc":"262","mnc":"03","msin":"1300000000","servingmsc":"140445","servinghlr":null,"originalnetworkname":"E-Plus","originalcountryname":"Germany","originalcountrycode":"DE","originalcountryprefix":"+49","originalnetworkprefix":"178","roamingnetworkname":"Fixed Line Operators and Other Networks","roamingcountryname":"United States","roamingcountrycode":"US","roamingcountryprefix":"+1","roamingnetworkprefix":"404455","portednetworkname":null,"portedcountryname":null,"portedcountrycode":null,"portedcountryprefix":null,"portednetworkprefix":null,"isvalid":"Yes","isroaming":"Yes","isported":"No","usercharge":"0.0100","inserttime":"2014-12-28 06:22:00.328844+08","storage":"SDK-TEST-SYNC-API","route":"IP1","interface":"Sync API"}]}
* Submits asynchronous HLR Lookups containing up to 1,000 MSISDNs per request. Results are sent back asynchronously to a callback URL on your server.
48
+
* Submits a synchronous number type lookup request. The HLR is queried in real time and results presented in the response body.
49
+
*
50
+
* @paramcallback - callback function(response)
51
+
* @paramnumber - An number in international format, e.g. +4989702626
52
+
* @paramroute - An optional route assignment, see: http://www.hlr-lookups.com/en/routing-options
53
+
* @paramstorage - An optional storage assignment, see: http://www.hlr-lookups.com/en/storages
54
+
* @returns{*}
55
+
*
56
+
* Callback example: {"success":true,"results":[{"id":"2ed0788379c6","number":"+4989702626","numbertype":"LANDLINE","state":"COMPLETED","isvalid":"Yes","invalidreason":null,"ispossiblyported":"No","isvanitynumber":"No","qualifiesforhlrlookup":"No","originalcarrier":null,"mccmnc":null,"mcc":null,"mnc":null,"countrycode":"DE","regions":["Munich"],"timezones":["Europe\/Berlin"],"infotext":"This is a landline number.","usercharge":"0.0050","inserttime":"2015-12-04 10:36:41.866283+00","storage":"SYNC-API-NT-2015-12","route":"LC1","interface":"Sync API"}]}
* Submits asynchronous HLR Lookups containing up to 1,000 MSISDNs per request. Results are sent back asynchronously to a callback URL on your server. Use \VmgLtd\HlrCallbackHandler to capture them.
47
64
*
48
65
* @paramcallback - callback function(response)
49
66
* @parammsisdns - A list of MSISDNs in international format, e.g. +491788735000
* Submits asynchronous number type lookups containing up to 1,000 numbers per request. Results are sent back asynchronously to a callback URL on your server.
79
+
*
80
+
* @paramcallback - callback function(response)
81
+
* @paramnumbers - A list of numbers in international format, e.g. +4989702626,+491788735000
82
+
* @paramroute - An optional route assignment, see: http://www.hlr-lookups.com/en/routing-options
83
+
* @paramstorage - An optional storage assignment, see: http://www.hlr-lookups.com/en/storages
* Sets the callback URL for asynchronous lookups. Read more about the concept of asynchronous HLR lookups @ http://www.hlr-lookups.com/en/asynchronous-hlr-lookup-api
0 commit comments