package microsoft
import "git.sr.ht/~shulhan/pakakeh.go/lib/contact/microsoft"
Package microsoft implement Microsoft's Live contact API v1.0.
Reference
- https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_contacts
Index ¶
- func ImportFromJSON(jsonb []byte) ( contacts []*contact.Record, err error, )
- func ImportWithOAuth(client *http.Client) (contacts []*contact.Record, err error)
- type Address
- type Contact
- type Email
- type Root
Functions ¶
func ImportFromJSON ¶
ImportFromJSON will parse Microsoft Live's JSON contact response and return list of contact on success.
func ImportWithOAuth ¶
ImportWithOAuth get Microsoft Live contacts using OAuth HTTP client.
Types ¶
type Address ¶
type Address struct { Street string `json:"street,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"countryOrRegion,omitempty"` PostalCode string `json:"postalCode,omitempty"` }
Address format on response.
type Contact ¶
type Contact struct { Birthday string `json:"birthday,omitempty"` DisplayName string `json:"displayName,omitempty"` GivenName string `json:"givenName,omitempty"` Initials string `json:"initials,omitempty"` MiddleName string `json:"middleName,omitempty"` NickName string `json:"nickName,omitempty"` SurName string `json:"surname,omitempty"` Title string `json:"title,omitempty"` Generation string `json:"generation,omitempty"` JobTitle string `json:"jobTitle,omitempty"` Company string `json:"companyName,omitempty"` Department string `json:"department,omitempty"` OfficeLocation string `json:"officeLocation,omitempty"` Profession string `json:"profession,omitempty"` BusinessHomePage string `json:"businessHomePage,omitempty"` AssistantName string `json:"assistantName,omitempty"` Manager string `json:"manager,omitempty"` MobilePhone string `json:"mobilePhone,omitempty"` SpouseName string `json:"spouseName,omitempty"` PersonalNotes string `json:"personalNotes,omitempty"` HomeAddress Address `json:"homeAddress,omitempty"` BusinessAddress Address `json:"businessAddress,omitempty"` OtherAddress Address `json:"otherAddress,omitempty"` IMAddresses []string `json:"imAddresses,omitempty"` HomePhones []string `json:"homePhones,omitempty"` BusinessPhones []string `json:"businessPhones,omitempty"` Children []string `json:"children,omitempty"` Emails []Email `json:"emailAddresses,omitempty"` }
Contact define Microsoft Live's contact format.
Some of the fields are disabled for speed up.
func (*Contact) Decode ¶
Decode will convert Microsoft's Contact to our Contact format.
type Email ¶
Email format on response.
type Root ¶
Root of response.
Source Files ¶
address.go contact.go email.go microsoft.go root.go
- Version
- v0.60.0 (latest)
- Published
- Feb 1, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 9 hours ago –
Tools for package owners.