Module passivetotal::config [] [src]

It is necessary to create the correct configuration before using the API.

You must put a JSON document at ~/.config/passivetotal/api_config.json, that looks like:

{
    "username": "your_email@example.com",
    "api_key": "The API key associated with your account",
    "http_proxy": "<unused, keep empty>",
    "https_proxy": "<unused, keep empty>",
    "api_server": "api.passivetotal.org",
}

The config generator isn't implemented in this rust implementation yet so it is necessary to create it by hand or generate it with the Python API, installable via: pip install passivetotal

Examples

use passivetotal::config::read_config;
use passivetotal::client::PTClient;

let conf = try!(read_config());
let client = PTClient::new(conf);

Structs

Config

Enums

ConfigError

Functions

read_config