#!/usr/bin/env python

import sys
import json
from RFAPI import RFAPI

name = sys.argv[1]

q = {
  "entity": {
    "type": "Person",
    "name": name
  }
}

reply = RFAPI().query(q)

entity_id = reply["entities"][0]
print json.dumps(reply["entity_details"][entity_id])
