BP_REST_Invites_Endpoint::get_item_schema()
Get the invite schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-invites/classes/class-bp-rest-invites-endpoint.php
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | public function get_item_schema() { $schema = array ( 'title' => 'bp_invites' , 'type' => 'object' , 'properties' => array ( 'id' => array ( 'description' => __( 'Unique identifier for the invite.' , 'buddyboss' ), 'type' => 'integer' , 'context' => array ( 'embed' , 'view' , 'edit' ), 'readonly' => true, ), 'name' => array ( 'description' => __( 'Member\'s name.' , 'buddyboss' ), 'type' => 'string' , 'context' => array ( 'embed' , 'view' , 'edit' ), 'readonly' => true, ), 'email' => array ( 'description' => __( 'Member\'s email address' , 'buddyboss' ), 'type' => 'string' , 'context' => array ( 'embed' , 'view' , 'edit' ), 'readonly' => true, ), 'date' => array ( 'description' => __( 'The date the object was published, in the site\'s timezone.' , 'buddyboss' ), 'type' => 'string' , 'format' => 'date-time' , 'context' => array ( 'embed' , 'view' , 'edit' ), ), 'date_gmt' => array ( 'description' => __( 'The date the object was published, as GMT.' , 'buddyboss' ), 'type' => 'string' , 'format' => 'date-time' , 'context' => array ( 'embed' , 'view' , 'edit' ), ), 'status' => array ( 'description' => __( 'Status to perform on it.' , 'buddyboss' ), 'type' => 'string' , 'context' => array ( 'embed' , 'view' , 'edit' ), ), 'invitee-status' => array ( 'description' => __( 'Whether invitee is registered or not.' , 'buddyboss' ), 'type' => 'boolean' , 'context' => array ( 'embed' , 'view' , 'edit' ), ), 'revoke-invite' => array ( 'description' => __( 'Whether revoke invite or not.' , 'buddyboss' ), 'type' => 'boolean' , 'context' => array ( 'embed' , 'view' , 'edit' ), ), ), ); /** * Filters the Invites schema. * * @param array $schema The endpoint schema. */ return apply_filters( 'bp_rest_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.