File tree Expand file tree Collapse file tree 10 files changed +65
-32
lines changed
android/library/src/main/java/io/appwrite
kotlin/src/main/kotlin/io/appwrite Expand file tree Collapse file tree 10 files changed +65
-32
lines changed Original file line number Diff line number Diff line change @@ -2,21 +2,22 @@ package {{ sdk.namespace | caseDot }}
2
2
3
3
class Role {
4
4
companion object {
5
- fun any(): String
6
- = "any"
7
- fun user(id: String): String
8
- = "user:$id"
9
- fun users(): String
10
- = "users"
11
- fun guests(): String
12
- = "guests"
13
- fun team(id: String, role: String = ""): String
14
- = if(role.isEmpty()) {
15
- "team:$id"
16
- } else {
17
- "team:$id/$role"
18
- }
19
- fun status(status: String): String
20
- = "status:$status"
5
+ fun any(): String = "any"
6
+
7
+ fun user(id: String): String = "user:$id"
8
+
9
+ fun users(): String = "users"
10
+
11
+ fun guests(): String = "guests"
12
+
13
+ fun team(id: String, role: String = ""): String = if(role.isEmpty()) {
14
+ "team:$id"
15
+ } else {
16
+ "team:$id/$role"
17
+ }
18
+
19
+ fun member(id: String): String = "member:$id"
20
+
21
+ fun status(status: String): String = "status:$status"
21
22
}
22
23
}
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ class Role {
23
23
}
24
24
return 'team:$id/$role';
25
25
}
26
+
27
+ static String member(String id) {
28
+ return 'member:$id';
29
+ }
26
30
27
31
static String status(String status) {
28
32
return 'status:$status';
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ export class Role {
21
21
}
22
22
return `team:${id}/${role}`
23
23
}
24
+
25
+ public static member(id: string): string {
26
+ return `member:${id}`
27
+ }
24
28
25
29
public static status(status: string): string {
26
30
return `status:${status}`
Original file line number Diff line number Diff line change @@ -2,21 +2,22 @@ package {{ sdk.namespace | caseDot }}
2
2
3
3
class Role {
4
4
companion object {
5
- fun any(): String
6
- = "any"
7
- fun user(id: String): String
8
- = "user:$id"
9
- fun users(): String
10
- = "users"
11
- fun guests(): String
12
- = "guests"
13
- fun team(id: String, role: String = ""): String
14
- = if(role.isEmpty()) {
15
- "team:$id"
16
- } else {
17
- "team:$id/$role"
18
- }
19
- fun status(status: String): String
20
- = "status:$status"
5
+ fun any(): String = "any"
6
+
7
+ fun user(id: String): String = "user:$id"
8
+
9
+ fun users(): String = "users"
10
+
11
+ fun guests(): String= "guests"
12
+
13
+ fun team(id: String, role: String = ""): String = if(role.isEmpty()) {
14
+ "team:$id"
15
+ } else {
16
+ "team:$id/$role"
17
+ }
18
+
19
+ fun member(id: String): String = "member:$id"
20
+
21
+ fun status(status: String): String = "status:$status"
21
22
}
22
23
}
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ class Role {
17
17
}
18
18
return 'team:' + id + '/' + role
19
19
}
20
+ static member = (id) => {
21
+ return 'member:' + id
22
+ }
20
23
static status = (status) => {
21
24
return 'status:' + status
22
25
}
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ class Role
27
27
}
28
28
return " team:$id /$role " ;
29
29
}
30
+ public static function member (string $id ): string
31
+ {
32
+ return " member:$id " ;
33
+ }
30
34
public static function status (string $status ): string
31
35
{
32
36
return " status:$status " ;
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ class Role:
21
21
return f'team:{id}/{role}'
22
22
return f'team:{id}'
23
23
24
+ @staticmethod
25
+ def member(id):
26
+ return f'member:{id}'
27
+
24
28
@staticmethod
25
29
def status(status):
26
30
return f'status:{status}'
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ module {{spec.title | caseUcfirst}}
23
23
"team:#{id}/#{role}"
24
24
end
25
25
end
26
+
27
+ def self.member(id)
28
+ "member:#{id}"
29
+ end
26
30
27
31
def self.status(status)
28
32
"status:#{status}"
Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ public class Role {
22
22
return "team:\(id)/\(role)"
23
23
}
24
24
25
+ public static func member(_ id: String) -> String {
26
+ return "member:\(id)"
27
+ }
28
+
25
29
public static func status(_ status: String) -> String {
26
30
return "status:\(status)"
27
31
}
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ export class Role {
21
21
}
22
22
return `team:${id}/${role}`
23
23
}
24
+
25
+ public static member(id: string): string {
26
+ return `member:${id}`
27
+ }
24
28
25
29
public static status(status: string): string {
26
30
return `status:${status}`
You can’t perform that action at this time.
0 commit comments