Skip to main content

Package for HipChat's v2 API

Project description

A Python package for HipChat’s v2 JSON REST API. It’s based on v2’s navigability and self-declaration.

Concepts

There are two basic types in HypChat: Linker and RestObject. They are not meant to be instantiated directly but instead created as references from other objects.

Linker

A simple callable that represents an unfollowed reference.

l.url

The URL this object points to

l()

Calling a Linker will perform the request and return a RestObject

RestObject

A subclass of dict, contains additional functionality for links and actions.

Other Actions

Many of the v2 types define additional types, eg Rooms have methods for messaging, setting the topic, getting the history, and inviting users to the room. These are implemented as methods of subclasses. The complete listing is in the Type List.

Usage

First, create a HypChat object with the token

hc = HypChat("mytoken")

There are several root links:

rooms = hc.rooms()
users = hc.users()
emots = hc.emoticons()
caps = hc.capabilities()

In addition, the HypChat object has methods for creating objects and directly referencing the basic types.

Console

If you call python -m hypchat, a interactive prompt (using IPython if available) will appear. The environment will contain hipchat, an instance of the HypChat object. The token is pulled from ~/.hypchat, /etc/hypchat, or the environment variable HIPCHAT_TOKEN.

Type List

See TYPES.rst

TODO List

  • Proper Datetime and Timezone (dateutils) support

  • API Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hypchat-0.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hypchat-0.1.linux-x86_64.tar.gz (20.6 kB view details)

Uploaded Source

File details

Details for the file hypchat-0.1.tar.gz.

File metadata

  • Download URL: hypchat-0.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hypchat-0.1.tar.gz
Algorithm Hash digest
SHA256 7b6577c9582e4e2790eb3cee4aaabb3eda9e83eb467552a56df0fb8cbf6f8292
MD5 7c54d392d36950cf3ee840d429bc33c9
BLAKE2b-256 10d689407e4e140448ae5e8b5046f4893992fd4d6cf7c045fc2e043df9a6bf9b

See more details on using hashes here.

File details

Details for the file hypchat-0.1.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for hypchat-0.1.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 c570a9e4e4fc73807b0a38410568b9e2892dc4dd044d56e7d996205e2a1badcf
MD5 d234dd12035e6527684b2ee97dcd49a0
BLAKE2b-256 b33d077bc2a6ad21bb5fb5c0ea67646f4f6268284d1a80dd1b264499664dabce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page