app_store

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

Documentation

Overview

Package app_store 应用信息/应用商店

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUser

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

查询用户是否在应用开通范围

该接口用于查询用户是否在企业管理员设置的使用该应用的范围中。如果设置的付费套餐是按人收费或者限制了最大人数,开放平台会引导企业管理员设置“付费功能开通范围”,本接口用于查询用户是否在企业管理员设置的使用该应用的范围中,可以通过此接口,在付费功能点入口判断是否允许某个用户进入使用。

See: https://open.feishu.cn/document/ukTMukTMukTM/uATNwUjLwUDM14CM1ATN

GET https://open.feishu.cn/open-apis/pay/v1/paid_scope/check_user?open_id=ou_5ad573a6411d72b8305fda3a9c15c70e

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/app/app_store"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := app_store.CheckUser(ctx, params)

	fmt.Println(resp, err)
}
Output:

func OrderGet

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

查询订单详情

该接口用于查询某个订单的具体信息

See: https://open.feishu.cn/document/ukTMukTMukTM/uITNwUjLyUDM14iM1ATN

GET https://open.feishu.cn/open-apis/pay/v1/order/get?order_id=6708978506916697671

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/app/app_store"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := app_store.OrderGet(ctx, params)

	fmt.Println(resp, err)
}
Output:

func OrderList

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

查询租户购买的付费方案

该接口用于分页查询应用租户下的已付费订单,每次购买对应一个唯一的订单,订单会记录购买的套餐的相关信息,业务方需要自行处理套餐的有效期和付费方案的升级。

See: https://open.feishu.cn/document/ukTMukTMukTM/uETNwUjLxUDM14SM1ATN

GET https://open.feishu.cn/open-apis/pay/v1/order/list?status=all&page_size=10&page_token=10&tenant_key=2e5c3a3ae38f175f

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/app/app_store"
)

func main() {
	var ctx *feishu.App

	params := url.Values{}
	resp, err := app_store.OrderList(ctx, 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