trim_user parameter not working when using in the Python API


#1

I am trying to obtain the retweet stats for a particular tweet using the function statuses.retweets(), and the docs say the trim_user parameter can be used here (https://dev.twitter.com/docs/api/1.1/get/statuses/retweets/%3Aid). However, this does not seem to work. Can anyone help me with this?

The code with user_trim parameter

obj=t.statuses.retweets(id=419339536628736000,count=2,trim_user="true")

After storing in JSON file and printing, the output is

[
    {
        "contributors": null, 
        "truncated": false, 
        "text": "RT @MuggleNet: Who's your favorite Harry Potter character? Share with us who it is and why! #hp #harrypotter #snow\u2026 http://t.co/aTdBuBGn93", 
        "in_reply_to_status_id": null, 
        "id": 419344135305166848, 
        "favorite_count": 0, 
        "source": "web", 
        "retweeted": false, 
        "coordinates": null, 
        "entities": {
            "symbols": [], 
            "user_mentions": [
                {
                    "indices": [
                        3, 
                        13
                    ], 
                    "screen_name": "MuggleNet", 
                    "id": 14599470, 
                    "name": "MuggleNet.com", 
                    "id_str": "14599470"
                }
            ], 
            "hashtags": [
                {
                    "indices": [
                        92, 
                        95
                    ], 
                    "text": "hp"
                }, 
                {
                    "indices": [
                        96, 
                        108
                    ], 
                    "text": "harrypotter"
                }, 
                {
                    "indices": [
                        109, 
                        114
                    ], 
                    "text": "snow"
                }
            ], 
            "urls": [
                {
                    "url": "http://t.co/aTdBuBGn93", 
                    "indices": [
                        116, 
                        138
                    ], 
                    "expanded_url": "http://instagram.com/p/ituhf9OLMQ/", 
                    "display_url": "instagram.com/p/ituhf9OLMQ/"
                }
            ]
        }, 
        "in_reply_to_screen_name": null, 
        "id_str": "419344135305166848", 
        "retweet_count": 6, 
        "in_reply_to_user_id": null, 
        "favorited": false, 
        "retweeted_status": {
            "contributors": null, 
            "truncated": false, 
            "text": "Who's your favorite Harry Potter character? Share with us who it is and why! #hp #harrypotter #snow\u2026 http://t.co/aTdBuBGn93", 
            "in_reply_to_status_id": null, 
            "id": 419339536628736000, 
            "favorite_count": 5, 
            "source": "<a href=\"http://instagram.com\" rel=\"nofollow\">Instagram</a>", 
            "retweeted": false, 
            "coordinates": null, 
            "entities": {
                "symbols": [], 
                "user_mentions": [], 
                "hashtags": [
                    {
                        "indices": [
                            77, 
                            80
                        ], 
                        "text": "hp"
                    }, 
                    {
                        "indices": [
                            81, 
                            93
                        ], 
                        "text": "harrypotter"
                    }, 
                    {
                        "indices": [
                            94, 
                            99
                        ], 
                        "text": "snow"
                    }
                ], 
                "urls": [
                    {
                        "url": "http://t.co/aTdBuBGn93", 
                        "indices": [
                            101, 
                            123
                        ], 
                        "expanded_url": "http://instagram.com/p/ituhf9OLMQ/", 
                        "display_url": "instagram.com/p/ituhf9OLMQ/"
                    }
                ]
            }, 
            "in_reply_to_screen_name": null, 
            "id_str": "419339536628736000", 
            "retweet_count": 6, 
            "in_reply_to_user_id": null, 
            "favorited": false, 
            "user": {
                "id": 14599470, 
                "id_str": "14599470"
            }, 
            "geo": null, 
            "in_reply_to_user_id_str": null, 
            "possibly_sensitive": false, 
            "lang": "en", 
            "created_at": "Sat Jan 04 05:28:31 +0000 2014", 
            "in_reply_to_status_id_str": null, 
            "place": null
        }, 
        "user": {
            "id": 967612460, 
            "id_str": "967612460"
        }, 
        "geo": null, 
        "in_reply_to_user_id_str": null, 
        "possibly_sensitive": false, 
        "lang": "en", 
        "created_at": "Sat Jan 04 05:46:47 +0000 2014", 
        "in_reply_to_status_id_str": null, 
        "place": null
    }, 
    {
        "contributors": null, 
        "truncated": false, 
        "text": "RT @MuggleNet: Who's your favorite Harry Potter character? Share with us who it is and why! #hp #harrypotter #snow\u2026 http://t.co/aTdBuBGn93", 
        "in_reply_to_status_id": null, 
        "id": 419342315035975680, 
        "favorite_count": 0, 
        "source": "<a href=\"http://blackberry.com/twitter\" rel=\"nofollow\">Twitter for BlackBerry\u00ae</a>", 
        "retweeted": false, 
        "coordinates": null, 
        "entities": {
            "symbols": [], 
            "user_mentions": [
                {
                    "indices": [
                        3, 
                        13
                    ], 
                    "screen_name": "MuggleNet", 
                    "id": 14599470, 
                    "name": "MuggleNet.com", 
                    "id_str": "14599470"
                }
            ], 
            "hashtags": [
                {
                    "indices": [
                        92, 
                        95
                    ], 
                    "text": "hp"
                }, 
                {
                    "indices": [
                        96, 
                        108
                    ], 
                    "text": "harrypotter"
                }, 
                {
                    "indices": [
                        109, 
                        114
                    ], 
                    "text": "snow"
                }
            ], 
            "urls": [
                {
                    "url": "http://t.co/aTdBuBGn93", 
                    "indices": [
                        116, 
                        138
                    ], 
                    "expanded_url": "http://instagram.com/p/ituhf9OLMQ/", 
                    "display_url": "instagram.com/p/ituhf9OLMQ/"
                }
            ]
        }, 
        "in_reply_to_screen_name": null, 
        "id_str": "419342315035975680", 
        "retweet_count": 6, 
        "in_reply_to_user_id": null, 
        "favorited": false, 
        "retweeted_status": {
            "contributors": null, 
            "truncated": false, 
            "text": "Who's your favorite Harry Potter character? Share with us who it is and why! #hp #harrypotter #snow\u2026 http://t.co/aTdBuBGn93", 
            "in_reply_to_status_id": null, 
            "id": 419339536628736000, 
            "favorite_count": 5, 
            "source": "<a href=\"http://instagram.com\" rel=\"nofollow\">Instagram</a>", 
            "retweeted": false, 
            "coordinates": null, 
            "entities": {
                "symbols": [], 
                "user_mentions": [], 
                "hashtags": [
                    {
                        "indices": [
                            77, 
                            80
                        ], 
                        "text": "hp"
                    }, 
                    {
                        "indices": [
                            81, 
                            93
                        ], 
                        "text": "harrypotter"
                    }, 
                    {
                        "indices": [
                            94, 
                            99
                        ], 
                        "text": "snow"
                    }
                ], 
                "urls": [
                    {
                        "url": "http://t.co/aTdBuBGn93", 
                        "indices": [
                            101, 
                            123
                        ], 
                        "expanded_url": "http://instagram.com/p/ituhf9OLMQ/", 
                        "display_url": "instagram.com/p/ituhf9OLMQ/"
                    }
                ]
            }, 
            "in_reply_to_screen_name": null, 
            "id_str": "419339536628736000", 
            "retweet_count": 6, 
            "in_reply_to_user_id": null, 
            "favorited": false, 
            "user": {
                "id": 14599470, 
                "id_str": "14599470"
            }, 
            "geo": null, 
            "in_reply_to_user_id_str": null, 
            "possibly_sensitive": false, 
            "lang": "en", 
            "created_at": "Sat Jan 04 05:28:31 +0000 2014", 
            "in_reply_to_status_id_str": null, 
            "place": null
        }, 
        "user": {
            "id": 862828710, 
            "id_str": "862828710"
        }, 
        "geo": null, 
        "in_reply_to_user_id_str": null, 
        "possibly_sensitive": false, 
        "lang": "en", 
        "created_at": "Sat Jan 04 05:39:33 +0000 2014", 
        "in_reply_to_status_id_str": null, 
        "place": null
    }
]

Can anyone help resolve this?