Package net.voidnote
Class CreateOptions
java.lang.Object
net.voidnote.CreateOptions
Options for
VoidNote.create(java.lang.String, net.voidnote.CreateOptions).
CreateOptions opts = CreateOptions.of("vn_...")
.withMaxViews(1)
.withExpiresIn(6) // hours: 1, 6, 24, 72, 168, 720
.withNoteType("pipe") // "secure" (default) or "pipe"
.withTitle("Deploy token");
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringRequired: your API key (vn_...).final IntegerExpiry in hours.final IntegerDestroy after this many reads (1–100).final StringNote type:"secure"(default, encrypted static note) or"pipe"(streaming append mode).final StringOptional note title (stored in plaintext). -
Method Summary
Modifier and TypeMethodDescriptionstatic CreateOptionsCreates options with only the required API key.withExpiresIn(int hours) Set expiry in hours.withMaxViews(int maxViews) withNoteType(String noteType) Set note type:"secure"or"pipe".
-
Field Details
-
apiKey
Required: your API key (vn_...). -
title
Optional note title (stored in plaintext). -
maxViews
Destroy after this many reads (1–100).null= server default (1). -
expiresIn
Expiry in hours. Must be one of: 1, 6, 24, 72, 168, 720.null= server default (24h). -
noteType
Note type:"secure"(default, encrypted static note) or"pipe"(streaming append mode).null= server default ("secure").
-
-
Method Details
-
of
Creates options with only the required API key. -
withTitle
-
withMaxViews
-
withExpiresIn
Set expiry in hours. Must be one of: 1, 6, 24, 72, 168, 720.- Throws:
IllegalArgumentException- if the value is not in the allowed set.
-
withNoteType
Set note type:"secure"or"pipe".- Throws:
IllegalArgumentException- if the value is not recognised.
-