mt

package
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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MiddleTier = "https://teams.microsoft.com/api/mt/"

Variables

This section is empty.

Functions

func GetTokenEmail

func GetTokenEmail(token *api.TeamsToken) (string, error)

Types

type Service

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

func NewMiddleTierService

func NewMiddleTierService(region api.Region, token *api.TeamsToken, teamsToken *api.TeamsToken) (*Service, error)

func (*Service) AuthenticatedRequest

func (m *Service) AuthenticatedRequest(method, url string, body io.Reader) (*http.Request, error)

func (*Service) CookieRequest

func (m *Service) CookieRequest(method, url string, body io.Reader) (*http.Request, error)

func (*Service) DebugDisallowUnknownFields

func (m *Service) DebugDisallowUnknownFields(flag bool)

func (*Service) DebugSave

func (m *Service) DebugSave(flag bool)

func (*Service) FetchShortProfile

func (m *Service) FetchShortProfile(mri ...string) ([]models.User, error)

func (*Service) GetMe

func (m *Service) GetMe() (*models.User, error)

func (*Service) GetProfilePicture

func (m *Service) GetProfilePicture(emailOrId string) ([]byte, error)

func (*Service) GetTeamsProfilePicture

func (m *Service) GetTeamsProfilePicture(emailOrId string) ([]byte, error)

TODO: Test and check why it returns a 401

func (*Service) GetTenants

func (m *Service) GetTenants() ([]models.Tenant, error)

func (*Service) GetUser

func (m *Service) GetUser(email string) (*models.User, error)

func (*Service) GetVerifiedDomains

func (m *Service) GetVerifiedDomains() (*[]VerifiedDomain, error)

type VerifiedDomain

type VerifiedDomain struct {
	Name string
}

Jump to

Keyboard shortcuts

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