"an array (possibly zero-length if dont_block is set) of messages with IDs newer than `last_message`"
]
],
"call":"Poll for new messages",
"arguments":[
[
"last",
"(optional) Indicates the highest message ID that the client is not interested in. They are implicitly interested in all messages with ids higher than this. If the `last` argument is not present, the server assumes a value equal to the highest existing message ID."
],
[
"dont_block",
"set to \u201ctrue\u201d if the client is requesting a nonblocking reply"
"In the case of a stream message, a string identifying the stream. In the case of a private message, a JSON-encoded list containing the usernames of the recipients."
],
[
"subject",
"The subject for the message (Only required if type is \u201cstream\u201d)"
]
],
"example_request":{
"python":"<div class=\"codehilite\"><pre>\n<span class=\"n\">client</span><span class=\"o\">.</span><span class=\"n\">send_message</span><span class=\"p\">({</span>\n <span class=\"s\">\"type\"</span><span class=\"p\">:</span> <span class=\"s\">\"private\"</span><span class=\"p\">,</span>\n <span class=\"s\">\"to\"</span><span class=\"p\">:</span> <span class=\"s\">\"wdaher@humbughq.com\"</span><span class=\"p\">,</span>\n <span class=\"s\">\"content\"</span><span class=\"p\">:</span> <span class=\"s\">\"I come not, friends, to steal away your hearts.\"</span>\n<span class=\"p\">}</span>)</span>\n<span class=\"n\">client</span><span class=\"o\">.</span><span class=\"n\">send_message</span><span class=\"p\">(</span><span class=\"n\"><span class=\"p\">{</span>\n <span class=\"s\">\"type\"</span><span class=\"p\">:</span> <span class=\"s\">\"stream\"</span><span class=\"p\">,</span>\n <span class=\"s\">\"to\"</span><span class=\"p\">:</span> <span class=\"s\">\"Denmark\"</span><span class=\"p\">,</span>\n <span class=\"s\">\"subject\"</span><span class=\"p\">:</span> <span class=\"s\">\"Castle\"</span><span class=\"p\">,</span>\n <span class=\"s\">\"content\"</span><span class=\"p\">:</span> <span class=\"s\">\"Something is rotten in the state of Denmark.\"</span>\n<span class=\"p\">}</span></span><span class=\"p\">)</span>\n</pre></div>\n",
"curl":"<h5>Stream message</h5>\n<div class=\"codehilite\"><pre>curl https://humbughq.com/api/v1/messages <span class=\"se\">\\</span>\n -u YOUR_EMAIL:YOUR_API_KEY <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"type=stream\"</span> <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"to=Denmark\"</span> <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"subject=Castle\"</span> <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"content=Something is rotten in the state of Denmark.\"</span>\n</pre></div>\n<h5>Private message</h5>\n<div class=\"codehilite\"><pre>curl https://humbughq.com/api/v1/messages <span class=\"se\">\\</span>\n -u YOUR_EMAIL:YOUR_API_KEY <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"type=private\"</span> <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"to=wdaher@humbughq.com\"</span> <span class=\"se\">\\</span>\n -d <span class=\"s2\">\"content=I come not, friends, to steal away your hearts.\"</span>\n</pre></div>",
"commandline":"<h4>Stream message</h4>\n<div class=\"codehilite\"><pre>humbug-send --stream Denmark --subject Castle</pre></div>\n<h4>Private message</h4>\n<div class=\"codehilite\"><pre>humbug-send wdaher@humbughq.com\n</pre></div>\n<h4>Passing in the message on the command-line</h4>\n<p>If you'd like, you can also provide the message on the command-line with the <code>-m</code> flag, as follows:</p>\n<div class=\"codehilite\"><pre>humbug-send --stream Denmark --subject Castle -m <span class=\"s2\">\"Something is rotten in the state of Denmark.\"</span>\n</pre></div>"