# SGroupInfo

## Index

### Properties Index

| Property Name                                |
| -------------------------------------------- |
| int [**ID** ](#id)`get`                      |
| int [**OwnerID** ](#ownerid)`get`            |
| string [**Name** ](#name)`get`               |
| string [**Description** ](#description)`get` |
| string [**Access** ](#access)`get`           |
| string [**ImageUrl** ](#imageurl)`get`       |
| int [**MaxAvatars** ](#maxavatars)`get`      |
| string [**Role** ](#role)`get`               |
| string [**CreateDate** ](#createdate)`get`   |

## Properties

### ID

int **ID** `get`

*The ID of the group.*

{% tabs %}
{% tab title="Lua" %}

```lua
ID = Space.Groups.GetGroupInfo(350).ID
```

{% endtab %}
{% endtabs %}

### OwnerID

int **OwnerID** `get`

*The ID of the group's owner.*

{% tabs %}
{% tab title="Lua" %}

```lua
OwnerID = Space.Groups.GetGroupInfo(350).OwnerID
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show canvas1 if you are a group's owner
--and will show canvas2 if you are not

thisObject = Space.Host.ExecutingObject

canvas1 = Space.Host.GetReference("canvas1")--Add this object with canvas as reference in Scripting Runtime
canvas2 = Space.Host.GetReference("canvas2")--Add this object with canvas as reference in Scripting Runtime


OnClickFunction = function()
  
local groupInfo = Space.Groups.GetGroupInfo(350)

  if groupInfo.OwnerID == Space.Scene.PlayerAvatar.ID then
    canvas1.Active = true
  else
    canvas2.Active = true
  end
  

end
```

{% endtab %}
{% endtabs %}

### Name

string **Name** `get`

*The name of the group.*

{% tabs %}
{% tab title="Lua" %}

```lua
Name = Space.Groups.GetGroupInfo(350).Name
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show group 355's Name on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()
  
GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.Name
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### Description

string **Description** `get`

*The description of the group.*

{% tabs %}
{% tab title="Lua" %}

```lua
Description =Space.Groups.GetGroupInfo(350).Description
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show group 355's Description on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()
  
GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.Description
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### Access

string **Access** `get`

*The level of access the group has, e.g. public or private.*

{% tabs %}
{% tab title="Lua" %}

```lua
Access = Space.Groups.GetGroupInfo(350).Access
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show group 355's Access on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()
  
GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.Access
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### ImageUrl

string **ImageUrl** `get`

*The URL of the group's image.*

{% tabs %}
{% tab title="Lua" %}

```lua
ImageUrl = Space.Groups.GetGroupInfo(350).ImageUrl
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show group 355's ImageUrl on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()
  
GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.ImageUrl
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### MaxAvatars

int **MaxAvatars** `get`

*The max number of members the group can have.*

{% tabs %}
{% tab title="Lua" %}

```lua
MaxAvatars = Space.Groups.GetGroupInfo(350).MaxAvatars
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show group 355's MaxAvatars on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()
  
GroupInfo = Space.Groups.GetGroupInfo(350)

uiText.Text = GroupInfo.MaxAvatars
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}

### Role

string **Role** `get`

*Player's role in this group.*

{% tabs %}
{% tab title="Lua" %}

```lua
Role = Space.Groups.GetGroupInfo(350).Role
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show canvas1 if you are a  VIP in the group
--and will show canvas2 if you are a regular member
--and will show canvas3 if you are the group owner

thisObject = Space.Host.ExecutingObject

canvas1 = Space.Host.GetReference("canvas1")--Add this object with canvas as reference in Scripting Runtime
canvas2 = Space.Host.GetReference("canvas2")--Add this object with canvas as reference in Scripting Runtime
canvas3 = Space.Host.GetReference("canvas3")--Add this object with canvas as reference in Scripting Runtime

OnClickFunction = function()
  
local groupInfo = Space.Groups.GetGroupInfo(350)

  if groupInfo.Role == "Owner" then
  canvas3.Active = true
  elseif groupInfo.Role == "VIP" then
  canvas1.Active = true
  elseif groupInfo.Role == "Normal" then
  canvas2.Active = true
  end

end
```

{% endtab %}
{% endtabs %}

### CreateDate

string **CreateDate** `get`

*Creation date of the group.*

{% tabs %}
{% tab title="Lua" %}

```lua
CreateDate = Space.Groups.GetGroupInfo(350).CreateDate
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Lua" %}

```lua
--Clicking this object will show group 355's creation date on a UIText object

thisObject = Space.Host.ExecutingObject
uiText = Space.Host.GetReference("text").UIText --Add this object with UIText component as reference in Scripting Runtime

OnClickFunction = function()
  
CreateDate = Space.Groups.GetGroupInfo(350).CreateDate

uiText.Text = CreateDate
end


thisObject.AddClickable()
thisObject.Clickable.OnClick(OnClickFunction)
```

{% endtab %}
{% endtabs %}
