Skip to main content
Answered

How to attach meta data via Webplugins


Forum|alt.badge.img+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

Hi safis!

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

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

miro.board.widgets.create({
 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!

Falk

View original
Was it helpful?

3 replies

Falk Kühnel
Forum|alt.badge.img+2
  • Active Contributor
  • 33 replies
  • Answer
  • May 11, 2020

Hi safis!

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

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

miro.board.widgets.create({
 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!

Falk


Falk Kühnel
Forum|alt.badge.img+2
  • Active Contributor
  • 33 replies
  • May 11, 2020

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


Forum|alt.badge.img+2
  • Author
  • Beginner
  • 6 replies
  • May 11, 2020

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


Reply