Commit Graph

10 Commits

Author SHA1 Message Date
Eeshan Garg ba98451928 api/stream-message: Recommend using zuliprc.
Recommend using a zuliprc file instead of hardcoding the API
credentials in a config object.
2018-01-17 09:27:35 -05:00
Eeshan Garg 479bc41ca5 api docs: Remove old and outdated endpoint docs. 2018-01-04 10:17:29 -05:00
Eeshan Garg d235a6c0c4 api docs: Remove superfluous sys imports in Python examples.
These are remnants from old code examples that I forgot to
remove.
2018-01-04 10:17:29 -05:00
Eeshan Garg c616d7869b api docs: Recommend using zuliprc file for configuration.
In our code examples, we now recommend using a zuliprc file
instead of passing in the config info directly.
2018-01-04 10:17:29 -05:00
Eeshan Garg 3003d3d927 api examples: Change required JS module from `zulip` to `zulip-js`.
The JS module we ask our users to install in the installation
instructions is zulip-js, not zulip. These examples would fail
with the latter. This commit updates the examples to use the
name zulip-js.
2017-12-29 17:03:36 -05:00
Eeshan Garg 89f622937d api docs: Generate Arguments table from JSON.
This commit does the following:
* Move the Arguments table data from stream-message.md and
  private-message.md to a JSON file.
* Add a Markdown extension that allows one to include and render
  a table from a JSON file like so:
    {generate_arguments_table|arguments.json|private-stream.md}
* Use Bootstrap's .table class to format the table instead of
  relying on custom CSS.
2017-12-29 17:03:36 -05:00
Eeshan Garg 229cdfce90 markdown: Add a macro for invalid API key JSON response.
The JSON response for when an invalid API key is used to initiate
an API call seems to be identical in every case, so this macro
can be reused all the time.
2017-12-29 17:03:36 -05:00
Eeshan Garg 3a90a6be5e markdown: Add macro for successful send message JSON response.
The JSON response for when an API call to send a message is
successful is the same for both private and stream messages, so
these macros may be used again.
2017-12-29 17:03:36 -05:00
Eeshan Garg cdcaf1374e api/stream-message: Document arguments and examples responses.
This commit adds the following:

* A table specifying the arguments that are required for this API
  call.
* Examples of JSON responses.

This will help us in obsoleting api_endpoints.html.
2017-12-29 17:03:36 -05:00
Eeshan Garg 94bc9d52d1 api docs: Split usage.md into two separate docs.
This commit splits usage.md into two separate docs,
stream-message.md and private-message.md. The arguments and return
values for sending a stream message are somewhat different from
those of sending a private message, so it made sense to split the
two up for clarity.
2017-12-29 17:03:36 -05:00