Buckitup-chat / chat

Web app of chat. It would be integrated into Nerves to be served on Raspberry Pi
GNU General Public License v3.0
5 stars 3 forks source link

Python SDK #239

Open sergey-lukianov opened 1 year ago

sergey-lukianov commented 1 year ago

We have a GraphQL API. And now we need to provide python SDK to speed up sensor part development.

Sensor is a client of API. Its main purpose to store text and image message in a room. Room keypair is required to write in a room.

On deploy Sensor should get registered and save its keypair for future usage.

When sensor is triggered, it receives room_pub_key and user_pub_key.

Chat with user (identified by user_pub_key) contains a message with a room keypair. It needs to be read and saved for future.

The data that sensor have received should be written into a room (identified by room_pub_key). Room keypair is needed to do so. File(image) uploading process has extra requirements, which are described in https://github.com/Buckitup-chat/chat/blob/main/lib/naive_api/upload_files.livemd

As a result we should have SDK to cover this functionality.

API docs can be accessed by clicking Docs at https://offline-chat.gigalixirapp.com/naive_api_console API should use base_url/naive_api endpoint

Extra info can be found in #132

sergey-lukianov commented 1 year ago

https://graphql.org/code/#python-client for client options