calendar

package
v1.0.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package calendar 日历

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attendees

func Attendees(ctx *feishu.App, payload []byte, params url.Values) (resp []byte, err error)

邀请/移除日程参与者

邀请一个或多个用户加入日程; 从日程移除一个或多个用户。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uIjM14iMyUjLyITN

POST https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/events/:eventId/attendees

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	params := url.Values{}
	resp, err := calendar.Attendees(ctx, payload, params)

	fmt.Println(resp, err)
}
Output:

func CalendarList

func CalendarList(ctx *feishu.App, params url.Values) (resp []byte, err error)

获取日历列表

该接口用于获取应用在企业内的日历列表。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uMTM14yMxUjLzETN

GET https://open.feishu.cn/open-apis/calendar/v3/calendar_list

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.CalendarList(ctx, params)

	fmt.Println(resp, err)
}
Output:

func CreateAcl

func CreateAcl(ctx *feishu.App, payload []byte, params url.Values) (resp []byte, err error)

创建访问控制

该接口用于邀请一个用户加入日历。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uQjM14CNyUjL0ITN

POST https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/acl

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	params := url.Values{}
	resp, err := calendar.CreateAcl(ctx, payload, params)

	fmt.Println(resp, err)
}
Output:

func CreateCalendars

func CreateCalendars(ctx *feishu.App, payload []byte) (resp []byte, err error)

创建日历

该接口用于为应用在企业内创建一个日历。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uQTM14CNxUjL0ETN

POST https://open.feishu.cn/open-apis/calendar/v3/calendars

Example
package main

import (
	"fmt"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	resp, err := calendar.CreateCalendars(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func CreateEvent

func CreateEvent(ctx *feishu.App, payload []byte, params url.Values) (resp []byte, err error)

创建日程

该接口用于在日历中创建一个日程。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ugTM14COxUjL4ETN

POST https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/events

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	params := url.Values{}
	resp, err := calendar.CreateEvent(ctx, payload, params)

	fmt.Println(resp, err)
}
Output:

func DeleteAcl

func DeleteAcl(ctx *feishu.App, params url.Values) (resp []byte, err error)

删除访问控制

该接口用于从日历中移除一个用户。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uUjM14SNyUjL1ITN

DELETE https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/acl/:ruleId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.DeleteAcl(ctx, params)

	fmt.Println(resp, err)
}
Output:

func DeleteCalendarById

func DeleteCalendarById(ctx *feishu.App, params url.Values) (resp []byte, err error)

删除日历

该接口用于删除应用在企业内的指定日历。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uUTM14SNxUjL1ETN

DELETE https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.DeleteCalendarById(ctx, params)

	fmt.Println(resp, err)
}
Output:

func DeleteEventById

func DeleteEventById(ctx *feishu.App, params url.Values) (resp []byte, err error)

删除日程

该接口用于删除指定日历下的日程。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uAjM14CMyUjLwITN

DELETE https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/events/:eventId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.DeleteEventById(ctx, params)

	fmt.Println(resp, err)
}
Output:

func FreeBusyQuery

func FreeBusyQuery(ctx *feishu.App, payload []byte) (resp []byte, err error)

查询日历的忙闲状态

该接口用于查询指定日历或用户主日历的忙闲状态。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uYjM14iNyUjL2ITN

POST https://open.feishu.cn/open-apis/calendar/v3/freebusy/query

Example
package main

import (
	"fmt"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	resp, err := calendar.FreeBusyQuery(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func GetAcl

func GetAcl(ctx *feishu.App, params url.Values) (resp []byte, err error)

获取访问控制列表

该接口用于查看指定日历的成员列表。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uMjM14yMyUjLzITN

GET https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/acl

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.GetAcl(ctx, params)

	fmt.Println(resp, err)
}
Output:

func GetCalendarById

func GetCalendarById(ctx *feishu.App, params url.Values) (resp []byte, err error)

获取日历

该接口用于根据日历 ID 获取日历信息。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uMDN04yM0QjLzQDN

GET https://open.feishu.cn/open-apis/calendar/v3/calendar_list/:calendarId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.GetCalendarById(ctx, params)

	fmt.Println(resp, err)
}
Output:

func GetEventById

func GetEventById(ctx *feishu.App, params url.Values) (resp []byte, err error)

获取日程

该接口用于获取指定日历下的指定日程。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ucTM14yNxUjL3ETN

GET https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/events/:eventId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.GetEventById(ctx, params)

	fmt.Println(resp, err)
}
Output:

func GetEvents

func GetEvents(ctx *feishu.App, params url.Values) (resp []byte, err error)

获取日程列表

该接口用于获取指定日历下的日程列表。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ukTM14SOxUjL5ETN

GET https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/events

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.GetEvents(ctx, params)

	fmt.Println(resp, err)
}
Output:

func SharedCalendarEvents

func SharedCalendarEvents(ctx *feishu.App, params url.Values) (resp []byte, err error)

获取公共日历日程列表

该接口用于获取公共日历下的日程列表。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uIzNwYjLycDM24iM3AjN

GET https://open.feishu.cn/open-apis/calendar/v3/shared/calendars/:calendarId/events

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.SharedCalendarEvents(ctx, params)

	fmt.Println(resp, err)
}
Output:

func SharedCalendarQuery

func SharedCalendarQuery(ctx *feishu.App, params url.Values) (resp []byte, err error)

查询公共日历

该接口用于通过关键字查询公共日历信息。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/ukDMwYjL5ADM24SOwAjN

GET https://open.feishu.cn/open-apis/calendar/v3/shared_calendar_list/shared_calendar/query?query=ByteDance

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := calendar.SharedCalendarQuery(ctx, params)

	fmt.Println(resp, err)
}
Output:

func UpdateCalendarById

func UpdateCalendarById(ctx *feishu.App, payload []byte, params url.Values) (resp []byte, err error)

更新日历

该接口用于修改指定日历的信息。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uYTM14iNxUjL2ETN

PATCH https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	params := url.Values{}
	resp, err := calendar.UpdateCalendarById(ctx, payload, params)

	fmt.Println(resp, err)
}
Output:

func UpdateEventById

func UpdateEventById(ctx *feishu.App, payload []byte, params url.Values) (resp []byte, err error)

更新日程

该接口用于更新日程信息。

See: https://open.feishu.cn/document/ugTM5UjL4ETO14COxkTN/uEjM14SMyUjLxITN

PATCH https://open.feishu.cn/open-apis/calendar/v3/calendars/:calendarId/events/:eventId

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/capabilities/calendar"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	params := url.Values{}
	resp, err := calendar.UpdateEventById(ctx, payload, params)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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