-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
1,253 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// CreateAndroid 创建Android应用 | ||
func CreateAndroid(clt *core.SDKClient, accessToken string, req *app.CreateAndroidRequest) (*app.App, error) { | ||
var resp app.App | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// CreateIos 创建iOS应用 | ||
func CreateIos(clt *core.SDKClient, accessToken string, req *app.CreateIosRequest) (*app.App, error) { | ||
var resp app.App | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// Detail 【应用中心】获取应用详情 | ||
func Detail(clt *core.SDKClient, accessToken string, req *app.DetailRequest) (*app.App, error) { | ||
var resp app.App | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Paackage app 应用相关 | ||
package app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// IosUpdate iOS 应用上报更新 | ||
func IosUpdate(clt *core.SDKClient, accessToken string, req *app.IosUpdateRequest) error { | ||
var resp app.IosUpdateResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return err | ||
} | ||
if !resp.Result { | ||
return errors.New("iOS 应用上报更新失败") | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// Offline 【应用中心】应用下架 | ||
func Offline(clt *core.SDKClient, accessToken string, req *app.OfflineRequest) error { | ||
var resp app.OnlineOfflineResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return err | ||
} | ||
if !resp.Result { | ||
return errors.New("应用下架失败") | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// OfflineAppStores 【应用中心】应用商店上下架 | ||
func OfflineAppStores(clt *core.SDKClient, accessToken string, req *app.OfflineAppStoresRequest) error { | ||
var resp app.OnlineOfflineResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return err | ||
} | ||
if !resp.Result { | ||
return errors.New("应用商店上下架失败") | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// Online 【应用中心】应用上架 | ||
func Online(clt *core.SDKClient, accessToken string, req *app.OnlineRequest) error { | ||
var resp app.OnlineOfflineResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return err | ||
} | ||
if !resp.Result { | ||
return errors.New("应用上架失败") | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// Release 【应用中心】发布应用 | ||
func Release(clt *core.SDKClient, accessToken string, req *app.ReleaseRequest) (*app.App, error) { | ||
var resp app.App | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// ReleaseList 获取新版应用发布列表【单元创编】 | ||
func ReleaseList(clt *core.SDKClient, accessToken string, req *app.ReleaseListRequest) (*app.ListResponse, error) { | ||
var resp app.ListResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// RetryBuildSubPackage 【应用中心】分包失败,重新构建 | ||
func RetryBuildSubPackage(clt *core.SDKClient, accessToken string, req *app.RetryBuildSubPackageRequest) (int, error) { | ||
var resp app.RetryBuildSubPackageResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return 0, err | ||
} | ||
return resp.RetryCnt, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// UpdateAndroid 更新Android应用 | ||
func UpdateAndroid(clt *core.SDKClient, accessToken string, req *app.UpdateAndroidRequest) (*app.App, error) { | ||
var resp app.App | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package app | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/app" | ||
) | ||
|
||
// UpdateIos 更新iOS应用 | ||
func UpdateIos(clt *core.SDKClient, accessToken string, req *app.UpdateIosRequest) (*app.App, error) { | ||
var resp app.App | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return nil, err | ||
} | ||
return &resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package appcenter 应用管理 | ||
package appcenter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package subpkg | ||
|
||
import ( | ||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/subpkg" | ||
) | ||
|
||
// Add 【应用中心】新建应用分包 | ||
func Add(clt *core.SDKClient, accessToken string, req *subpkg.AddRequest) ([]subpkg.SubPackage, error) { | ||
var resp []subpkg.SubPackage | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return resp, err | ||
} | ||
return resp, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package subpkg | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/subpkg" | ||
) | ||
|
||
// Description 【应用中心】修改应用分包备注 | ||
func Description(clt *core.SDKClient, accessToken string, req *subpkg.DescriptionRequest) error { | ||
var resp subpkg.ModResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return err | ||
} | ||
if !resp.Result { | ||
return errors.New("修改应用分包备注失败") | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package subpkg | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/bububa/kwai-marketing-api/core" | ||
"github.com/bububa/kwai-marketing-api/model/appcenter/subpkg" | ||
) | ||
|
||
// Mod 【应用中心】更新/恢复/删除应用分包 | ||
func Mod(clt *core.SDKClient, accessToken string, req *subpkg.ModRequest) error { | ||
var resp subpkg.ModResponse | ||
if err := clt.Post(accessToken, req, &resp); err != nil { | ||
return err | ||
} | ||
if !resp.Result { | ||
return errors.New("更新/删除/恢复分包失败") | ||
} | ||
return nil | ||
} |
Oops, something went wrong.