Skip to content

An api accepting a phone number as input and providing information on that number.

Notifications You must be signed in to change notification settings

dbhaskaran1/phonenumberinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

phonenumberinfo

Introduction

An api accepting a phone number as input and providing information on that number.

Set up environment

Features

  • Take a US number by default and provide info on its carrier, if it is a valid number, if it is a possible number and other number based data
  • Accept country code as an additional input and provide the same information for international numbers
  • Provide a couple of end points that offer current date and current time

Usage information

  • run python manage.py runserver inside the phonenumberinfo dir
  • you should be able to hit the API at http://localhost:8000/info and see {"message": "Hello, you've reached the index. No info here!"}
  • try 'http://localhost:8000/info/phone_number/6786786780' for querying a single number against the US market. This produces {"is_number_possible": true, "is_number_valid": true, "number": "6786786780", "national_number": 6786786780, "country_code": 1, "carrier_data": ""}
  • try 'http://localhost:8000/info/phone_number/6786786780/IN' for querying a single number against country = India. This produces {"is_number_possible": true, "is_number_valid": true, "number": "9884287789", "national_number": 9884287789, "country_code": 91, "carrier_data": "Vodafone"}
  • try 'http://localhost:8000/info/phone_number/100' for querying a single number against the US market and you should see a result of "Valid number = False". Here's the json response {"is_number_possible": false, "is_number_valid": false, "number": "100", "national_number": 100, "country_code": 1, "carrier_data": ""}
  • try 'http://localhost:8000/info/current/time' for getting the current time ({"time": "13:31:14"})
  • try 'http://localhost:8000/info/current/date' for getting the current date ({"date": "18:10:2016"})

About

An api accepting a phone number as input and providing information on that number.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published