python-simple-hipchat


Namepython-simple-hipchat JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/kurttheviking/simple-hipchat-py
SummaryEasy peasy wrapper for HipChat's v1 API
upload_time2015-11-09 16:55:58
maintainerNone
docs_urlNone
authorKurt Ericson
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Python Client for HipChat v1
============================

Description
-----------

Easy peasy wrapper for the `HipChat API v1 <https://www.hipchat.com/docs/api>`_. Exposes core URI endpoint wrapper and some basic methods for common integrations.


Dependencies
------------
None beyond the Python standard library.


Usage
-----

Install::

    pip install python-simple-hipchat

Instantiate::

    import hipchat
    hipster = hipchat.HipChat(token=YourHipChatToken)

Request a URI endpoint as described in the HipChat API docs::

    hipster.method(url='method/url/', method="GET/POST", parameters={'name':'value', })

Example::

    # List rooms
    hipster.method('rooms/list')

    # Post a message to a HipChat room
    hipster.method('rooms/message', method='POST', parameters={'room_id': 8675309, 'from': 'HAL', 'message': 'All your base...'})


API Sugar
---------

To send a message to a room, either a Notification or Admin token can be used. All other methods require an Admin token. See `HipChat's auth docs <https://www.hipchat.com/docs/api/auth>`_ for more information.

**Send a message to a room**::

    room_id = 8675309
    from_name = 'HAL'
    message = 'All your base...'

    hipster.message_room(room_id, from_name, message)

    # per HipChat, color can be "yellow", "red", "green", "purple", "gray", or "random"
    message_color = 'gray'
    hipster.message_room(room_id, from_name, message, color=message_color)

    # notify users in the room
    message_color = 'red'
    hipster.message_room(room_id, from_name, message, color=message_color, notify=True)

**List rooms**::

    hipster.list_rooms()

**Find room by name**::

    room = hipster.find_room('Room Name')
    print "Room Name has room id = %s" % (room['room_id'])

**List users**::

    hipster.list_users()

**Find user by name**::

    user = hipster.find_user('Raleigh Becket')
    print "Raleigh Becket's status is = %s" % (user['status'])



Changelog
---------

**v0.4.x**

- `Added shortcut method for single room info <https://github.com/kurttheviking/simple-hipchat-py/pull/16>`_ (thanks @claudyus)
- Renamed GitHub repo

**v0.3.x**

- Added shortcut method for listing users (thanks @Raizex)
- Added shortcut method for finding user by name (thanks @Raizex)
- Added shortcut method for finding room by name (thanks @Raizex)
- `Added trove classifiers <https://pypi.python.org/pypi?%3Aaction=list_classifiers>`_ (thanks @ghickman)

**v0.2.x**

- `Added Python 3 support without losing support for Python 2 <https://github.com/kurttheviking/python-simple-hipchat/pull/9>`_ (thanks @pimterry)
- `Expose timeout for safer synchronous use <https://github.com/kurttheviking/python-simple-hipchat/pull/3>`_ (thanks @zachsnow)

**v0.1.x**

