The return value is currently something like (abbreviated):

Array
(
    [3] => Array
        (
            [0] => Array
                (
                    [content_type] => recommend-comment
                    [content_id] => 3
                    [value_type] => points
                    [value] => 1
                    [tag] => vote
                    [function] => count
                )

            [1] => Array
                (
                    [content_type] => recommend-comment
                    [content_id] => 3
                    [value_type] => points
                    [value] => 1
                    [tag] => vote
                    [function] => average
                )

            [2] => Array
                (
                    [content_type] => recommend-comment
                    [content_id] => 3
                    [value_type] => points
                    [value] => 1
                    [tag] => vote
                    [function] => sum
                )

        )

)

Adding keys to the deepest array makes sense:

Array
(
    [3] => Array
        (
            ['count'] => Array
                (
                    [content_type] => recommend-comment
                    [content_id] => 3
                    [value_type] => points
                    [value] => 1
                    [tag] => vote
                    [function] => count
                )

            ['average'] => Array
                (
                    [content_type] => recommend-comment
                    [content_id] => 3
                    [value_type] => points
                    [value] => 1
                    [tag] => vote
                    [function] => average
                )

            ['sum'] => Array
                (
                    [content_type] => recommend-comment
                    [content_id] => 3
                    [value_type] => points
                    [value] => 1
                    [tag] => vote
                    [function] => sum
                )

        )

)

Comments

torotil’s picture

Category: bug » feature

I'll take a look at the return values. A change has to go into 7.x-3.x though, because it would change the API to much.

torotil’s picture

Status: Active » Closed (won't fix)

This is not applicable any more to the current version.