Skip to content
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

docs: Add documentation for outgoing webhooks. #9462

Closed
wants to merge 1 commit into from

Conversation

rheaparekh
Copy link
Collaborator

Resurrecting outgoing webhooks documentation from PR #5872, as the code has been merged but the documentation hasn't.

Copy link
Contributor

@neiljp neiljp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be mostly from the other PR, but I made some comments on some minor points.

@@ -0,0 +1,114 @@
# Outgoing Webhooks

Outgoing webhooks are a type of integration where the Zulip server sends HTTP POST requests to a third party URL.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this is currently POST requests, but need it be limited to this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outgoing webhooks are meant for POST requests only majorly (even Slack, Mattermost supports only POST requests).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a tiny point, I just wondered if it need be limited to POST, eg. if a different interface was written, and whether it could more broadly be "sends HTTP requests to a third party URL."

## Interfaces
These are classes which customise the data to be posted to base URL of outgoing webhooks. These also provide
methods to prepare data to be posted and help parse the response from the URL and generate the response
to be sent to the user. For specialised purpose, user can create his own interface, else he can use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a long sentence - perhaps use more commas? ("These also provide..." sentence)

In the next sentence, you could use "they" rather than "he" to stay neutral, as per the rest of the document ("user", "you").

These are classes which customise the data to be posted to base URL of outgoing webhooks. These also provide
methods to prepare data to be posted and help parse the response from the URL and generate the response
to be sent to the user. For specialised purpose, user can create his own interface, else he can use
the above interfaces supported by zulip.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be "following", rather than "above"?


* **Generic**

It is useful for general purpose webhooks. It can also be used for zulip bot server. It posts the the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeated "the" on this line :)

@rheaparekh
Copy link
Collaborator Author

@neiljp Yes, this was majorly to resurrect the other PR as it was closed without the outgoing webhooks documentation being merged. I have updated the PR with the suggested changes!

@neiljp
Copy link
Contributor

neiljp commented May 21, 2018

Not sure why the circleCI didn't run to completion - I had a look before and it doesn't seem related?

@timabbott
Copy link
Sponsor Member

These docs should move to templates/zerver/api and go in the "Interactive bots" section. Also, they're pretty rough and had too little detail on some things (like what it's for) and too much on others (like how to add another interface, which we may never do and doesn't feel hard anyway).

Merged as cc0d0b5 after making those changes.

I think there's more work to be done on this (e.g. just reading the request/reply section, it's pretty unclear how this works, and I'm not sure whether the API is even correct anyway).

Thanks for all your work on this @rheaparekh!

@eeshangarg FYI -- can you work on making the Zulip message format section show a nice JSON format thing like we do in our other API docs? Seems like this would be fastest for you.
@roberthoenig FYI; we'll want to update the list of what's in an Zulip message when we're done with your data synchronization project.

@timabbott timabbott closed this May 25, 2018
eeshangarg added a commit to eeshangarg/zulip that referenced this pull request Jun 1, 2018
@rheaparekh rheaparekh deleted the webhooks_doc branch August 13, 2018 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants