BP_REST_Activity_Controller::get_item_schema PHP Method

get_item_schema() public method

Get the plugin schema, conforming to JSON Schema.
Since: 0.1.0
public get_item_schema ( ) : array
return array
    public function get_item_schema()
    {
        $schema = array('$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'activity', 'type' => 'object', 'properties' => array('id' => array('context' => array('view', 'edit'), 'description' => __('A unique alphanumeric ID for the object.', 'buddypress'), 'readonly' => true, 'type' => 'integer'), 'prime_association' => array('context' => array('view', 'edit'), 'description' => __('The ID of some other object primarily associated with this one.', 'buddypress'), 'type' => 'integer'), 'secondary_association' => array('context' => array('view', 'edit'), 'description' => __('The ID of some other object also associated with this one.', 'buddypress'), 'type' => 'integer'), 'author' => array('context' => array('view', 'edit'), 'description' => __('The ID for the creator of the object.', 'buddypress'), 'type' => 'integer'), 'link' => array('context' => array('view', 'edit'), 'description' => __('The permalink to this object on the site.', 'buddypress'), 'format' => 'url', 'type' => 'string'), 'component' => array('context' => array('view', 'edit'), 'description' => __('The BuddyPress component the object relates to.', 'buddypress'), 'type' => 'string', 'enum' => array_keys(bp_core_get_components())), 'type' => array('context' => array('view', 'edit'), 'description' => __('The activity type of the object.', 'buddypress'), 'type' => 'string', 'enum' => array_keys(bp_activity_get_types())), 'title' => array('context' => array('view', 'edit'), 'description' => __('HTML title of the object.', 'buddypress'), 'type' => 'string'), 'content' => array('context' => array('view', 'edit'), 'description' => __('HTML content of the object.', 'buddypress'), 'type' => 'string'), 'date' => array('description' => __("The date the object was published, in the site's timezone.", 'buddypress'), 'type' => 'string', 'format' => 'date-time', 'context' => array('view', 'edit')), 'status' => array('context' => array('view', 'edit'), 'description' => __('Whether the object has been marked as spam or not.', 'buddypress'), 'type' => 'string', 'enum' => array('published', 'spam')), 'parent' => array('description' => __('The ID of the parent of the object.', 'buddypress'), 'type' => 'integer', 'context' => array('view', 'edit'))));
        return $schema;
    }