Leszek Wiesner 0804bfbb34 Fix checks - remove StorageProviderRecord and run formatter on protobuf library 3 년 전
..
compiled 9bcfd361c6 protobuf package: prepublish build 3 년 전
doc 41af8a4ff0 content directory: playlist videos in metadata 3 년 전
proto 41af8a4ff0 content directory: playlist videos in metadata 3 년 전
src 0804bfbb34 Fix checks - remove StorageProviderRecord and run formatter on protobuf library 3 년 전
test ad2040b2e0 Fix Licence typo 3 년 전
.eslintignore b68e329495 content-metadata: rename package to content-metadata-protobuf 3 년 전
.eslintrc.js b68e329495 content-metadata: rename package to content-metadata-protobuf 3 년 전
.gitignore b68e329495 content-metadata: rename package to content-metadata-protobuf 3 년 전
.prettierignore b68e329495 content-metadata: rename package to content-metadata-protobuf 3 년 전
README.md 12844e2fb5 protobuf: update README and scripts 3 년 전
compile.sh 12844e2fb5 protobuf: update README and scripts 3 년 전
doc-appendix.md 12844e2fb5 protobuf: update README and scripts 3 년 전
generate-md-doc.sh ee49f91d3e protobuf messages: use date for published before joystream, improve docs re oob array 3 년 전
package.json b55323dfe6 CLI checks - add metadata build 3 년 전
tsconfig.json b68e329495 content-metadata: rename package to content-metadata-protobuf 3 년 전

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