Provides methods for accessing ArrowDB friends.
This example adds a friend and checks the response.
Cloud.Friends.add({
user_ids: checked.join(",")
}, function (e) {
if (e.success) {
alert('Friend(s) added');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
This example shows pending friend requests and checks the response.
Cloud.Friends.requests(function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.friend_requests.length);
for (var i = 0; i < e.friend_requests.length; i++) {
var user = e.friend_requests[i].user;
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
This example approves pending friend requests and checks the response.
Cloud.Friends.approve({
user_ids: checked.join(",")
}, function (e) {
if (e.success) {
alert('Friend(s) approved');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
This example removes friends and checks the response.
Cloud.Friends.remove({
user_ids: checked.join(",")
}, function (e) {
if (e.success) {
alert('Friend(s) removed');
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
This example requests information about particular friends and checks the response.
Cloud.Friends.search({
user_id: searchID
}, function (e) {
if (e.success) {
alert('Success:\n' +
'Count: ' + e.users.length);
for (var i = 0; i < e.users.length; i++) {
var user = e.users[i];
alert('id: ' + user.id + '\n' +
'first name: ' + user.first_name + '\n' +
'last name: ' + user.last_name);
}
} else {
alert('Error:\n' +
((e.error && e.message) || JSON.stringify(e)));
}
});
The name of the API that this proxy corresponds to.
The name of the API that this proxy corresponds to.
The value of this property is the fully qualified name of the API. For example, Button
returns Ti.UI.Button
.
Indicates if the proxy will bubble an event to its parent.
Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.
Default: true
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.
Add friends to the current user.
Requires user login.
See Friends: Add Friends for the request parameters supported by this method.
Parameters to send in the request.
Callback function to execute when the method completes.
Applies the properties to the proxy.
Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.
A dictionary of properties to apply.
Approve existing friend requests.
Requires user login.
See Friends: Approve Friend Requests for the request parameters supported by this method.
Parameters to send in the request.
Callback function to execute when the method completes.
Removes one or more friends from the current user.
Requires user login.
See Friends: Remove Friends for the request parameters supported by this method.
Parameters to send in the request.
Callback function to execute when the method completes.
View pending friend requests.
Requires user login.
See Friends: Show Friend Requests for the request parameters supported by this method.
Data is returned in the friend_requests
property of the parameter passed to the callback.
Parameters to send in the request.
Callback function to execute when the method completes.
Retrieve a list of friends.
Requires user login.
See Friends: Search Friends for the request parameters supported by this method.
Data is returned in the users
property of the parameter passed to the callback.
Parameters to send in the request.
Callback function to execute when the method completes.
Sets the value of the bubbleParent property.
New value for the property.
Sets the value of the lifecycleContainer property.
New value for the property.