Skip to content

Commit

Permalink
Merge pull request #1 from baidu/first-commit-for-tp-sdk
Browse files Browse the repository at this point in the history
First commit for tp sdk
  • Loading branch information
Wayne Dingawm authored Mar 30, 2022
2 parents 7457e94 + 04e5cb5 commit 9f94342
Show file tree
Hide file tree
Showing 302 changed files with 14,622 additions and 69 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
百度智能小程序服务端 OpenAPI SDK for go,是基于小程序服务端 OpenAPI 封装的一套让开发者方便使用的 SDK, 它可以帮开发者减少理解和使用 OpenAPI 的成本, 减少开发者直接调用服务端接口不当而引起的错误, 避免在开发中走弯路。

## 快速开始
1. 在您的项目中引入 github.com/baidu/smartapp-openapi-go v0.1.1
2. 可以直接调用 openapi 下您需要的SDK函数
3. 函数具体功能参考文档: https://smartprogram.baidu.com/docs/develop/serverapi/introduction_for_openapi_sdk/
1. 在您的项目中引入 `github.com/baidu/smartapp-openapi-go v0.1.1`
2. 可以直接调用 openapi 下您需要的 SDK 函数
3. 函数具体功能参考文档:
- 开发者:https://smartprogram.baidu.com/docs/develop/serverapi/introduction_for_openapi_sdk/
- 第三方平台:https://smartprogram.baidu.com/docs/third/introduction_for_thirdparty_sdk/

## 测试
如果您要进行单个API的测试
1. 直接进入到 examples 目录,找到您想调用函数名字的文件夹,
2. 进入目录后, 根据文档提示说明修改API对应的参数
3. 保存直接使用" go run main.go" 来运行,最终结果会输出到当前屏幕。
如果您要进行单个 API 的测试
1. 直接进入到 `examples` 目录,找到您想调用函数名字的文件夹,
2. 进入目录后, 根据文档提示说明修改该 API 对应的参数
3. 保存直接使用 `go run main.go` 来运行,最终结果会输出到当前屏幕。

## 联系我们
如流群号 "5702992", 如流下载地址:https://infoflow.baidu.com/
1 change: 0 additions & 1 deletion doc_examples/addCouponBanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/addMaterial/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/addOrderInfo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/addOrderSubInfo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/addTemplate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/applyOrderRefund/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/batchGetCoupon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/batchGetCouponBanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/batchUploadCouponCode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/cancelOrder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/capitaBill/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/checkImage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"fmt"
"os"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/checkPath/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/checkText/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/consumeCouponCode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/createCoupon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/customSend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteCoupon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteCouponBanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteMaterial/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteResource/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteSitemap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteSku/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteSkuCoupon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/deleteTemplate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/detectRisk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/findByTpOrderId/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/findOrderRefund/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getAccessToken/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getCommentCount/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getCommentList/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getCoupon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getCouponBanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getLikeCount/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getPathCheckResultByID/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getQrCode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getSessionKey/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getSessionKeyv2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getTemplateLibraryById/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getTemplateLibraryList/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getTemplateList/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getUnionid/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/getUnlimitedQrCode/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/misjudgeFeedback/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/modifyMaterial/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
1 change: 0 additions & 1 deletion doc_examples/orderBill/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"fmt"

// github.com/baidu/smartapp-openapi-go/openapi 为示例项目名,实际使用时需要替换为实际的项目名
"github.com/baidu/smartapp-openapi-go/openapi"
)

Expand Down
Loading

0 comments on commit 9f94342

Please sign in to comment.