Repository navigation
OnlyWorlds Unity SDK 0.7.0
Join a world by link, read the one-file export and write it as a folder, and an export's world.json says where it
came from and which slice it is (folder format v0.3.9). A minor release because it adds public API (below).
Added
- Joining a world by link (keel #212, #353):
OWJoin.ParseLink(text)finds theow_j_code in a pasted link or
a bare code;OWJoin.PreviewAsync(code, transport)(POST/join/preview) says who invites, to which world, for
which reader, without spending the code;OWJoin.RedeemAsync(code, transport, name?, agentName?)(POST/join)
spends it. A player's code answers with a read key (ow_r_, no PIN) and the Character it reads as; an agent's with
a seat's write key and secret. Both send no credential, so they sit besideOWClient, which cannot be built
without a key; npm'spreviewJoinandredeemJoinare the same wire. Every bad code is keel's one 404
not_found(OWApiError.IsNotFound). The wire check records both calls (12 now). - The one-file world export (
format: onlyworlds-world-export, spec §8c), the file an owner downloads from a
world's page:OWEnvelopeReader.Read(path)/Parse(json)give a folder read's result (OWEnvelopeReadResult,
with the file'sFormat,SchemaVersionandExportedAt), andOWEnvelopeLoader.LoadInto(cache, path)fills a
read-only cache. The reader keys onformatalone;schema_version(the standard's version the elements follow)
is kept as information, never checked. An element with no id is skipped and reported, as in a folder. The test
fixture is keel's own emitter output, published in schema-dist (example/world-export.json, serial 25) and vendored
byte for byte; a test holds its hash to the dist's MANIFEST. - The one-file export as a world folder:
OWFolderExport.ExportFileAsync(path, folder, options?, progress?, ct?)
writes the downloaded file as the same folderExportAsyncwrites from the API (bodies as the file holds them, every
key of its world carried intoworld.json, each Map's image fetched from itsimage_url), born whole or not at all.
What a folder cannot keep whole is refused, not skipped: an element with no id, a type that is not the standard's,
one id under two types. - The provenance lines (folder format v0.3.9, §4.2): an API export's
world.jsonnow carriessource
({server, world, at}: the API's origin, the world's id, when the export began, astoISOStringwrites it) and,
whenGET /mesays which slice the key reads,exported_as({kind, role, character}), after the wire's keys, as
the Python package'sexport_worldwrites them (0.7.0).OWFolderExport.ExportedAs(me, characterName)is the
spec owner's table in one place; a refused/me, or a guest whose Character cannot be read, writes none. New:
OWClient.GetMeAsync(GET/me/, in the wire check: 13 calls),OWFolderExportOptions.Clock.
Changed
- An export declares folder format
0.3.9(OWFolderExport.FormatVersion), as the package's 0.7.0 does.