So one thing you could do is set this to a variable, add the poll function to that variable and return that. Something like:

    var resource = $resource(....);

    resource.poll = function(..) { .... };

    return resource;