Skip to content

pysogs zmq bot api #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

majestrate
Copy link
Contributor

bot api for sogs

@majestrate majestrate requested a review from jagerman November 22, 2021 16:39
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch 3 times, most recently from d1ccb04 to 650ded2 Compare November 29, 2021 16:42
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch from 85a40d6 to cf7e5a6 Compare December 1, 2021 21:31
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch 6 times, most recently from 6ae6d25 to 83464c5 Compare December 9, 2021 19:59
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch 2 times, most recently from e916894 to d5a8aa8 Compare December 17, 2021 19:13
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch from d5a8aa8 to 5000f8f Compare January 17, 2022 15:39
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch 3 times, most recently from 37dadd1 to 97a093d Compare January 27, 2022 14:31
@majestrate majestrate marked this pull request as ready for review January 27, 2022 14:37
@dillfrescott
Copy link

I will be able to send messages via curl with this right?

@majestrate
Copy link
Contributor Author

I will be able to send messages via curl with this right?

no, you can do that already using the non legacy http endpoints. this PR is for using zmq.

@majestrate
Copy link
Contributor Author

the current planned http endpoints are defined here: https://github.com/oxen-io/session-pysogs/blob/dev/api.yaml
some are implemented, most are not. if you want to help implement some of the endpoints that'd be useful.

@jagerman
Copy link
Member

some are implemented, most are not.

Actually almost all are implemented now with the recent PRs; I think the only one left is file downloading, which I'll be tackling tomorrow.

@dillfrescott
Copy link

Awesome! I'm really naive when it comes to api stuff but I find it very interesting.

@dillfrescott
Copy link

I just want to be able to send a message via curl lol

@jagerman
Copy link
Member

Curl likely won't ever be possible (by itself) because you have to be able to compute blake2b hashes to sign your request header with your session ID. So a few lines of Python, sure, but it needs a bit more than a static HTTP request.

@dillfrescott
Copy link

Oh. Could you take a look at this service https://github.com/caronc/apprise/wiki#notification-services and let me know if it would be possible to use it to send a message to my open group?

@majestrate
Copy link
Contributor Author

Oh. Could you take a look at this service https://github.com/caronc/apprise/wiki#notification-services and let me know if it would be possible to use it to send a message to my open group?

make an issue for this so it is tracked. thanks.

majestrate and others added 7 commits February 28, 2022 09:21
* wire up event subscription via zmq to notify connections of new events
* add zmq handler to inject http rpc calls via zmq authenticated by zmq curve pubkey
if data is a string or bytes dont try to bencode the repsonse
Co-authored-by: Jason Rhinelander <[email protected]>
Co-authored-by: Jason Rhinelander <[email protected]>
@majestrate majestrate force-pushed the pysogs-bot-api-2021-11-22 branch from 64ffc81 to 1dfdec1 Compare February 28, 2022 14:25
@majestrate
Copy link
Contributor Author

dont use assert, throw

Why?

it is an exceptional case and should not just be an assert so that i can happen on release mode too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants