Skip to content

Commit 9100214

Browse files
committed
Updated readme and added getFriendsList
1 parent 2f768a3 commit 9100214

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

CloudOS.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@
155155
CloudOS.skyCloud("cloudos", "subscriptionList", callParmeters, getSuccess);
156156
};
157157

158+
CloudOS.getFriendsList = function(getSuccess) {
159+
CloudOS.skyCloud("a169x727", "getFriendsList", "", getSuccess);
160+
};
161+
158162
// ========================================================================
159163
// OAuth functions
160164

README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,37 @@ Sends a notification to the user identified by `token`. Similar to `CloudOS.send
129129
Creates a subscription between the current user and the user identified by `token`. `namespace`, `name` and `relationship` are all strings identifying the type of subscription. `subscriptionAttributes' is a hash containing data you wish to include with the subscription.
130130

131131
### `CloudOS.subscriptionList(callParameters, callback)`
132-
Returns all subscriptions. I have no clue what `callParameters` is, though. None what-so-ever. `callback` is the callback function we call with the subscriptions. It should accept one parameter that is the subscriptions. It looks like:
132+
Returns all subscriptions. `callParameters` is a string with the URL encoded parameters. The parameters that matter are `namespace` and `relationship`. For example, Forever uses `"namespace=Forever&relationship=friend"`. `callback` is the callback function we call with the subscriptions. It should accept one parameter that is the subscriptions. It looks like:
133133

134-
TODO: fill this part out
135134
```
136-
{
137-
}
135+
[
136+
{
137+
"eventChannel":"A1006530-C240-11E2-9978-17CDB0392E66",
138+
"namespace":"Forever",
139+
"relationship":"friend",
140+
"approveAttrs":"{}",
141+
"backChannel":"A1EABEAA-C240-11E2-A9EB-ECECE71C24E1",
142+
"subAttrs":"",
143+
"channelName":"Forever Friend"
144+
}
145+
]
146+
```
147+
148+
### `CloudOS.getFriendsList(callback)`
149+
Returns friend subscriptions with their profile information. `callback` is the callback function we call with the subscriptions. It should accept one parameter that is the subscriptions. It looks like:
150+
151+
```
152+
[
153+
{
154+
"eventChannel": "AAAAAA-AAAAA-AAAA-AAAA-AAAAAAAAAAAAA",
155+
"myProfileName": "Bob Smith",
156+
"myProfileNotes": null,
157+
"myProfilePhoto": "https://s3.amazonaws.com/k-mycloud/a169x672/unknown.png",
158+
"myProfileDescription": "null",
159+
"myProfilePhone": null,
160+
"myProfileEmail": null
161+
}
162+
]
138163
```
139164

140165
## Raising Events

0 commit comments

Comments
 (0)