Skip to content

Python wrapper for the Mahjong Soul (Majsoul) Protobuf objects. It allows to use their API.

Notifications You must be signed in to change notification settings

MahjongRepository/mahjong_soul_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The idea of repository based on https://github.com/chaserhkj/PyMajSoul/

Python wrappers for Majsoul allow you to interact with their servers from Python scripts.

For User

  1. Install python packages from requirements.txt
  2. python example.py -u username -p password

This example is working only with Python3.7+.

Also, you need to have an account fron CN server to run this example, because only accounts from CN server has the ability to login with login and password.

If you want to login to EN or JP servers you need to write your code to authenticate via email code or social network. Protobuf wrapper from this repository contains all needed API objects for that.

For Developer

Requirements

  1. Install python packages from requerements.txt
  2. Install protobuf compiler sudo apt install protobuf-compiler

How to update protocol files to the new version

It was tested on Ubuntu.

  1. Download the new liqi.json file (find it in the network tab of your browser) and put it to ms/liqi.json
  2. python generate_proto_file.py
  3. protoc --python_out=plugins=grpc:. protocol.proto
  4. chmod +x ms-plugin.py
  5. sudo cp ms-plugin.py /usr/bin/ms-plugin.py
  6. protoc --custom_out=. --plugin=protoc-gen-custom=ms-plugin.py ./protocol.proto

About

Python wrapper for the Mahjong Soul (Majsoul) Protobuf objects. It allows to use their API.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages