zeeshan/inspector

Inspector - 一个通过用户的电子邮件获取其社交账户、网站、姓名、照片、工作经历和其他可能的详细信息 PHP 库。

v1.0 2016-06-23 11:31 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:04:14 UTC


README

Inspector - 一个通过用户的电子邮件获取其社交账户、网站、姓名、照片、工作经历和其他可能的详细信息 PHP 库。

安装

您可以使用以下方式安装此库

使用 Composer

您可以通过 Composer(PHP 的依赖管理器)来安装它。只需运行以下命令

composer require zeeshanu/inspector

有关更多详细信息,您可以在 Packagist 上找到此包。

手动方式

  • src 目录复制到您的代码库中,例如供应商目录。
  • Zeeshan\Inspector\Inspector 类添加到您的自动加载器中或直接引入文件。

入门

我将使用以下电子邮件地址来演示此 PHP 封装的使用方法。

ziishaned@gmail.com

// Your FulContact API key https://portal.fullcontact.com/signup
$apiKey = "";

$inspector = new Inspector($apiKey);
$person = $inspector->getProfile("ziishaned@gmail.com");

$person->getPhotos();
// An array of arrays where typename could be one of 'facebook', 'Gravatar', 'Twitter' etc
// [
//    [
//        "typeName" => "Facebook"
//        "url"      => "https://d2ojpxxtu63wzl.cloudfront.net/static/a2dcfe7a0136f34ace8c8fd378557a96_ce4301d022a5423869916af01ad8c2c//                       e11f7638b11958db47b89bf4ef7369ab7",
//    ],
//    [..],
//    [..],
//    [..],
// ]

$person->getContactInfo();
// An array of found contact info e.g websites and full name
// [
//    "websites" =>  [
//          [
//             "url" => "http://webxyz.com",
//          ],
//     ],
//     "fullName" => "Zeeshan Ahmed",
// ]

$person->getOrganizations();
// An array of organizations found in which he worked or currently working
// [
//    [
//        "name"        => "Company XYZ",
//        "startDate"   => "2014-07",
//        "title"       => "Software Engineer",
//        "current"     => true,               
//    ],
//    [..],
// ]

$person->getDemographics();
// An array of information about the user location
// [
//    [
//        "locationDeduced" => [
//              "normalizedLocation" => "Pakistan",
//              "deducedLocation"    => "Pakistan",
//              "country" => [
//                  "name"  => "Pakistan",
//                  "code" => "PK",
//              ],
//              "continent" => [
//                  "deduced"   => true
//                  "name"      => "Asia"
//              ],
//              "likelihood" => true,
//        ],
//        "locationGeneral" => "Pakistan",
//        "gender" => "Male",               
//    ],
// ]

$person->getSocialProfiles();
// An array of user social network links or information
// [
//    [
//        "bio"      => "Full Stack Web Engineer, Blogger, Freelancer, IT Enthusiast, Open Source and Web Lover, PHP and Javascript Fanatic",
//        "typeName" => "Twitter",
//        "url"      => "https://twitter.com/ziishaned",
//        "username" => "ziishaned",              
//    ],
//    [..],
//    [..],
//    [..],
//    [..],
// ]

$person->getInterests();
// An array of user digital Footprint or user interests
// [
//    "Blogging", "Cloud Computing", "Software Development", "Cybersecurity", "Hacking",
// ]

$person->getEmail();
// User email address
// "ziishaned@gmail.com"

反馈

如果您认为代码中可能有改进之处,您可以创建一个 pull request 或报告一个问题。您也可以通过 ziishaned@gmail.com 联系我。

注意

请注意,此库依赖于 FullContact API,您将需要一个 API 密钥来使用此包。

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件