diff options
author | Maxence Lange <maxence@nextcloud.com> | 2017-07-24 20:13:48 +0300 |
---|---|---|
committer | Maxence Lange <maxence@nextcloud.com> | 2017-07-24 20:13:48 +0300 |
commit | e63ccec733e7be4aa7159fd18cd811595f9f5a18 (patch) | |
tree | eb7bec29ed1bc3788e4ca4070777d8a7739629b7 /lib/Api | |
parent | b9098da70c5e0f19b61360deaf638dcaf2a6b612 (diff) |
API 0.10.0 - using ShortenUniqueId
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
Diffstat (limited to 'lib/Api')
-rw-r--r-- | lib/Api/v1/Circles.php | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/lib/Api/v1/Circles.php b/lib/Api/v1/Circles.php index fd55a8ff..9f842219 100644 --- a/lib/Api/v1/Circles.php +++ b/lib/Api/v1/Circles.php @@ -35,7 +35,7 @@ use OCA\Circles\Model\SharingFrame; class Circles { - const API_VERSION = [0, 9, 1]; + const API_VERSION = [0, 10, 0]; protected static function getContainer() { $app = new Application(); @@ -67,8 +67,8 @@ class Circles { * CIRCLES_PRIVATE is 4 or 'private' * CIRCLES_PUBLIC is 8 or 'public' * - * @param $type - * @param $name + * @param mixed $type + * @param string $name * * @return Circle */ @@ -85,15 +85,15 @@ class Circles { * * This function will make the current user joining a circle identified by its Id. * - * @param $circleId + * @param string $circleUniqueId * * @return Member */ - public static function joinCircle($circleId) { + public static function joinCircle($circleUniqueId) { $c = self::getContainer(); return $c->query('CirclesService') - ->joinCircle($circleId); + ->joinCircle($circleUniqueId); } @@ -103,15 +103,15 @@ class Circles { * This function will make the current user leaving the circle identified by its Id. Will fail * if user is the owner of the circle. * - * @param $circleId + * @param string $circleUniqueId * * @return Member */ - public static function leaveCircle($circleId) { + public static function leaveCircle($circleUniqueId) { $c = self::getContainer(); return $c->query('CirclesService') - ->leaveCircle($circleId); + ->leaveCircle($circleUniqueId); } @@ -125,7 +125,7 @@ class Circles { * example: Circles::listCircles(Circle::CIRCLES_ALL, '', 8, callback); will returns all * circles when the current user is at least an Admin. * - * @param $type + * @param mixed $type * @param string $name * @param int $level * @@ -160,15 +160,15 @@ class Circles { * Returns details on the circle. If the current user is a member, the members list will be * return as well. * - * @param $circleId + * @param string $circleUniqueId * * @return Circle */ - public static function detailsCircle($circleId) { + public static function detailsCircle($circleUniqueId) { $c = self::getContainer(); return $c->query('CirclesService') - ->detailsCircle($circleId); + ->detailsCircle($circleUniqueId); } @@ -177,16 +177,16 @@ class Circles { * * Save the settings. Settings is an array and current user need to be an admin * - * @param $circleId + * @param string $circleUniqueId * @param array $settings * * @return Circle */ - public static function settingsCircle($circleId, array $settings) { + public static function settingsCircle($circleUniqueId, array $settings) { $c = self::getContainer(); return $c->query('CirclesService') - ->settingsCircle($circleId, $settings); + ->settingsCircle($circleUniqueId, $settings); } @@ -195,15 +195,15 @@ class Circles { * * This function will destroy the circle if the current user is the Owner. * - * @param $circleId + * @param string $circleUniqueId * * @return mixed */ - public static function destroyCircle($circleId) { + public static function destroyCircle($circleUniqueId) { $c = self::getContainer(); return $c->query('CirclesService') - ->removeCircle($circleId); + ->removeCircle($circleUniqueId); } @@ -213,16 +213,16 @@ class Circles { * This function will add a user as member of the circle. Current user need at least to be * Moderator. * - * @param $circleId - * @param $userId + * @param string $circleUniqueId + * @param string $userId * * @return Member[] */ - public static function addMember($circleId, $userId) { + public static function addMember($circleUniqueId, $userId) { $c = self::getContainer(); return $c->query('MembersService') - ->addMember($circleId, $userId); + ->addMember($circleUniqueId, $userId); } @@ -232,16 +232,16 @@ class Circles { * This function will return information on a member of the circle. Current user need at least * to be Member. * - * @param $circleId - * @param $userId + * @param string $circleUniqueId + * @param string $userId * * @return Member */ - public static function getMember($circleId, $userId) { + public static function getMember($circleUniqueId, $userId) { $c = self::getContainer(); return $c->query('MembersService') - ->getMember($circleId, $userId); + ->getMember($circleUniqueId, $userId); } @@ -251,16 +251,16 @@ class Circles { * 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. * - * @param $circleId - * @param $userId + * @param string $circleUniqueId + * @param string $userId * * @return Member[] */ - public static function removeMember($circleId, $userId) { + public static function removeMember($circleUniqueId, $userId) { $c = self::getContainer(); return $c->query('MembersService') - ->removeMember($circleId, $userId); + ->removeMember($circleUniqueId, $userId); } @@ -272,17 +272,17 @@ class Circles { * cannot be the same than the current level of the user that initiate the process (ie. the * current user). * - * @param $circleId - * @param $userId - * @param $level + * @param string $circleUniqueId + * @param string $userId + * @param int $level * * @return Member[] */ - public static function levelMember($circleId, $userId, $level) { + public static function levelMember($circleUniqueId, $userId, $level) { $c = self::getContainer(); return $c->query('MembersService') - ->levelMember($circleId, $userId, $level); + ->levelMember($circleUniqueId, $userId, $level); } @@ -294,10 +294,10 @@ class Circles { * payload. * * @param string $circleUniqueId - * @param $source - * @param $type + * @param string $source + * @param string $type * @param array $payload - * @param $broadcaster + * @param string $broadcaster * * @return mixed */ @@ -322,16 +322,16 @@ class Circles { * 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. * - * @param $circleId - * @param $remote + * @param string $circleUniqueId + * @param string $remote * * @return FederatedLink */ - public static function linkCircle($circleId, $remote) { + public static function linkCircle($circleUniqueId, $remote) { $c = self::getContainer(); return $c->query('FederatedService') - ->linkCircle($circleId, $remote); + ->linkCircle($circleUniqueId, $remote); } |