Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(23)  |  Call(19)  |  Derive(0)  |  Import(4)

        def partial(func, *args, **keywords):
    def newfunc(*fargs, **fkeywords):
        newkeywords = keywords.copy()
        newkeywords.update(fkeywords)
        return func(*(args + fargs), **newkeywords)
    newfunc.func = func
    newfunc.args = args
    newfunc.keywords = keywords
    return newfunc
        


src/p/y/python-hipchat-HEAD/hipchat/user.py   python-hipchat(Download)
from hipchat.connection import partial, call_hipchat, HipChatObject
 
class UserDeleteStatus(HipChatObject):
    sort = 'delete'
    def __init__(self, jsono):
 
 
User.create = classmethod(partial(call_hipchat, User, url="https://api.hipchat.com/v1/users/create", data=True))
User.delete = \
    classmethod(partial(call_hipchat, 
                        ReturnType=UserDeleteStatus, 
                        url="https://api.hipchat.com/v1/users/delete", 
                        data=True))
User.undelete = \
    classmethod(partial(call_hipchat, 
                        data=True))
User.list = \
    classmethod(partial(call_hipchat, 
                        ReturnType=lambda x: map(User, map(lambda y: {'user': y}, x['users'])), 
                        url="https://api.hipchat.com/v1/users/list", 

src/h/i/hipchat-0.0.1/hipchat/user.py   hipchat(Download)
from hipchat.connection import partial, call_hipchat, HipChatObject
 
class UserDeleteStatus(HipChatObject):
    sort = 'delete'
    def __init__(self, jsono):
 
 
User.create = classmethod(partial(call_hipchat, User, url="https://api.hipchat.com/v1/users/create", data=True))
User.delete = \
    classmethod(partial(call_hipchat, 
                        ReturnType=UserDeleteStatus, 
                        url="https://api.hipchat.com/v1/users/delete", 
                        data=True))
User.list = \
    classmethod(partial(call_hipchat, 
                        url="https://api.hipchat.com/v1/users/list", 
                        data=False))
User.show = classmethod(partial(call_hipchat, User, url="https://api.hipchat.com/v1/users/show", data=False))
User.update = classmethod(partial(call_hipchat, User, url="https://api.hipchat.com/v1/users/update", data=True))
 

src/h/i/hipchat-0.0.1/hipchat/room.py   hipchat(Download)
from hipchat.connection import partial, call_hipchat, HipChatObject
 
class Room(HipChatObject):
    sort = 'room'
 
 
Room.history = \
    classmethod(partial(call_hipchat, 
                        ReturnType=lambda x: map(Message, map(lambda y: {'message': y}, x['messages'])), 
                        url="https://api.hipchat.com/v1/rooms/history", 
                        data=False))
Room.list = \
    classmethod(partial(call_hipchat, 
                        url="https://api.hipchat.com/v1/rooms/list", 
                        data=False))
Room.message = classmethod(partial(call_hipchat, ReturnType=MessageSentStatus, url="https://api.hipchat.com/v1/rooms/message", data=True))
Room.show = classmethod(partial(call_hipchat, Room, url="https://api.hipchat.com/v1/rooms/show", data=False))
 

src/p/y/python-hipchat-HEAD/hipchat/room.py   python-hipchat(Download)
from hipchat.connection import partial, call_hipchat, HipChatObject
 
class Room(HipChatObject):
    sort = 'room'
 
 
Room.history = \
    classmethod(partial(call_hipchat, 
                        ReturnType=lambda x: map(Message, map(lambda y: {'message': y}, x['messages'])), 
                        url="https://api.hipchat.com/v1/rooms/history", 
                        data=False))
Room.list = \
    classmethod(partial(call_hipchat, 
                        url="https://api.hipchat.com/v1/rooms/list", 
                        data=False))
Room.message = classmethod(partial(call_hipchat, ReturnType=MessageSentStatus, url="https://api.hipchat.com/v1/rooms/message", data=True))
Room.show = classmethod(partial(call_hipchat, Room, url="https://api.hipchat.com/v1/rooms/show", data=False))