Beta Servicer created.
This commit is contained in:
parent
0a111cd9df
commit
a9421d7195
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
|
||||
absser "github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
beta "github.com/microsoftgraph/msgraph-beta-sdk-go"
|
||||
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
@ -45,6 +46,28 @@ func (s Service) Client() *msgraphsdk.GraphServiceClient {
|
||||
return s.client
|
||||
}
|
||||
|
||||
// BetaService provides access to API Calls that are present solely in the Beta library.
|
||||
// Does not fulfill the interface as the base libraries vary.
|
||||
type BetaService struct {
|
||||
adapter *beta.GraphRequestAdapter
|
||||
client *beta.GraphBaseServiceClient
|
||||
}
|
||||
|
||||
func (bs BetaService) Adapter() *beta.GraphRequestAdapter {
|
||||
return bs.adapter
|
||||
}
|
||||
|
||||
func (bs BetaService) Client() *beta.GraphBaseServiceClient {
|
||||
return bs.client
|
||||
}
|
||||
|
||||
func NewBetaService(adapter *beta.GraphRequestAdapter) *BetaService {
|
||||
return &BetaService{
|
||||
adapter: adapter,
|
||||
client: beta.NewGraphBaseServiceClient(adapter),
|
||||
}
|
||||
}
|
||||
|
||||
// Seraialize writes an M365 parsable object into a byte array using the built-in
|
||||
// application/json writer within the adapter.
|
||||
func (s Service) Serialize(object absser.Parsable) ([]byte, error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user