BP_REST_Group_Invites_Endpoint::get_item_schema()
Get the group invite schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-groups/classes/class-bp-rest-group-invites-endpoint.php
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 | public function get_item_schema() { $schema = array ( 'title' => 'bp_group_invites' , 'type' => 'object' , 'properties' => array ( 'id' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'A unique numeric ID for the BP Invitation object.' , 'buddyboss' ), 'type' => 'integer' , 'readonly' => true, ), 'user_id' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'The ID of the user who is invited to join the Group.' , 'buddyboss' ), 'type' => 'integer' , ), 'invite_sent' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'Whether the invite has been sent to the invitee.' , 'buddyboss' ), 'type' => 'boolean' , ), 'inviter_id' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'The ID of the user who made the invite.' , 'buddyboss' ), 'type' => 'integer' , ), 'group_id' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'The ID of the group to which the user has been invited.' , 'buddyboss' ), 'type' => 'integer' , ), 'date_modified' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( "The date the object was created or last updated, in the site's timezone." , 'buddyboss' ), 'type' => 'string' , 'format' => 'date-time' , ), 'type' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'Invitation or request.' , 'buddyboss' ), 'type' => 'string' , 'enum' => array ( 'invite' , 'request' ), 'default' => 'invite' , ), 'message' => array ( 'context' => array ( 'view' , 'edit' ), 'description' => __( 'The raw and rendered versions for the content of the message.' , 'buddyboss' ), 'type' => 'object' , 'arg_options' => array ( 'sanitize_callback' => null, 'validate_callback' => null, ), 'properties' => array ( 'raw' => array ( 'description' => __( 'Content for the object, as it exists in the database.' , 'buddyboss' ), 'type' => 'string' , 'context' => array ( 'view' , 'edit' ), ), 'rendered' => array ( 'description' => __( 'HTML content for the object, transformed for display.' , 'buddyboss' ), 'type' => 'string' , 'context' => array ( 'view' , 'edit' ), 'readonly' => true, ), ), ), ), ); /** * Filters the group invites schema. * * @param array $schema The endpoint schema. */ return apply_filters( 'bp_rest_group_invites_schema' , $this ->add_additional_fields_schema( $schema ) ); } |
Changelog
Version | Description |
---|---|
0.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.