From 56e5bce1734d394e26c575e7042914ba5c4668e0 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 4 Dec 2013 13:29:19 -0500 Subject: [PATCH] Fix bugs in our API endpoint documentation. * The "message" event type was incorrectly listed as "messages". * The curl docs incorrectly used GET for the register API call. * Fix missing \ in GET events documentation. * We didn't have proper JSON format for the "message" argument. (imported from commit f00e2f187375d24f8be4b8075b7cd7a38584fe01) --- templates/zerver/api_content.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/zerver/api_content.json b/templates/zerver/api_content.json index 506a181311..fce173c8b3 100644 --- a/templates/zerver/api_content.json +++ b/templates/zerver/api_content.json @@ -49,7 +49,7 @@ "arguments": [ [ "event_types", - "(optional) An array indicating which types of events you're interested in. Values that you might find useful include: \n If you do not specify this argument, you will receive all events, and have to filter out the events not relevant to your client in your client code. For most applications, one is only interested in messages, so one specifies: event_types=['messages']" + "(optional) An array indicating which types of events you're interested in. Values that you might find useful include: \n If you do not specify this argument, you will receive all events, and have to filter out the events not relevant to your client in your client code. For most applications, one is only interested in messages, so one specifies: event_types=['message']" ], [ "apply_markdown", @@ -58,7 +58,7 @@ ], "example_request": { "python": "
client.register()\n
", - "curl": "
curl -G https://api.zulip.com/v1/register \\\n -u othello-bot@example.com:a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \\\n -d \"event_types=['messages']\"\n
" + "curl": "
curl https://api.zulip.com/v1/register \\\n -u othello-bot@example.com:a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \\\n -d 'event_types=[\"message\"]'\n
" } }, { @@ -140,7 +140,7 @@ ], "example_request": { "python": "
client.get_events()\n
or if you want the event queues managed for you,
client.call_on_each_event()\n
", - "curl": "
curl -G https://api.zulip.com/v1/events \\\n -u othello-bot@example.com:a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \\\n -d \"queue_id=1375801870:2942\"\n -d \"last_event_id=-1\"\n
" + "curl": "
curl -G https://api.zulip.com/v1/events \\\n -u othello-bot@example.com:a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \\\n -d \"queue_id=1375801870:2942\" \\\n -d \"last_event_id=-1\"\n
" } } ]