Code Monkey home page Code Monkey logo

threatexchange's Introduction

ThreatExchange Client

Interact with the ThreatExchange API via PHP.

composer require certly/threatexchange

Documentation

Initialize a ThreatExchange object with your application ID and application secret. All API calls will return a stdClass with the result.

$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
echo var_dump($tx->getThreatExchangeMembers());

You can call other endpoints not directly implemented with the call function. You'll be authenticated automatically.

$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$tx->call("/898557073557972/descriptors", "GET");

If you need to pass parameters for a GET or POST request, just pass an associative array.

$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$tx->call("/898557073557972/descriptors", "GET", [
    "param_name" => "param_value"
]);

You can also use GET and POST specific functions.

$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$tx->get("/898557073557972/descriptors", [
    "param_name" => "param_value"
]);

If you want to retrieve more results, simply use the next function with the pagination URL returned from your previous request.

$tx = new Certly\ThreatExchange\ThreatExchange("123", "abc");
$result = $tx->getThreatIndicators("domain", "ian.sh", ["limit" => 1]);
$tx->next($result->paging->next);

threatexchange's People

Contributors

iangcarroll avatar

Stargazers

juliet avatar Marc Brown avatar  avatar

Watchers

James Cloos avatar  avatar Andrew Breksa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.