RSVP method missing in pyfacebook lib

When I was working with the fbconnect in a python-django project, I found something missing. There was no method to update rsvp for an event. I am not sure how/why those brains missed this case. Anyways, a little hack for the existing pyfacebook library does the job. Here is it.

You can download the existing project from github - http://github.com/sciyoshi/pyfacebook

Inside the package, you just need to edit one file to make it possible. Open facebook/__init__.py in your favourite editor ;).

In that file go to the definition of the dict METHODS change the value of the key 'events', initially it is like

# events methods
    'events': {
        'get': [
            ('uid', int, ['optional']),
            ('eids', list, ['optional']),
            ('start_time', int, ['optional']),
            ('end_time', int, ['optional']),
            ('rsvp_status', str, ['optional']),
        ],
        'getMembers': [
            ('eid', int, []),
        ],
        'create': [
            ('event_info', json, []),
        ],
    },

Now add the rsvp method to the events dict, then this dict will be like this

# events methods
    'events': {
        'get': [
            ('uid', int, ['optional']),
            ('eids', list, ['optional']),
            ('start_time', int, ['optional']),
            ('end_time', int, ['optional']),
            ('rsvp_status', str, ['optional']),
        ],
        'getMembers': [
            ('eid', int, []),
        ],
        'create': [
            ('event_info', json, []),
        ],
        'rsvp': [
            ('eid', int, []),
            ('rsvp_status', str, ['optional']),
        ],
    },

Official documentation for facebook's event rsvp is here - http://wiki.developers.facebook.com/index.php/Events.rsvp