- POST rivers
- GET rivers/:id
- PUT rivers/:id
- DELETE rivers/:id
- POST rivers/:id/channels
- PUT rivers/:id/channels/:channel_id
- DELETE rivers/:id/channels/:channel_id
- POST rivers/:id/collaborators
- GET rivers/:id/collaborators
- PUT rivers/:id/collaborators/:account_id
- DELETE rivers/:id/collaborators/:account_id
- PUT rivers/:id/followers/:account_id
- GET rivers/:id/followers
- DELETE rivers/:id/followers/:follower_id
- GET rivers/:id/drops
- DELETE rivers/:id/drops/:drop_id
- GET rivers/:id/trends/tags
- GET rivers/:id/trends/places
- GET rivers/:id/rules
- POST rivers/:id/rules
- PUT rivers/:id/rules/:rule_id
- DELETE rivers/:id/rules/:rule_id
POST rivers
Create a river.
Resource Path
/rivers
Request Body
The request body is a JSON representation of the River being created.
Example Request
Below creates a public river.
POST https://api.swiftapp.com/v1/rivers
POST DATA
GET rivers/:id
Returns a River object for the given river.
Resource Path
/rivers/:id
Request Parameters
Name | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Example Request
GET https://api.swiftapp.com/v1/rivers/1234
PUT rivers/:id
Modify an existing river. Channels cannot be modified from this end point and can only be modified via the channels endpoint.
Resource Path
/rivers/:id
Request Body
The request body is a JSON representation of the River being updated.
Example Request
Below creates a river with a single RSS channel.
PUT https://api.swiftapp.com/v1/rivers/1234
PUT DATA
DELETE rivers/:id
Remove an existing river.
Resource Path
/rivers/:id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Example Request
DELETE https://api.swiftapp.com/v1/rivers/9999
POST rivers/:id/channels
Add a new channel to a river.
Resource Path
/rivers/:id/channels
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Request Body
The request body is a JSON representation of the Channel being created.
Example Request
Below adds a Twitter channel tracking the user @crowdmap
POST https://api.swiftapp.com/v1/rivers/9999/channel
POST DATA
PUT rivers/:id/channels/:channel_id
Modify an existing channel in a river.
Resource Path
/rivers/:id/channels/:channel_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Request Body
The request body is a JSON representation of the Channel being modified.
Example Request
PUT https://api.swiftapp.com/v1/rivers/9999/channel/816
DELETE rivers/:id/channels/:channel_id
Remove an existing channel from a river.
Resource Path
/rivers/:id/channels/:channel_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
channel_id | Required | ID of the channel |
Example Request
DELETE https://api.swiftapp.com/v1/rivers/9999/channels/816
POST rivers/:id/collaborators
Add a new collaborator to a river. Collaborator objects have the following fields:
Field | Type | Read/Write | Description |
---|---|---|---|
id | Int64 | R | The account id of the collaborator. |
account | R | The Account object for the collaborator. | |
active | Boolean | RW | True when the account has accepted collaboration, false otherwise. |
read_only | Boolean | RW | True when the account the collaborator cannot modify the river settings. |
date_added | String | R | Date when the collaborator was added. |
Resource Path
/rivers/:id/collaborators
Request Body
The request body is a JSON representation of the Collaborator being added.
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Example Request
POST https://api.swiftapp.com/v1/rivers/9999/collaborators
POST DATA
GET rivers/:id/collaborators
Returns a list of collaborators objects of accounts collaborating on the river.
Resource Path
/rivers/:id/collaborators
Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Example Request
GET https://api.swiftapp.com/v1/rivers/9999/collaborators
PUT rivers/:id/collaborators/:account_id
Modify a collaborator. This allows the collaboration level to be modified or collaboration to be activated.
Resource Path
/rivers/:id/collaborators/:collaborator_id
Request Body
The request body is a JSON representation of the Collaborator being added.
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
account_id | Required | Account ID of the collaborator |
Example Request
PUT https://api.swiftapp.com/v1/rivers/9999/collaborators/1234
PUT DATA
DELETE rivers/:id/collaborators/:account_id
Remove an existing account collaborator. Only river owners can perform this action.
Resource Path
/rivers/:id/collaborators/:collaborator_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
account_id | Required | Account ID of the collaborator |
Example Request
DELETE https://api.swiftapp.com/v1/rivers/9999/collaborators/345
PUT rivers/:id/followers/:account_id
Add a new follower to a river.
Resource Path
/rivers/:id/followers/:account_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
account_id | Required | The numerical id of the account to be added as a follower |
Example Request
PUT https://api.swiftapp.com/v1/rivers/9999/followers/23
GET rivers/:id/followers
Returns a list of Account objects of accounts following the river.
Resource Path
/rivers/:id/followers
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
Example Request
GET https://api.swiftapp.com/v1/rivers/9999/followers
DELETE rivers/:id/followers/:follower_id
Remove an existing account follower.
Resource Path
/rivers/:id/followers/:follower_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
follower_id | Required | Account id of the follower |
Example Request
DELETE https://api.swiftapp.com/v1/rivers/9999/followers/345
GET rivers/:id/drops
Returns a list of drops in the river.
Resource Path
/rivers/:id/drops
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
count | Optional | Number of drops to return. Default: 50 |
max_id | Optional | Id that is the pagination reference point. Page numbers are relative to this id. |
page | Optional | Page number of results to return relative to max_id. |
since_id | Optional | Return count drops with and id greater than this id. |
date_from | Optional | Returned drops will have a published date greater than this date |
date_to | Optional | Returned drops will have a published date smaller than this date |
keywords | Optional | Comma separated list of keywords and phrases. Returned drops will contain these keywords |
channels | Optional | Comma separated list of channel names. Returned drops will be from the specified channels |
channel_ids | Optional | Comma separated list of channel ids. Returned drops will be from the specified channels |
locations | Optional | Comma separated list of bounding boxes. A bounding box is specified by a pair of latitude,longitude pairs, with the SouthWest corner of the bounding box coming first |
state | Optional | Return drops with the given state: read or unread. |
Request Headers
Header | Required | Description |
---|---|---|
X-Stream | Optional | The server will keep the connection open when this field is present and new drops will be written in realtime as they are added to the River. |
Example Request
The request below will return a maximum of 5 drops that bear the following properties
- Contain the phrase "Google IO"
- Mention a location that is within the rectangular geographic region whose SouthWest corner is
37.60226425565787,-122.54699707031249
and NorthEast corner is37.815208598896255,-122.29293823242188
- Originated from an RSS feed
GET https://api.swiftapp.com/v1/rivers/1/drops?keywords=Google+IO&locations=37.60226425565787,-122.54699707031249,37.815208598896255,-122.29293823242188&count=5&channel=rss
DELETE rivers/:id/drops/:drop_id
Remove a drop from a River.
Resource Path
/rivers/:id/drops/:drop_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | The numerical id of the desired river |
drop_id | Required | ID of the drop to be removed from the river |
Example Request
DELETE https://api.swiftapp.com/v1/rivers/9999/drops/1111
GET rivers/:id/trends/tags
Returns the list of trending tags in a river
Resource Path
/rivers/:id/trends
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | Numerical ID of the river |
count | Optional integer | Number of trend items to return The default value is 20 |
page | Optional integer | The page number for the results. The default value is 1 |
since | Optional string in ISO 8601 Date | Only trending tags data after this date will be returned. |
until | Optional string in ISO 8601 Date | Only trending tags before this date will be returned. |
If neither the since
nor until
parameters are specified, the request uses to the following (default) values:
since
- The date as of 7 days ago from the current dateuntil
- The current date
Example Request
GET https://api.swiftapp.com/v1/rivers/34/trends/tags?&page=3&since=2012-07-10&until=2012-09-26
GET rivers/:id/trends/places
Returns the trending places in a river.
Resource Path
/rivers/:id/trends/places
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | Numerical ID of the river |
count | Optional integer | Number of place trends to return. The default is 20 |
page | Optional integer | Page number to fetch. The default is 1 |
since | Optional string - ISO 8601 date | Only trending places after this date will be returned |
until | Optional string - ISO 8601 date | Only trending places before this date will be returned |
If neither the since
nor until
parameters are specified, the request uses to the following (default) values:
since
- The date as of 7 days ago from the current dateuntil
- The current date
Example Request
GET https://api.swiftapp.com/v1/rivers/1/trends/places?count=12&since=2013-04-02
GET rivers/:id/rules
Gets and returns the rules for a river
Resource Path
/rivers/:id/rules
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | Numerical id of the river |
Example Request
GET https://api.swiftapp.com/v1/rivers/1/rules
POST rivers/:id/rules
Resource Path
/rives/:id/rules
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | Numerical id of the desired river |
Request Body
The request body is a JSON representation of a Rule.
Example Request
POSThttps://api.swiftapp.com/v1/rivers/1/rules
POST DATA
PUT rivers/:id/rules/:rule_id
Modifies a rule
Resource Path
/rivers/:id/rules/:rule_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | Numerical id of the desired river |
rule_id | Required | Numerical id of the desired rule |
Request Body
The request body is a JSON representation of a Rule. At least one field must be specified
Example Request
PUT https://api.swiftapp.com/v1/rivers/1/rules/1
PUT DATA
DELETE rivers/:id/rules/:rule_id
Deletes a rule from a river
Resource Path
/rivers/:id/rules/:rule_id
Request Parameters
Field | Type | Description |
---|---|---|
id | Required | Numerical id of the desired river |
rule_id | Required | Numerical id of the desired rule |
Example Request
DELETE https://api.swiftapp.com/v1/rivers/1/rules/5