- Added shortcut method for messaging a room
- Added shortcut method for listing rooms
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kurttheviking/simple-hipchat-py",
    "name": "python-simple-hipchat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Kurt Ericson",
    "author_email": "kurttheviking@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/42/54/c3394b66695be719ee5890be3205060c701f94bf76da9937d622929b5e9e/python-simple-hipchat-0.4.0.tar.gz",
    "platform": "UNKNOWN",
    "description": "Python Client for HipChat v1\n============================\n\nDescription\n-----------\n\nEasy peasy wrapper for the `HipChat API v1 <https://www.hipchat.com/docs/api>`_. Exposes core URI endpoint wrapper and some basic methods for common integrations.\n\n\nDependencies\n------------\nNone beyond the Python standard library.\n\n\nUsage\n-----\n\nInstall::\n\n    pip install python-simple-hipchat\n\nInstantiate::\n\n    import hipchat\n    hipster = hipchat.HipChat(token=YourHipChatToken)\n\nRequest a URI endpoint as described in the HipChat API docs::\n\n    hipster.method(url='method/url/', method=\"GET/POST\", parameters={'name':'value', })\n\nExample::\n\n    # List rooms\n    hipster.method('rooms/list')\n\n    # Post a message to a HipChat room\n    hipster.method('rooms/message', method='POST', parameters={'room_id': 8675309, 'from': 'HAL', 'message': 'All your base...'})\n\n\nAPI Sugar\n---------\n\nTo send a message to a room, either a Notification or Admin token can be used. All other methods require an Admin token. See `HipChat's auth docs <https://www.hipchat.com/docs/api/auth>`_ for more information.\n\n**Send a message to a room**::\n\n    room_id = 8675309\n    from_name = 'HAL'\n    message = 'All your base...'\n\n    hipster.message_room(room_id, from_name, message)\n\n    # per HipChat, color can be \"yellow\", \"red\", \"green\", \"purple\", \"gray\", or \"random\"\n    message_color = 'gray'\n    hipster.message_room(room_id, from_name, message, color=message_color)\n\n    # notify users in the room\n    message_color = 'red'\n    hipster.message_room(room_id, from_name, message, color=message_color, notify=True)\n\n**List rooms**::\n\n    hipster.list_rooms()\n\n**Find room by name**::\n\n    room = hipster.find_room('Room Name')\n    print \"Room Name has room id = %s\" % (room['room_id'])\n\n**List users**::\n\n    hipster.list_users()\n\n**Find user by name**::\n\n    user = hipster.find_user('Raleigh Becket')\n    print \"Raleigh Becket's status is = %s\" % (user['status'])\n\n\n\nChangelog\n---------\n\n**v0.4.x**\n\n- `Added shortcut method for single room info <https://github.com/kurttheviking/simple-hipchat-py/pull/16>`_ (thanks @claudyus)\n- Renamed GitHub repo\n\n**v0.3.x**\n\n- Added shortcut method for listing users (thanks @Raizex)\n- Added shortcut method for finding user by name (thanks @Raizex)\n- Added shortcut method for finding room by name (thanks @Raizex)\n- `Added trove classifiers <https://pypi.python.org/pypi?%3Aaction=list_classifiers>`_ (thanks @ghickman)\n\n**v0.2.x**\n\n- `Added Python 3 support without losing support for Python 2 <https://github.com/kurttheviking/python-simple-hipchat/pull/9>`_ (thanks @pimterry)\n- `Expose timeout for safer synchronous use <https://github.com/kurttheviking/python-simple-hipchat/pull/3>`_ (thanks @zachsnow)\n\n**v0.1.x**\n\n- Added shortcut method for messaging a room\n- Added shortcut method for listing rooms",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy peasy wrapper for HipChat's v1 API",
    "version": "0.4.0",
    "project_urls": {
        "Download": "UNKNOWN",
        "Homepage": "https://github.com/kurttheviking/simple-hipchat-py"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4254c3394b66695be719ee5890be3205060c701f94bf76da9937d622929b5e9e",
                "md5": "d7c7b745de34b1ee9228d1bbe85b7ec6",
                "sha256": "5bbd1c749420ac84f762ceb9eee0373320491244cfbd5e3b6152162473bec67f"
            },
            "downloads": -1,
            "filename": "python-simple-hipchat-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7c7b745de34b1ee9228d1bbe85b7ec6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4009,
            "upload_time": "2015-11-09T16:55:58",
            "upload_time_iso_8601": "2015-11-09T16:55:58.457848Z",
            "url": "https://files.pythonhosted.org/packages/42/54/c3394b66695be719ee5890be3205060c701f94bf76da9937d622929b5e9e/python-simple-hipchat-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2015-11-09 16:55:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kurttheviking",
    "github_project": "simple-hipchat-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "python-simple-hipchat"
}
        
Elapsed time: 2.90330s