Mokhtar Naamani 8974e22401 protobuf: add persons to Series and Season metadata hace 4 años
..
compiled 8974e22401 protobuf: add persons to Series and Season metadata hace 4 años
doc 8974e22401 protobuf: add persons to Series and Season metadata hace 4 años
proto 8974e22401 protobuf: add persons to Series and Season metadata hace 4 años
src 21bcd6625c note about factoring out licences helper methods hace 4 años
test e19e1f677e content-dir: do not track Person in video in runtime hace 4 años
.eslintignore b68e329495 content-metadata: rename package to content-metadata-protobuf hace 4 años
.eslintrc.js b68e329495 content-metadata: rename package to content-metadata-protobuf hace 4 años
.gitignore b68e329495 content-metadata: rename package to content-metadata-protobuf hace 4 años
.prettierignore b68e329495 content-metadata: rename package to content-metadata-protobuf hace 4 años
README.md 12844e2fb5 protobuf: update README and scripts hace 4 años
compile.sh 12844e2fb5 protobuf: update README and scripts hace 4 años
doc-appendix.md 12844e2fb5 protobuf: update README and scripts hace 4 años
generate-md-doc.sh ee49f91d3e protobuf messages: use date for published before joystream, improve docs re oob array hace 4 años
package.json 12844e2fb5 protobuf: update README and scripts hace 4 años
tsconfig.json b68e329495 content-metadata: rename package to content-metadata-protobuf hace 4 años

README.md

Joystream Content Directory Metadata Library

This package contains protobuf message definitions compiled to Javascript/Typescript used for creating and updating various metadata blobs in the joystream content directory.

Message Specs

Documented in doc folder

Choice of protobuf protocol v2

For our usecase we wish to re-use same message to create and update subset of fields. For this reason we need the explicit information about wether a field has been set or not and this is only possible with proto v2.

Background: required/optional feilds are deprecated in proto v3

Helper methods

The custom Joystream types such as License have helper methods to construct pre-defined well known values.

Example code:

Best place to look at are the tests specs

Opaque types

We use simple ISO_639-1 code representation for Language. useful npm package https://www.npmjs.com/package/iso-639-1

Building the package

Building will compile the protofiles and build the library from source.

  • pre-requisists for compiling protofiles:

  • pre-requisists for generating documentation:

Generating docs

yarn generate-docs

Tests

yarn test