socialcache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	SteamId     SteamId `json:",string"`
	GroupId     SteamId `json:",string"`
	ChatMembers map[SteamId]ChatMember
}

A Chat

type ChatMember

type ChatMember struct {
	SteamId         SteamId `json:",string"`
	ChatPermissions EChatPermission
	ClanPermissions EClanPermission
}

A Chat Member

type ChatsList

type ChatsList struct {
	// contains filtered or unexported fields
}

Chats list is a thread safe map They can be iterated over like so:

for id, chat := range client.Social.Chats.GetCopy() {
	log.Println(id, chat.Name)
}

func NewChatsList

func NewChatsList() *ChatsList

Returns a new chats list

func (*ChatsList) Add

func (list *ChatsList) Add(chat Chat)

Adds a chat to the chat list

func (*ChatsList) AddChatMember

func (list *ChatsList) AddChatMember(id SteamId, member ChatMember)

Adds a chat member to a given chat

func (*ChatsList) ById

func (list *ChatsList) ById(id SteamId) (Chat, error)

Returns a copy of the chat of a given SteamId

func (*ChatsList) Count

func (list *ChatsList) Count() int

Returns the number of chats

func (*ChatsList) GetCopy

func (list *ChatsList) GetCopy() map[SteamId]Chat

Returns a copy of the chats map

func (*ChatsList) Remove

func (list *ChatsList) Remove(id SteamId)

Removes a chat from the chat list

func (*ChatsList) RemoveChatMember

func (list *ChatsList) RemoveChatMember(id SteamId, member SteamId)

Removes a chat member from a given chat

type Friend

type Friend struct {
	SteamId           SteamId `json:",string"`
	Name              string
	Avatar            string
	Relationship      EFriendRelationship
	PersonaState      EPersonaState
	PersonaStateFlags EPersonaStateFlag
	GameAppId         uint32
	GameId            uint64 `json:",string"`
	GameName          string
}

A Friend

type FriendsList

type FriendsList struct {
	// contains filtered or unexported fields
}

Friends list is a thread safe map They can be iterated over like so:

for id, friend := range client.Social.Friends.GetCopy() {
	log.Println(id, friend.Name)
}

func NewFriendsList

func NewFriendsList() *FriendsList

Returns a new friends list

func (*FriendsList) Add

func (list *FriendsList) Add(friend Friend)

Adds a friend to the friend list

func (*FriendsList) ById

func (list *FriendsList) ById(id SteamId) (Friend, error)

Returns a copy of the friend of a given SteamId

func (*FriendsList) Count

func (list *FriendsList) Count() int

Returns the number of friends

func (*FriendsList) GetCopy

func (list *FriendsList) GetCopy() map[SteamId]Friend

Returns a copy of the friends map

func (*FriendsList) Remove

func (list *FriendsList) Remove(id SteamId)

Removes a friend from the friend list

func (*FriendsList) SetAvatar

func (list *FriendsList) SetAvatar(id SteamId, hash string)

func (*FriendsList) SetGameAppId

func (list *FriendsList) SetGameAppId(id SteamId, gameappid uint32)

func (*FriendsList) SetGameId

func (list *FriendsList) SetGameId(id SteamId, gameid uint64)

func (*FriendsList) SetGameName

func (list *FriendsList) SetGameName(id SteamId, name string)

func (*FriendsList) SetName

func (list *FriendsList) SetName(id SteamId, name string)

Setter methods

func (*FriendsList) SetPersonaState

func (list *FriendsList) SetPersonaState(id SteamId, state EPersonaState)

func (*FriendsList) SetPersonaStateFlags

func (list *FriendsList) SetPersonaStateFlags(id SteamId, flags EPersonaStateFlag)

func (*FriendsList) SetRelationship

func (list *FriendsList) SetRelationship(id SteamId, relationship EFriendRelationship)

type Group

type Group struct {
	SteamId             SteamId `json:",string"`
	Name                string
	Avatar              string
	Relationship        EClanRelationship
	MemberTotalCount    uint32
	MemberOnlineCount   uint32
	MemberChattingCount uint32
	MemberInGameCount   uint32
}

A Group

type GroupsList

type GroupsList struct {
	// contains filtered or unexported fields
}

Groups list is a thread safe map They can be iterated over like so:

for id, group := range client.Social.Groups.GetCopy() {
	log.Println(id, group.Name)
}

func NewGroupsList

func NewGroupsList() *GroupsList

Returns a new groups list

func (*GroupsList) Add

func (list *GroupsList) Add(group Group)

Adds a group to the group list

func (*GroupsList) ById

func (list *GroupsList) ById(id SteamId) (Group, error)

Returns a copy of the group of a given SteamId

func (*GroupsList) Count

func (list *GroupsList) Count() int

Returns the number of groups

func (*GroupsList) GetCopy

func (list *GroupsList) GetCopy() map[SteamId]Group

Returns a copy of the groups map

func (*GroupsList) Remove

func (list *GroupsList) Remove(id SteamId)

Removes a group from the group list

func (*GroupsList) SetAvatar

func (list *GroupsList) SetAvatar(id SteamId, hash string)

func (*GroupsList) SetMemberChattingCount

func (list *GroupsList) SetMemberChattingCount(id SteamId, count uint32)

func (*GroupsList) SetMemberInGameCount

func (list *GroupsList) SetMemberInGameCount(id SteamId, count uint32)

func (*GroupsList) SetMemberOnlineCount

func (list *GroupsList) SetMemberOnlineCount(id SteamId, count uint32)

func (*GroupsList) SetMemberTotalCount

func (list *GroupsList) SetMemberTotalCount(id SteamId, count uint32)

func (*GroupsList) SetName

func (list *GroupsList) SetName(id SteamId, name string)

Setter methods

func (*GroupsList) SetRelationship

func (list *GroupsList) SetRelationship(id SteamId, relationship EClanRelationship)

Jump to

Keyboard shortcuts

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