msftgraph

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Short    string   `json:"a"`
	Notebook Notebook `json:"n"`
	Section  Section  `json:"s"`
}

Represents a section alias

type AliasName

type AliasName string

type Api

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

func NewApi

func NewApi(r rest.Requester, msftgraphApiUrl string) Api

func (*Api) GetContent

func (a *Api) GetContent(token oauthv2.OAuthToken, notepage NotePage) ([]byte, HttpStatusCode, error)

Returns the page content as string

type HttpStatusCode

type HttpStatusCode = rest.HttpStatusCode

type NotePage

type NotePage struct {
	Section    Section
	Title      string `json:"title"`
	Content    string
	ContentUrl string `json:"contentUrl"`
	Links      struct {
		OneNoteClientURL struct {
			Href string `json:"href"`
		} `json:"oneNoteClientUrl"`
		OneNoteWebURL struct {
			Href string `json:"href"`
		} `json:"oneNoteWebUrl"`
	} `json:"links"`
	ParentSection        Section   `json:"parentSection"`
	LastModifiedDateTime time.Time `json:"lastModifiedDateTime"`
}

Represents a note page

func NewNotePage

func NewNotePage(s Section, t string, c string) *NotePage

type Notebook

type Notebook struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName"`
	SectionsUrl string `json:"sectionsUrl"`
}

Represents a onenote notebook

type NotebookName

type NotebookName string

type Section

type Section struct {
	Name     string    `json:"displayName"`
	ID       string    `json:"id"`
	Notebook *Notebook `json:"parentNotebook"`
}

Represents a section in a notebook

type SectionName

type SectionName string

Jump to

Keyboard shortcuts

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