How to attach meta data via Webplugins

  • 11 May 2020
  • 3 replies

Userlevel 1
Badge +2

I know you can add metadata through the API, but I cannot find documentation on how to add meta data via web plugins, I’d like to add a “session_id” to the group of objects I create via a single button and I need a way to group them up for future use.


Best answer by Falk Kühnel 11 May 2020, 14:40

View original

3 replies

Userlevel 2
Badge +2

Hi safis!

It is quite simple, just add the metadata, when you create the widgets. 

const APP_ID = '123456789'; // your app id

type: "image",
url: URL_ROOT + "cards/" + cardName + ".jpg",
metadata: {
[APP_ID]: {
card: true,
cardName: cardName
x: deck.x,
y: deck.y,
rotation: deck.rotation

Have fun!


Userlevel 2
Badge +2

By the way, the “code” item here sucks. It just reformats really badly.

Userlevel 1
Badge +2

ah I did try that once but did it meta_data, welp my years of ruby programming has got the best of me