Skip to content

liridian/pincode-directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PincodeDirectory

A PHP wrapper for the All India Pincode directory API provided by the Ministry of Electronics & Information Technology,Government of India

Build Status

Build Status

Usage

Here's an example of using the PHP wrapper -

<?php
require_once "vendor/autoload.php";
use Liridian\PincodeDirectory;

$client = new Liridian\PincodeDirectory();

$available_filters = $client->getAvailableFilters();
$available_fields = $client->getAvailableSelectFields();
$locale = $client
			->withApiKey($api_key)
			->withFilter([['pincode' => '400089']])
			->withSort([['pincode' => 'asc'], ['officename' => 'desc']])
			->get();

echo '<h1>PincodeDirectory Test</h1>';

echo 'Available filters:';
echo '<pre>'.json_encode($available_filters, JSON_PRETTY_PRINT).'</pre>';

echo 'Available fields:';
echo '<pre>'.json_encode($available_fields, JSON_PRETTY_PRINT).'</pre>';

echo 'Sample response:';
echo '<pre>'.json_encode($locale, JSON_PRETTY_PRINT).'</pre>';

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages