Tutorial: interop.getContextGroups

interop.getContextGroups

This is primarily used for platform windows. Views within a platform should not have to use this API.

Returns the Interop-Broker-defined context groups available for an entity to join.

response

[
    {
        id: 'green',
        displayMetadata: {
            color: '#00CC88',
            name: 'green'
        }
    },
    {
        id: 'purple',
        displayMetadata: {
            color: '#8C61FF',
            name: 'purple'
        }
    },
    {
        id: 'orange',
        displayMetadata: {
            color: '#FF8C4C',
            name: 'orange'
        }
    },
    {
        id: 'red',
        displayMetadata: {
            color: '#FF5E60',
            name: 'red'
        }
    },
    {
        id: 'pink',
        displayMetadata: {
            color: '#FF8FB8',
            name: 'pink'
        }
    },
    {
        id: 'yellow',
        displayMetadata: {
            color: '#E9FF8F',
            name: 'yellow'
        }
    }
];

Example

fin.me.interop.getContextGroups()
        .then(contextGroups => {
            contextGroups.forEach(contextGroup => {
                console.log(contextGroup.displayMetadata.name)
                console.log(contextGroup.displayMetadata.color)
            })
        })