philippbosch / python-whereby-api

Wrapper for the Whereby HTTP API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whereby API Client for Python

This is a tiny wrapper around Whereby's HTTP API.

PyPI version

Installation

$ pip install whereby_api

API reference

class whereby_api.WherebyClient(api_key)

Parameters

  • api_key – the API key you received from Whereby (string)

Usage

from whereby_api import WherebyClient
whereby = WherebyClient(api_key='<your api key>')

Methods

  • create_meeting(start_date, end_date, is_locked=False, room_name_prefix=None, room_mode='normal', fields=[])

    Create a new meeting

    Parameters

    • start_date – When the meeting starts (required, either a datetime object or an ISO 8601 string)
    • end_date – When the meeting ends (required, either a datetime object or an ISO 8601 string)
    • is_locked – The initial lock state of the room (boolean)
    • room_name_prefix – The prefix for the room name. (string)
    • room_mode – The mode of the created room. (string – normal or group)
    • fields – Additional fields that should be populated. (list of strings, currently the only option is 'hostRoomUrl')

    Please refer to the official documentation for details.

    Return type

    whereby_api.Meeting instance

    Usage

    from datetime import datetime, timedelta
    meeting = whereby.create_meeting(
      start_date=datetime.now(),
      end_date=datetime.now() + timedelta(days=2),
      fields=['hostRoomUrl'],
    )
  • delete_meeting(meeting_id)

    Delete an existing meeting

    Parameters

    • meeting_id – the ID of the meeting (required, string)

    Please refer to the official documentation for details.

    Usage

    whereby.delete_meeting(meeting_id='123456')
  • get_meeting(meeting_id)

    Get details about an existing meeting

    Parameters

    • meeting_id – the ID of the meeting (required, string)

    Please refer to the official documentation for details.

    Return type

    whereby_api.Meeting instance

    Usage

    meeting = whereby.get_meeting(meeting_id='123456')

class whereby_api.Meeting(meeting_id, room_url, start_date, end_date, host_room_url)

Represents a meeting

Properties

  • meeting_id – The ID of the meeting. (string)
  • room_url – The URL to room where the meeting will be hosted. (string)
  • start_date – When the meeting starts. (datetime)
  • end_date – When the meeting ends. (datetime)
  • host_room_url – The URL to room where the meeting will be hosted which will also make the user the host of the meeting. (string)

Please refer to the official documentation for details.

About

Wrapper for the Whereby HTTP API

License:MIT License


Languages

Language:Python 100.0%