teams_api

package module
v0.0.0-...-60cd5c1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 6 Imported by: 1

README

teams-api

An unofficial wrapper for the unofficial Microsoft Teams API

Description

This library (still work in progress) was created with the goal of helping the creation of alternative (and open source) Microsoft Teams clients. Currently, the library itself can only handle a couple of endpoints and is by far not ready yet.
My goal is to complete this library as soon as possible and start the creation of an alternative client based on it.

Usage

For now, you can only run the tests or use the library on your own. For this you'll need a couple of Microsoft Teams tokens.

Obtaining a token

Using teams-token one can obtain (and automatically save) the tokens necessary for this library to work.
Simply clone and yarn start that repository to get your Teams tokens stored into:

/home/user/.config/fossteams/token-chatsvcagg.jwt
/home/user/.config/fossteams/token-skype.jwt
/home/user/.config/fossteams/token-teams.jwt

With these tokens, you'll be able to test out some features like the GetConversations test that retrieves a list of Teams your user is connected with.

Testing out

I have created a Microsoft Team org with the free version that you can join and test out / help debugging / improve this library with.

This would also be interesting because we can use it as a platform to discuss the API / CLI and it will help us implement more features related to multi-tenancy.

Join us now

Projects using this library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TeamsClient

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

func New

func New() (*TeamsClient, error)

func (*TeamsClient) ChatSvc

func (t *TeamsClient) ChatSvc() *csa.CSASvc

func (*TeamsClient) Debug

func (t *TeamsClient) Debug(debugFlag bool)

func (*TeamsClient) FetchShortProfile

func (t *TeamsClient) FetchShortProfile(mris []string) ([]models.User, error)

func (*TeamsClient) GetConversations

func (t *TeamsClient) GetConversations() (*models.ConversationResponse, error)

func (*TeamsClient) GetMe

func (t *TeamsClient) GetMe() (*models.User, error)

func (*TeamsClient) GetMessages

func (t *TeamsClient) GetMessages(channel *models.Channel) ([]models.ChatMessage, error)

func (*TeamsClient) GetPinnedChannels

func (t *TeamsClient) GetPinnedChannels() ([]csa.ChannelId, error)

func (*TeamsClient) GetProfilePicture

func (t *TeamsClient) GetProfilePicture(emailOrId string) ([]byte, error)

func (*TeamsClient) GetTeamsProfilePicture

func (t *TeamsClient) GetTeamsProfilePicture(emailOrId string) ([]byte, error)

func (*TeamsClient) GetTenants

func (t *TeamsClient) GetTenants() ([]models.Tenant, error)

Directories

Path Synopsis
pkg
csa
mt

Jump to

Keyboard shortcuts

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