File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed
templates/android/library/src/main/java/io/package Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ class Client @JvmOverloads constructor(
44
44
) : CoroutineScope {
45
45
46
46
companion object {
47
+ /**
48
+ * The size for chunked uploads in bytes.
49
+ */
47
50
internal const val CHUNK_SIZE = 5*1024*1024; // 5MB
48
51
internal const val GLOBAL_PREFS = "{{ sdk .namespace | caseDot }}"
49
52
internal const val COOKIE_PREFS = "myCookie"
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import java.time.Instant
4
4
import kotlin.math.floor
5
5
import kotlin.random.Random
6
6
7
+ /**
8
+ * Helper class to generate ID strings for resources.
9
+ */
7
10
class ID {
8
11
companion object {
9
12
// Generate an hex ID based on timestamp
@@ -21,7 +24,12 @@ class ID {
21
24
fun custom(id: String): String
22
25
= id
23
26
24
- // Generate a unique ID with padding to have a longer ID
27
+ /**
28
+ * Generate a unique ID with padding to have a longer ID
29
+ *
30
+ * @param padding The number of characters to add to the ID
31
+ * @returns The unique ID
32
+ */
25
33
fun unique(padding: Int = 7): String {
26
34
val baseId = hexTimestamp()
27
35
val randomPadding = (1..padding)
Original file line number Diff line number Diff line change @@ -2,4 +2,9 @@ package {{ sdk.namespace | caseDot }}
2
2
3
3
import {{ sdk .namespace | caseDot }}.Client
4
4
5
+ /**
6
+ * Abstract class for services.
7
+ *
8
+ * @param client The Appwrite client.
9
+ */
5
10
abstract class Service(val client: Client)
You can’t perform that action at this time.
0 commit comments