{ "protocol" : "Lawyer", "namespace" : "Switchboard", "types" : [ { "type" : "record", "name" : "LawyerSpecialty", "fields" : [ { "name" : "name", "type" : "string" }, { "name" : "percent", "type" : "int" } ] }, { "type" : "record", "name" : "BrowseLink", "fields" : [ { "name" : "type", "type" : "string", "doc" : "type of url: profile, contact *" }, { "name" : "url", "type" : "string", "doc" : "actual url *" } ] }, { "type" : "record", "name" : "Lawyer", "doc" : "The main class for this protocol", "fields" : [ { "name" : "id", "type" : "int", "doc" : "The primary key" }, { "name" : "firstname", "type" : "string", "doc" : "name" }, { "name" : "middlename", "type" : "string" }, { "name" : "lastname", "type" : "string" }, { "name" : "suffix", "type" : "string" }, { "name" : "aliases", "type" : { "type" : "array", "items" : "string" }, "doc" : "Lawyer's alternative names *" }, { "name" : "avvo_pro", "type" : "boolean", "doc" : "whether the lawyer is Avvo Pro *" }, { "name" : "avvo_rating", "type" : "float", "doc" : "Avvo Rating (Scale of 1-10)" }, { "name" : "client_review_count", "type" : "int", "doc" : "Number of reviews the average is based upon" }, { "name" : "client_review_score", "type" : "float", "doc" : "Average client review score (Scale of 1-5)" }, { "name" : "headshot_url", "type" : "string", "doc" : "Url to their full-size headshot photo" }, { "name" : "licensed_since", "type" : "int", "doc" : "year licensed since *" }, { "name" : "browse_links", "type" : { "type" : "array", "items" : "BrowseLink" }, "doc" : "Avvo browsing links *" }, { "name" : "bio", "type" : "string", "doc" : "Lawyer's bio *" }, { "name" : "lawyer_specialties", "type" : { "type" : "array", "items" : "LawyerSpecialty" }, "doc" : "List of specialties this lawyer practices" } ] } ], "messages" : { "index" : { "doc" : "Look up many lawyers in bulk", "request" : [ ], "response" : { "type" : "array", "items" : "Lawyer" } }, "show" : { "doc" : "Look up a single lawyer by id", "request" : [ { "name" : "id", "type" : "int" } ], "response" : { "type" : "array", "items" : "Lawyer" } }, "search" : { "doc" : "Look up many lawyers in bulk", "request" : [ ], "response" : { "type" : "array", "items" : "Lawyer" } } } }