-
Notifications
You must be signed in to change notification settings - Fork 48
PHP API v1
use OCA\Circles\Api\v1\Circles;
Create a new circle and make the current user its owner.
You must specify type and name. type is one of this value:
CIRCLES_PERSONAL is 1 or 'personal'; CIRCLES_HIDDEN is 2 or 'hidden'; CIRCLES_PRIVATE is 4 or 'private'; CIRCLES_PUBLIC is 8 or 'public';
returns \OCA\Circles\Model\Circle
This function will make the current user joining a circle identified by its Id.
returns \OCA\Circles\Model\Member
This function will make the current user leaving the circle identified by its Id. Will fail if user is the owner of the circle.
returns \OCA\Circles\Model\Member
This function list all circles fitting a search regarding its name and the level and the rights from the current user. In case of Hidden circle, name needs to be complete so the circle is included in the list (or if the current user is the owner)
example: Circles::listCircles(Circle::CIRCLES_ALL, '', 8);
will returns all circles when the current user is at least an Admin.
returns \OCA\Circles\Model\Circle[]
Returns details on the circle. If the current user is a member, the members list will be return as well.
returns \OCA\Circles\Model\Circle
This function will destroy the circle if the current user is the Owner.
returns nothing
This function will add a user as member of the circle. Current user need at least to be Moderator.
returns \OCA\Circles\Model\Member[]
This function will remove a member from the circle. Current user needs to be at least Moderator and have a higher level that the targeted member.
returns \OCA\Circles\Model\Member[]
Edit the level of a member of the circle. The current level of the target needs to be lower than the user that initiate the process (ie. the current user). The new level of the target cannot be the same than the current level of the user that initiate the process (ie. the current user).
returns \OCA\Circles\Model\Member[]
This function will share an item (array) to the circle identified by its Id.
Source is the app that is sharing the item and type can be used by the app to identified the payload.
return nothing
Initiate a link procedure. Current user must be at least Admin of the circle.
circleId is the local circle and remote is the target for the link.
Remote format is: <circle_name>@<remote_host> when remote_host must be a valid HTTPS address.
returns \OCA\Circles\Model\FederatedLink