Repository navigation
OnlyWorlds Unity SDK 0.27.0
Serials 97 to 100 in Unity, with the strand profile's reader (OWStrand.Of) and the strand on the front door
(OWReadingAids.Strand), and most of the TypeScript SDK's client calls that Unity never had: the roster, health,
upsert, adopt, the hidden mark, the member's own Character, typed get and list options, the account's worlds and
keys, invite links and seats, and images and files through a ticket and the upload host. A minor release because it
adds public API (below). A transport of your own must now send OWRequest.BodyBytes, or an upload goes out empty.
Added
OWReadingAids.Strand: the world's strand on the front door (serial 100), as keel serves it inreading_aids
beside the Charter, the Guide and the Domains onGET /me(OWReadingAids.Of) and an agent's join answer
(OWJoined.ReadingAids): anOWStrandread as served, each slot{id, name}or null andSameas served. Six null
slots read as an empty strand (IsEmpty), the world having none or its story being out of the key's view; a packet
with nostrand(an older keel) readsStrandnull.ToJsonwrites the packet back in the charter profile's
order, the strand fourth, and only when it was served.OWStrand.Of(world, elements, reader, open, hiddenIds): the strand profile's reader (serial 98), a world's strand
as one reader sees it through the lens reader's own view: the story the World'sx_strandnames (Narrative), one
of its events (Event), that event's place (Location), the story'sprotagonist(Character), where the hero is
now (Now), and whether then and now are one place by id (Same). Each slot{id, name}or null,ToJson()the
profile's six keys. A slot holds only its own kind, no slot is filled from another, a list's order is never read,
and a story the reader knows only as a stub fills its own slot alone. Only the story's id is required (serial 99):
the event and the place null or absent read as unset, a place with no event is an empty place, and any other value
there (an empty string, a number, an object) is no mark, as is a story that is not a string. A multi-link that is
not a list lists nothing; a nameless slot reads an empty string; the public rung reads only a world open to anyone.
The fixture's cases pass by name, the same bytes as the TypeScript SDK's and the Python package's.OWOpenerSurface.Online(default true;onlineinOWOpenerSurface.FromJson, refused by name when not a
boolean): with no connection, every row whose href is a web address (http:orhttps:, in any case, read from the
row's own filled href) saysOWOpenerState.NeedsAConnection, "Needs a connection", the site's own row included,
which had no word before. The words in order, the first that holds: "You are here", then "Needs a connection", then
the account, browser and phone words, then "Opens the world". A row whose link opens an app on the device keeps its
own word, and every row keeps its href. The shared fixture moves to 54 cases (sha2565a9ebbc8…), the same bytes as
the TypeScript SDK 4.118.0's and the Python package 0.96.0's.OWClient.GetMembersAsync(GET /members): the world's roster, the rows a message reader takes asmembers
(OWMessage.SenderStatus,ReadMarkOf), each row's id (null for the owner), kind, role, Character, status (removed
rows stay), lenses and, where this key is served it, name. A world key reads its own world's, with noworldand no
PIN; an account token the worldWorldnames (world=<id>, its Bearer), refused before sending withoutWorld; a
keyless client is refused, since the roster has no public reader. Mirrors the TypeScript SDK'smembers()(4.22.0;
on an account token from 4.116.0).OWClient.HealthAsync(GET /health): keel's liveness answer, as served. Sent with no credential on every client (no
key, PIN or Bearer, and noworld), so an account token and a keyless client call it too. Mirrors the TypeScript
SDK'shealth()(3.0.0; on a keyless client from 4.30.0).OWClient.UpsertAsync<T>(PUT /{type}/{id}/): creates the element under the caller's own id, or writes it whole.
The body is cleaned as every element write's is (the read-only fields left out, a null scalar string sent as""),
sent with the PIN,X-OW-Clientand, on an agent client,X-OW-Agent; a known-of stub is refused before sending,
and an agent seat's PUT that became a proposal (202) throwsOWProposedError. Mirrors the TypeScript SDK's
upsert()(3.0.0).OWClient.AdoptAsync<T>(POST /{type}/{id}/adopt{member}): changes who made an element, to a membership id of
the world orowner(created_bynull); returns the element as written. The owner's key or a co-builder's, with
its PIN; an element write, soX-OW-Clientgoes with it andX-OW-Agenton an agent client. A null or empty member
is refused before sending. Mirrors the TypeScript SDK'sadopt()(4.43.0).- The hidden mark on the client:
OWClient.HideAsync(PUT /{type}/{id}/hidden,{}) andUnhideAsync(DELETE
/{type}/{id}/hidden), the owner's key or a co-builder's with its PIN, a 204; andListHiddenAsync(GET
/world/hidden), every hidden element newest first asOWHiddenRows (Type,Id,SetAt,SetBy, null when the
owner hid it), a read of the owner's or a co-builder's key. keel's document declares no header on the hide or the
unhide, so neitherX-OW-AgentnorX-OW-Clientgoes there; the TypeScript SDK sends neither since 4.120.0.
Mirrors the TypeScript SDK'shide(),unhide()(4.45.0) andlistHidden()(4.48.0). OWClient.SetMyCharacterAsync(PUT /me/character{character}): a person member picks the roster Character that is
them in this world, or none (null, sent asnull); answers GET /me's body. With the PIN, and withoutX-OW-Agent
orX-OW-Client, which keel's document declares on neither (the TypeScript SDK sends neither since 4.120.0). An
account token and a keyless client are refused before sending. Mirrors the TypeScript SDK's
setMyCharacter()(4.50.0).- The account's worlds and their keys, on an account token:
OWClient.ListAccountWorldsAsync(GET /account/worlds),
every world the account owns or is a member of asOWAccountWorldrows (Roleownerorcollaborator,
MemberRoleon a collaborator's,PublicRead, theKeysby name and last four);MintWorldKeyAsync(worldId)
(POST /account/worlds/{id}/keys), a key for the owner or bound to a member's own membership, answered once in full
asOWMintedKey.Keybeside its row (Id,Last4,Scope,Member,Kept); and
RevokeWorldKeyAsync(worldId, keyId)(DELETE …/keys/{key_id}), a 204 that answers the same for a key already
revoked. Each sends the Bearer alone, never a PIN or a write header, and any other key is refused before sending.
The mint takesscope(read or write,randwthe same, in any case; a write key by default),name(as the
key list shows it) andkeep(kept across a sign-out), afterct, as keel's document declares its body: each sent
only when given, as given; with none given no body is sent and keel mints a write key with no name, not kept (the
TypeScript SDK sends{}, the same mint). A scope keel refuses, or a name past 80 characters once trimmed (keel's
trim and count, Python's whitespace and code points), is anArgumentExceptionbefore sending.
OWApiError.IsPinRequired(409pin_required) reads a member's mint on an account with no PIN. Mirrors the
TypeScript SDK'slistAccountWorlds(),mintWorldKey()(4.45.0; withoutX-OW-Agent, as 4.120.0 sends it) and
revokeWorldKey()(4.78.0). OWClient.AcceptJoinAsync(code)(POST /account/join{code}): an account token accepts a person's invite link and
becomes a member with the link's role, answered asOWJoinedMembership(Id,WorldId,WorldName,Role,
JoinedAt,RosterCharacter). No PIN is needed to accept. A refusal leaves the code unspent: every bad code, and an
agent's, is a 404 (IsNotFound), an account already in the world a 409 (OWApiError.IsAlreadyMember, new). Any
other key, and a null or empty code, is refused before sending; a player's or an agent's code is still redeemed
with no key throughOWJoin.RedeemAsync. Mirrors the TypeScript SDK'sacceptJoin()(4.12.0).- A world's invite links, for its owner on an account token:
OWClient.CreateWorldLinkAsync(worldId, link)(POST
/account/worlds/{id}/links) from anOWWorldLinkCreate(Readerperson,agentorplayer, required;Role,
Days,InviterName,WithCharacter,Character,Preview,MaxUsesand a table'sCharacters, each sent
only when given, in keel's spelling), answered asOWWorldLinkCreatedwith the code, the link and the line to
send, shown this once;ListWorldLinksAsync(worldId), the links asOWWorldLinkrows with no code (Status,
Uses, a player link'sCharacter, a table'sMaxUses,CharactersandIsTable); and
RevokeWorldLinkAsync(worldId, linkId), a 204. The Bearer alone; any other key, a null link and a link with no
reader are refused before sending. Mirrors the TypeScript SDK'screateWorldLink(),listWorldLinks()and
revokeWorldLink()(4.24.0). - Seats for your own AI, on an account token:
OWClient.CreateSeatAsync(worldId, name, role, character)(POST
/account/worlds/{id}/seats{name, role?, character?},characternew,noneormine) and
RekeySeatAsync(worldId, seatId)(POST …/seats/{seat_id}/key, no body: the old key and secret stop at once), each
answered asOWSeatCreatedwith the seat, its write key, itsow_s_secret and the.envlines, shown this
once;ListSeatsAsync(worldId), the live seats asOWSeatrows with no key (Name,Role,Character,
Sponsor,JoinedAt,LastActive); andRemoveSeatAsync(worldId, seatId), a 204. The Bearer alone, no
Idempotency-Key(keel takes none: a lost answer is mended with a rekey); any other key, and a seat with no name,
is refused before sending. Mirrors the TypeScript SDK'screateSeat(),listSeats(),removeSeat()(4.28.0) and
rekeySeat()(4.29.0). - Images, in two steps: a ticket from keel, then one POST to the upload host the ticket names, with the ticket alone
as its Bearer.OWClient.CreateMediaTicketAsync()(POST /media/ticket, no body) answers anOWMediaTicket
(Ticket,UploadUrl,Prefix,MaxBytes,Exp,Uses,IssuedTo);UploadImageAsync(bytes, key, ticket)asks
for one (or uses the one given) and POSTs the raw bytes to itsUploadUrlwithX-Keywhen a key is given,
answering the host'sOWUploadedImage(Url, the permanent public URL to set asimage_url,Key,Bytes,
Type,Etag).CreateRemovalTicketAsync(keyOrUrl)(POST /media/remove-ticket{key}, a wholeimage_urlcut to
its key) answers anOWRemovalTicket(Ticket,RemoveUrl,Exp,Key,Referenced), and
RemoveImageAsync(keyOrUrl, ticket)spends one at itsRemoveUrl, answeringOWRemovedImage(Removed,Bytes,
Cache). keel's requests go with the key and its PIN and no write header (keel's document lists none there); the
host's carry the ticket and nothing of this client's: no key, PIN, Bearer token, write header or Content-Type.
Bytes past the ticket'sMaxBytesare a 413too_largebefore any is sent; the host's refusals arrive as
OWApiErrorwith its code (ticket_used,exists,unsupported_type,not_removable, ...); a host that does not
answer is anOWTransportErrornaming its host, never the ticket. A null image, an empty key and a ticket with no
ticket or no absolute http(s) URL are refused before sending. Mirrors the TypeScript SDK'screateMediaTicket(),
uploadImage()(4.6.0),createRemovalTicket()andremoveImage()(4.8.0). - Files on elements:
OWClient.ListFilesAsync(type, id)(GET /{type}/{id}/files), the element's files newest first
asOWFileRows (Id,Name,Kind,Size,Label,AddedBywithName,MembershipandAgent,AddedAt);
WorldFilesAsync()(GET /world/files), every file the key may see asOWWorldFileRows (the row and its
ElementTypeandElementId) with the world'sUsedBytesofCapBytes;CreateFileTicketAsync(type, id, name, size, kind, label)(POST /{type}/{id}/files{name, kind, size, label?}), anOWFileTicket(the image ticket's
shape, with itsKey,KindandFileId);UploadFileAsync(type, id, bytes, name, kind, label, ticket, onProgress),
the ticket (with the bytes' length as its size) and then the raw bytes to itsUploadUrlwith the ticket alone,
answering the host'sOWUploadedFile(Key,Fid,Bytes,Type,Etag);FileDownloadLinkAsync(type, id, fileId)(GET …/files/{file_id}/download), anOWFileDownloadwhoseUrlis the credential untilExp; and
RemoveFileAsync(type, id, fileId)(DELETE …/files/{file_id}), a 204. The element's and the file's ids are
escaped. The ticket carries the PIN, noIdempotency-Key(keel's rule) and noX-OW-Client, and on an agent client
X-OW-Agent, the one files route keel's document lists it on; the other files routes and the upload host get no
write header. The kind is read from the name as keel reads it (OWFileKinds.Of, overOWFileKinds.Extensions:
.ymlis yaml,.markdownmd, case and folders ignored), and a name keel takes no file with, or none, is an
ArgumentExceptionnaming the extensions, before sending.onProgressis called once, with the total, when the
host has stored the file.OWApiError.IsFileTooLarge(413file_too_large),IsFilesFull(403files_full) and
IsQuotaExceeded(429quota_exceeded) are new. Mirrors the TypeScript SDK'slistFiles(),worldFiles(),
createFileTicket(),uploadFile(),fileDownloadLink()andremoveFile()(4.32.0;X-OW-Agenton the ticket
from 4.33.1), and itsFILE_EXTENSIONSandfileKindOf(4.33.0).
Changed
OWRequest.BodyBytes: a request may carry raw bytes instead of a JSONBody, set only on an upload to the media
host.UnityWebRequestTransportsends them as the body; a transport of your own must too, or an upload goes out
empty. The JSON path is unchanged.- An error answer whose
erroris a string ({"error": "ticket_used"}, the upload host's shape) reads the string as
OWApiError.Code, as the TypeScript SDK'sparseErrorEnvelopedoes; keel's envelope reads as before. - Schema pin to
v0.33.0-dist.100: the strand on the front door. The strand profile's rule 2 says the server's front
door (GET /meand an agent's join reply) servesreading_aids.strand, the six slots of the strand as that key
reads the world, six null slots when the world has none or its story is out of the key's view; the charter
profile's rule 2 orders the aids the Charter, the Guide, the Domains, then the strand. No fixture or schema file
moved; the generated models' headers move with the serial. - Schema pin to
v0.33.0-dist.99: the strand profile's mark relaxed (only the story's id required; the event and
the place null or absent read as unset, any other value there no mark) and its readings for a non-list multi-link,
a nameless slot and the public rung, nine new cases (26).OWStrand.Ofalready answered them so. - Schema pin to
v0.33.0-dist.98: the strand profile, new (profiles/strand.mdand its fixture, 17 cases): one
story in a world in miniature, named on the World byx_strand's three ids and read through four existing links.
No schema file moved; the generated models' headers move with the serial. OWClient.GetAsync<T>takesexpand,fieldsandviewAs, afterctso a caller passing it by position keeps
working: sent asexpandandfields(joined by commas) andas, in the TypeScript SDK's order, besideworld=
on a client withWorldset; null or empty sends nothing. Until now a single get could send none of them. Mirrors
the TypeScript SDK'sgetoptions (viewAsfrom 4.37.0).OWListParamstakesExpand,Ids,CreatedByandViewAs, soListAsyncand every page ofListAllAsyncsend
expandandids(joined by commas),created_by(a membership id orowner) andas(view as), in the
TypeScript SDK's order (limit,cursor,expand,fields,ids,created_by, the filters,aslast), beside
world=on a client withWorldset; null or empty sends nothing. Until now they went only throughFilter,
untyped. AFilterkey that a typed member sends in the same request (limit, always;idswithIdsset;as
withViewAs; and so on) is now anArgumentExceptionbefore sending, where it went out twice; one whose member is
not set still goes once. Mirrors the TypeScript SDK'slistoptionsids,createdBy,expandandviewAs
(viewAsfrom 4.37.0).OWListParams.Filterrefuses aworldkey with anArgumentExceptionbefore sending, on every client and on
every page ofListAllAsync: it would go out beside the client's ownworld=, or to a world key that answers 422.
The world an account token or a keyless client reads isOWClientConfig.World. Mirrors the TypeScript SDK's
list()refusal (4.88.0).OWClient.SetMyLensesAsyncandSetMemberLensesAsynctake a null list: sent as{"lenses": null}, it puts the
list back to never chosen, so a seat playing a Character starts with its Titles' lenses again, while an empty list
keeps it off them (on the owner's own list null is the empty list). Until now a null was an
ArgumentNullException, so a list once chosen could not be put back from Unity. Mirrors the TypeScript SDK's
setMyLenses(null)andsetMemberLenses(world, member, null)(4.99.0).OWClient.ChangesAsynctakesafter(aDateTimeOffset, last, so a caller passingctby position keeps
working): only the changes made at or after that time, sent asafterin UTC to the microsecond (a finer fraction
is cut, never rounded up), besidesinceandlimit. A filter, not a position: pass each page's cursor back with
the sameafterto read the whole window. WithheadOnlyit is anArgumentExceptionbefore sending. Mirrors the
TypeScript SDK'safteronchanges()(4.44.0).- Schema pin to
v0.33.0-dist.97: the address profile's four format cases on an empty string, one per part (an
empty world, type, id or lens refuses by that part's own reason; only null or a missing key is absent), which
OWAddressalready answered so.