{ "protocol" : "AdviceSessionReview", "namespace" : "Switchboard", "types" : [ { "type" : "record", "name" : "AdviceSessionReview", "doc" : "The main class for this protocol", "fields" : [ { "name" : "id", "type" : "int", "doc" : "The primary key" }, { "name" : "advice_session_id", "type" : "int" }, { "name" : "rating", "type" : "int" }, { "name" : "body", "type" : "string" }, { "name" : "approval_status_id", "type" : "int" } ] }, { "type" : "record", "name" : "AdviceSessionReviewCreateParams", "doc" : "Params to create a new Review", "fields" : [ { "name" : "advice_session_id", "type" : "int" }, { "name" : "rating", "type" : "int" }, { "name" : "body", "type" : "string" } ] }, { "type" : "record", "name" : "AdviceSessionReviewFetchOption", "doc" : "Options you can send for limiting Review results", "fields" : [ { "name" : "page", "type" : "int", "doc" : "Which page of records to fetch", "default" : 1 }, { "name" : "per_page", "type" : "int", "doc" : "How many records per page", "default" : 20 } ] } ], "messages" : { "show" : { "doc" : "Return a single Review", "request" : [ { "name" : "id", "type" : "int" } ], "response" : { "type" : "array", "items" : "AdviceSessionReview" } }, "create" : { "doc" : "Create a new Review", "request" : [ { "name" : "advice_session_review", "type" : "AdviceSessionReviewCreateParams" } ], "response" : { "type" : "array", "items" : "AdviceSessionReview" } }, "index" : { "doc" : "Returns a list of Review", "request" : [ { "name" : "options", "type" : "AdviceSessionReviewFetchOption" } ], "response" : { "type" : "array", "items" : "AdviceSessionReview" } } } }