Skip to content

OnlyWorlds Unity SDK 0.7.0

Choose a tag to compare

@tmoosting tmoosting released this 19 Oct 22:07
· 13 commits to main since this release

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 the ow_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 beside OWClient, which cannot be built
    without a key; npm's previewJoin and redeemJoin are 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's Format, SchemaVersion and ExportedAt), and OWEnvelopeLoader.LoadInto(cache, path) fills a
    read-only cache. The reader keys on format alone; 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 folder ExportAsync writes from the API (bodies as the file holds them, every
    key of its world carried into world.json, each Map's image fetched from its image_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.json now carries source
    ({server, world, at}: the API's origin, the world's id, when the export began, as toISOString writes it) and,
    when GET /me says which slice the key reads, exported_as ({kind, role, character}), after the wire's keys, as
    the Python package's export_world writes 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.