Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote-tracking branch 'origin/master' into messages-documentat…

…ion-for-list
  • Loading branch information...
commit 1166f1f3088681a4a105f28a5162b163ffa65802 2 parents c80fd3c + 8e91c18
@livedo livedo authored
View
10 docs/Chat.md
@@ -20,13 +20,17 @@ Example value: cool,stuff
```
{
- content: "Howdy-Doo @Jackie #awesome",
- external_user_name: "Stevie",
- tags: ["todo", "#feedback", "@all"]
+ "content": "Howdy-Doo @Jackie #awesome",
+ "external_user_name": "Stevie",
+ "tags": ["todo", "#feedback", "@all"]
}
```
## Response
```
+HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
{}
```
View
25 docs/Errors.md
@@ -1,25 +0,0 @@
-Flowdock APIs return errors in JSON format with message and detailed information about the errors.
-
-Example:
-
-```
-// POST https://api.flowdock.com/v1/messages/chat/_YOUR_API_TOKEN_HERE_
-{
- "external_user_name": "foobar",
- "content": ""
-}
-
-```
-
-Response:
-
-```
-// Status: 400
-// Content-Type: application/json; charset=utf-8
-{
- "message": "Validation error",
- "errors": {
- "content": ["can't be blank"]
- }
-}
-```
View
14 docs/Flows.md
@@ -4,7 +4,7 @@ A flow in Flowdock is like one single team workspace, which contains a chat room
In the REST API, Flow IDs are of the form `:organization/:flow`.
-* `organization` is the parametric name of the client organization, as seen in the subdomain of the web URL of the flow.
+* `organization` is the parametric name of the client organization, as seen in the subdomain of the web URL of the flow.
* `flow` is the parametric name of the flow, as seen in the path of the web URL of the flow. Eg. `https://:organization.flowdock.com/flows/:flow`
## List Flows
@@ -20,6 +20,10 @@ GET /flows
### Response
```
+HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
[
{
"id": "acme/my-flow",
@@ -56,6 +60,10 @@ Get a single flow. Single flow information always includes user list of flow. Ot
### Response
```
+HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
{
"id": "acme/my-flow",
"name": "My flow",
@@ -69,7 +77,9 @@ Get a single flow. Single flow information always includes user list of flow. Ot
"nick": "Joe",
"name": "Joe Smith",
"email": "joe@example.com",
+ "avatar": "/avatars/f5b8fb60c6116331da07c65b96a8a1d1/",
"status": "Testing API",
+ "disabled": false,
"last_activity": 1328016726423000,
"last_ping": 1328017690004000
},
@@ -78,7 +88,9 @@ Get a single flow. Single flow information always includes user list of flow. Ot
"nick": "Stevie",
"name": "Stevie Johnson",
"email": "stevie@example.com",
+ "avatar": "/avatars/5bdd089a099acc56fc7120f6325a5d5c/",
"status": null,
+ "disabled": true,
"last_activity": 1328016712345000,
"last_ping": 1328017612345000
}
View
41 docs/General-information.md
@@ -0,0 +1,41 @@
+# General Information
+
+## All requests must be sent via HTTPS
+
+All the Flowdock APIs are served under HTTPS only.
+
+## Content-Type header must always be specified
+
+The Content-Type header of requests should always be specified when posting to the API. Generally, two content-types are supported: `application/json` and `application/x-www-form-urlencoded` (HTTP POST data).
+
+## Responses are JSON documents
+
+The responses of the Flowdock APIs are in JSON format. In case of an error, the JSON response contains a brief message and detailed information about the errors.
+
+Example:
+
+```
+POST https://api.flowdock.com/v1/messages/chat/_YOUR_API_TOKEN_HERE_
+```
+```
+{
+ "external_user_name": "foobar",
+ "content": ""
+}
+
+```
+
+Response:
+
+```
+HTTP/1.1 400 Bad Request
+Content-Type: application/json; charset=utf-8
+```
+```
+{
+ "message": "Validation error",
+ "errors": {
+ "content": ["can't be blank"]
+ }
+}
+```
View
28 docs/Libraries.md
@@ -1,19 +1,21 @@
# Libraries
-## Flowdock API Ruby Gem
- A Ruby API Gem for the Flowdock API. Currently supports only the [Push API](Push).
+A list of libraries to access Flowdock in your favorite language.
- * [Documentation](ruby-gem)
- * [Source on GitHub](https://github.com/flowdock/flowdock-api)
+## JavaScript
-## Flowdock Text
- * A JavaScript library for parsing links, tags and other things from Flowdock messages. Works in browsers and with NodeJS.
- * [Source and documentation on GitHub](https://github.com/flowdock/flowdock-text).
+ * [flowdock-text](https://github.com/flowdock/flowdock-text) — A library for parsing links, tags, and other things from Flowdock messages.
+ * [node-flowdock](https://github.com/flowdock/node-flowdock) — Flowdock client for node.js. Used in [hubot-flowdock](https://github.com/flowdock/hubot-flowdock).
-## 3rd Party Libraries
+## Perl
- * Perl
- * [Net::Flowdock](https://github.com/gphat/net-flowdock) by Cory G. Watson
- * [p5-Flowdock](https://github.com/samvtran/p5-Flowdock) by samvtran
- * Python
- * [python-flowdock](https://bitbucket.org/j00bar/python-flowdock) by Joshua Ginsberg
+ * [Net::Flowdock](https://github.com/gphat/net-flowdock) by _Cory G. Watson_ — API wrapper for Flowdock in Perl
+ * [p5-Flowdock](https://github.com/samvtran/p5-Flowdock) by _samvtran_ — Perl interface to the Flowdock API
+
+## Python
+
+ * [python-flowdock](https://bitbucket.org/j00bar/python-flowdock) by _Joshua Ginsberg_ — A Python interface to the Flowdock API
+
+## Ruby
+
+ * [flowdock gem](https://github.com/flowdock/flowdock-api) – Ruby bindings for Push API
View
10 docs/Messages.md
@@ -21,14 +21,18 @@ List of tags to be added to the message. Can be either an array (JSON only) or a
```javascript
{
- event: "message",
- content: "Howdy-Doo @Jackie #awesome",
- tags: ["todo", "#feedback", "@all"]
+ "event": "message",
+ "content": "Howdy-Doo @Jackie #awesome",
+ "tags": ["todo", "#feedback", "@all"]
}
```
### Response
```
+HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
{}
```
View
3  docs/Push.md
@@ -9,3 +9,6 @@ Use the Push API to post content to
The Push API does not require authenticating as a user. In order to access the information of a flow you must know its API Token. To obtain the API Token go to **Settings -> Team Inbox** inside a flow or see [Tokens](/account/tokens) page for all your tokens. When accessing the API Resources this token needs to be placed into the request URL.
+## Content-Type
+
+**The Content-Type header must always be specified.** The Push API endpoints support both `application/json` and `application/x-www-form-urlencoded`.
View
30 docs/REST.md
@@ -30,12 +30,15 @@ https://user:pass@api.flowdock.com/v1/flows/org/flow/messages/message_id
### Body
Both JSON and HTTP POST data is accepted as request body formats. In the API documentation, JSON examples are used.
-Example of posting a message: `POST /flows/organization/main/messages`
+Example of posting a message:
```
+POST /flows/organization/main/messages
+```
+```
{
- event: "message",
- content: "Hi all!"
+ "event": "message",
+ "content: "Hi all!"
}
```
@@ -43,6 +46,9 @@ Response:
```
HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
{}
```
@@ -51,18 +57,18 @@ HTTP/1.1 200 OK
Content-Type must be defined with a header in requests that contain data.
```
-Content-type: application/json
+Content-Type: application/json
```
or
```
-Content-type: application/x-www-form-urlencoded
+Content-Type: application/x-www-form-urlencoded
```
-Http-accept should include application/json since that is the supported return format of the API
+Accept header should include `application/json` since that is the supported return format of the API
```
-Http-accept: application/json
+Accept: application/json
```
## Structure of an API response
@@ -80,6 +86,9 @@ Response:
```
HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
[
{
"id": "acme/my-flow",
@@ -102,6 +111,11 @@ HTTP/1.1 200 OK
### Response headers
+In addition to standard headers like `Content-Type`, the response headers also include the user id of the authenticated user in `Flowdock-User` header.
+
```
-Content-type: application/json
+Status: 200
+Content-Length: 27
+Content-Type: application/json; charset=utf-8
+Flowdock-User: 1
```
View
30 docs/Ruby-Gem.md
@@ -1,30 +0,0 @@
-# Ruby Gem
-
-Use the Flowdock API Ruby Gem to get quickly started with developing applications for Flowdock. It supports all the available API features and can get you up and running in no time.
-Install
-
-## Install Flowdock API client using RubyGems:
-
-```
-gem install flowdock
-```
-
-Or download the source code from the [Flowdock API project](https://github.com/flowdock/flowdock-api) on GitHub.
-
-## Example
-
-Sending message to flow's Influx is easy, you just need to know the API Token of the flow you are using in order to authenticate.
-
-```
-require 'flowdock'
-
-# create a new Flow object with API Token and sender information
-flow = Flowdock::Flow.new(:api_token => "56188e2003e370c6efa9711988f7bf02",
- :source => "myapp",
- :from => {:name => "John Doe", :address => "john.doe@yourdomain.com"})
-
-# send message to the flow
-flow.send_message(:subject => "Greetings from Flowdock API Gem!",
- :content => "This is a test message.",
- :tags => ["cool", "stuff"])
-```
View
14 docs/Team-Inbox.md
@@ -47,16 +47,20 @@ Example value: http://www.flowdock.com/
```
{
- source: "News digest service",
- from_address: "news@example.com",
- subject: "Daily digest",
- content: "Interesting news of today",
- tags: ["news", "#digest", "@all"]
+ "source": "News digest service",
+ "from_address": "news@example.com",
+ "subject": "Daily digest",
+ "content": "Interesting news of today",
+ "tags": ["news", "#digest", "@all"]
}
```
## Response
```
+HTTP/1.1 200 OK
+Content-Type: application/json; charset=utf-8
+```
+```
{}
```
Please sign in to comment.
Something went wrong with that request. Please try again.