group

package
v0.0.0-...-3322716 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package group provides functions to interact with Roblox groups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Description        string     `json:"description"`
	Id                 int        `json:"id"`
	IsBuildersClubOnly bool       `json:"isBuildersClubOnly"`
	MemberCount        int        `json:"memberCount"`
	Name               string     `json:"name"`
	PublicEntryAllowed bool       `json:"publicEntryAllowed"`
	Shout              *Shout     `json:"shout"`
	Owner              *user.User `json:"owner"`

	BotAccount *account.Account `json:"-"` // Don't encode account
}

The Group struct provides information about a Roblox group.

func Get

func Get(groupId int, acc *account.Account) (*Group, error)

The Get function retrieves info about a Roblox group.

func (Group) ChangeRank

func (c Group) ChangeRank(UserId int, Change int) (Role, Role, error)

func (Group) Demote

func (c Group) Demote(UserID int) (Role, Role, error)

func (Group) Exile

func (c Group) Exile(UserID int) error

func (Group) GetGroupPosts

func (c Group) GetGroupPosts(limit ...int) (<-chan []Post, <-chan error, error)

func (Group) GetGroupRoles

func (c Group) GetGroupRoles() ([]Role, error)

func (Group) GetJoinRequests

func (c Group) GetJoinRequests(limit ...int) (<-chan []JoinRequest, <-chan error, error)

func (Group) GetRoleInGroup

func (c Group) GetRoleInGroup(id int) (Role, error)

func (Group) GetShout

func (c Group) GetShout() (*Shout, error)

func (Group) PostShout

func (c Group) PostShout(shout string) error

func (Group) Promote

func (c Group) Promote(UserID int) (Role, Role, error)

func (Group) SetRank

func (c Group) SetRank(UserID, Id int) error

type JoinRequest

type JoinRequest struct {
	Group     *Group
	Created   time.Time `json:"created"`
	Requester Requester `json:"requester"`
}

JoinRequest represents a user who is pending to join a group

func (JoinRequest) Accept

func (r JoinRequest) Accept() error

func (JoinRequest) Decline

func (r JoinRequest) Decline() error

type Post

type Post struct {
	Id      int          `json:"id"`
	Poster  interiorPost `json:"poster"`
	Body    string       `json:"body"`
	Created time.Time    `json:"created"`
	Updated time.Time    `json:"updated"`
	Group   *Group
}

Post is the decoded value of a Post on a group wall

type Requester

type Requester struct {
	Username    string `json:"username"`
	DisplayName string `json:"displayName"`
	UserID      int    `json:"userId"`
}

Requester represents a subsection of a JoinRequest

type Role

type Role struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Rank        int    `json:"rank"`
	MemberCount int    `json:"memberCount"`
}

Role represents a Group Role

type Shout

type Shout struct {
	Content string `json:"body"`
	Created string `json:"created"`
	Updated string `json:"updated"`
	Poster  *user.User
}

The Shout struct provides information about a group shout.

type UserGroupRelation

type UserGroupRelation struct {
	RobloxGroup Group `json:"group"`
	RobloxRole  Role  `json:"role"`
}

UserGroupRelation represents a user's Role in a Group

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL