Code Monkey home page Code Monkey logo

clubhouse-py's Introduction

Clubhouse API for python

FOR REFERENCE AND EDUCATION PURPOSES ONLY. DOES NOT PROVIDE ANY KINDS OF WARRANTY.

clubhouse-py is originally developed for the sake of interoperability.

Currently, audio-related features (agora.io / pubnub) are not yet implemented.

Please note that you may get a permanent ban for sending invalid API requests. Server's ratelimit and security mechanisms are quite strict.

Voice Communication

The following sample code can be used for the voice communication while being in the channel.

import agorartc
import time

# Token
rtc = agorartc.createRtcEngineBridge()
eventHandler = agorartc.RtcEngineEventHandlerBase()
rtc.initEventHandler(eventHandler)
rtc.initialize("938de3e8055e42b281bb8c6f69c21f78", None, agorartc.AREA_CODE_GLOB & 0xFFFFFFFF)

# Gather `channel_name`, `token`, `user_id` from join_channel API
token = ""
channel_name = "A123B456"
user_id = 1234123400
rtc.joinChannel(token, channel_name, "", my_user_id)
# This will enable voice chat.
input("Press [enter] to quit voice chat.")
rtc.leaveChannel()

This code seems to work very reliably on Windows, however it does not seem to be pretty stable in OSX (as of 2021/Feb/15)

For detailed information, Please refer to agora.io's official Python SDK.

Supported features

Pre-authentication

  • def start_phone_number_auth(self, phone_number):
  • def complete_phone_number_auth(self, phone_number, verification_code):

Post-authentication

  • def check_for_update(self, is_testflight=False):
  • def add_email(self, email):
  • def update_photo(self, photo_filename):
  • def unfollow(self, user_id):
  • def follow(self, user_id, user_ids=None, source=4, source_topic_id=None):
  • def follow_club(self, club_id, source_topic_id=None):
  • def unfollow_club(self, club_id, source_topic_id=None):
  • def update_follow_notifications(self, user_id, notification_type=2):
  • def get_suggested_follows_similar(self, user_id):
  • def get_suggested_follows_friends_only(self, club_id=None, upload_contacts=True, contacts=()):
  • def get_suggested_follows_all(self, in_onboarding=True, page_size=50, page=1):
  • def get_events(self, is_filtered=True, page_size=25, page=1):
  • def get_club(self, club_id, source_topic_id=None):
  • def get_club_members(self, club_id, return_followers=False, return_members=True, page_size=50, page=1):
  • def get_settings(self):
  • def get_welcome_channel(self):
  • def join_channel(self, channel, attribution_source="feed"):
  • def leave_channel(self, channel):
  • def get_profile(self, user_id):
  • def get_profile_self(self, return_blocked_ids=False, timezone_identifier="Asia/Tokyo", return_following_ids=False):
  • def get_following(self, user_id):
  • def get_all_topics(self):
  • def get_channels(self):
  • def active_ping(self, channel):
  • def audience_reply(self, channel, raise_hands=True, unraise_hands=False):
  • def update_skintone(self, skintone=1):
  • def get_notifications(self, page_size=20, page=1):
  • def get_actionable_notifications(self):
  • def get_online_friends(self):
  • def accept_speaker_invite(self, channel, user_id):
  • def get_suggested_speakers(self, channel):
  • def create_channel(self, topic="", user_ids=(), is_private=False, is_social_mode=False):
  • def get_create_channel_targets(self):
  • def get_suggested_invites(self, club_id=None, upload_contacts=True, contacts=()):
  • def get_suggested_club_invites(self, upload_contacts=True, contacts=()):
  • def invite_to_app(self, name, phone_number, message=None):
  • def invite_from_waitlist(self, user_id):
  • def search_users(self, query, followers_only=False, following_only=False, cofollows_only=False):
  • def search_clubs(self, query, followers_only=False, following_only=False, cofollows_only=False):
  • def get_clubs_for_topic(self, topic_id, page_size=25, page=1):
  • def get_users_for_topic(self, topic_id, page_size=25, page=1):
  • def invite_to_existing_channel(self, channel, user_id):
  • def update_username(self, username):
  • def refresh_token(self, refresh_token):

Reference

You may also add more endpoints and features based on the following repositories.

Please note that these repositories were not used to develop this repository.

Most of things were tested and handcrafted from scratch.

clubhouse-py's People

Contributors

stypr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.