Git Product home page Git Product logo

nim_api_python's Introduction

NIM_API_Python

网易云信服务端API封装(python)

Installation

The production way

pip install NIM-API-Python

The developer way

git clone https://github.com/jsli/NIM_API_Python.git
cd NIM_API_Python
git checkout -b develop origin/develop
python setup.py install

Compatability

NIM-API-Python has been tested for Python 2.6, 3.2, 3.3, 3.4, and pypy using Travis CI

Example Usage

Create the client

from im import ImClient

client = ImClient('API_KEY', 'API_SECRET')
client.user.create(...)

Using with a manage context

with ZoomClient('API_KEY', 'API_SECRET') as client:
    client.user.create(...)
    ...

Available methods

具体参数请参考:网易云信 服务端API文档

user

  • client.user.create(...)
  • client.user.update(...)
  • client.user.refresh_token(...)
  • client.user.block(...)
  • client.user.unblock(...)
  • client.user.update_info(...)
  • client.user.get_info(...)
  • client.user.set_donnop(...)
  • client.user.set_special_relation(...)
  • client.user.list_black_and_mute(...)

team

  • client.team.create(...)
  • client.team.add(...)
  • client.team.kick(...)
  • client.team.remove(...)
  • client.team.update(...)
  • client.team.query(...)
  • client.team.query_detail(...)
  • client.team.get_mark_read_info(...)
  • client.team.change_owner(...)
  • client.team.add_manager(...)
  • client.team.remove_manager(...)
  • client.team.join_teams(...)
  • client.team.update_team_nick(...)
  • client.team.mute_team(...)
  • client.team.mute_tlist(...)
  • client.team.leave(...)
  • client.team.mute_tlist_all(...)
  • client.team.list_team_mute(...)

message

  • client.message.send_msg(...)
  • client.message.send_batch_msg(...)
  • client.message.send_attach_msg(...)
  • client.message.send_batch_attach_msg(...)
  • client.message.upload(...)
  • client.message.upload_file(...)
  • client.message.recall(...)
  • client.message.broadcast_msg(...)

history

  • client.history.query_session_msg(...)
  • client.history.query_team_msg(...)
  • client.history.query_chatroom_msg(...)
  • client.history.query_user_events(...)
  • client.history.delete_media_file(...)
  • client.history.query_broadcast_msg(...)
  • client.history.query_broadcast_msg_by_id(...)

friend

  • client.friend.add(...)
  • client.friend.update(...)
  • client.friend.delete(...)
  • client.friend.get(...)

event

  • client.event.subscribe_add(...)
  • client.event.subscribe_delete(...)
  • client.event.subscribe_batch_delete(...)
  • client.event.subscribe_query(...)

chatroom

  • client.chatroom.create(...)
  • client.chatroom.get(...)
  • client.chatroom.get_batch(...)
  • client.chatroom.update(...)
  • client.chatroom.toggle_close_stat(...)
  • client.chatroom.set_member_role(...)
  • client.chatroom.update_my_room_role(...)
  • client.chatroom.request_addr(...)
  • client.chatroom.send_msg(...)
  • client.chatroom.add_robot(...)
  • client.chatroom.remove_robot(...)
  • client.chatroom.temporary_mute(...)
  • client.chatroom.queue_offer(...)
  • client.chatroom.queue_poll(...)
  • client.chatroom.queue_drop(...)
  • client.chatroom.queue_init(...)
  • client.chatroom.mute_room(...)
  • client.chatroom.topn(...)
  • client.chatroom.members_by_page(...)
  • client.chatroom.query_members(...)
  • client.chatroom.delete_history_msg(...)

Running the Tests

Simple

First, make sure to install the testing requirements

pip install -r requirements-tests.txt

Then run the tests via nose

nosetests -v -s

nim_api_python's People

Contributors

jsli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

90h lpcheng1208

nim_api_python's Issues

版本兼容更新

image

请求删除NIM_API_Python/netease_im/components/message.py 上图片的print 无实际作用但是在python3.6却无法使用

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.