Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/huangchunlong818/go-tiktok-shop-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/huangchunlong818/go-tiktok-shop-api

  • v0.2.6
  • Source
  • Go
  • Socket score

Version published
Created
Source

Tiktok Shop Api - Golang

Api Version

Tiktok Shop Api 202309

Install

# Project introduction
go get github.com/huangchunlong818/go-tiktok-shop-api

# Renew
go get -u github.com/huangchunlong818/go-tiktok-shop-api

# Specifying a version
go get -u github.com/huangchunlong818/go-tiktok-shop-api@v0.2.4

Development Environment

go version go1.20.5

Example

Initialization

import (
    "context"
    "github.com/huangchunlong818/go-tiktok-shop-api/tiktok/common/config"
)

ctx := context.Background()

config := config.WithApp(config.AppConfig{
    AppId:  "xxxx",
    AppKey: "xxxx",
    Secret: "xxxx",
})

// Get instance object
shopClient := tiktokShop.NewTiktokShopClient(config)

var query map[string]string
var body map[string]any
// Get auth url
authClient := shopClient.GetAuthClient()
authUrl := authClient.GetAuthUrl("us")

authApiClient := shopClient.GetAuthApiClient()
getAuthorizedShops := authApiClient.GetAuthorizedShops(ctx, "Access Token")
// Get shop brands
productApiClient := shopClient.GetProductApiClient()
brands := productApiClient.GetBrands(ctx, "Access Token", query)

// Upload Image
productApiClient := shopClient.GetProductApiClient()
imageUpload := productApiClient.ImageUpload(ctx, "Access Token", body, "image path")
// Get shop warehouses
widgetApiClient := shopClient.GetWidgetApiClient()
warehouses := widgetApiClient.GetWarehouses(ctx, "Access Token", query)

Supported APIs

Authorization

  1. Get Authorized Shops - GetAuthorizedShops

Product

  1. Get Brands - GetBrands
  2. Get Category Rules - GetCateRule
  3. Get Categories - GetCate
  4. Get Attributes - GetCateAttrs
  5. Check Listing Prerequisites - GetPrerequisites
  6. Search Products - GetProducts
  7. Get Product - GetProduct
  8. Create Product - CreateProduct
  9. Delete Products - DeleteProducts
  10. Deactivate Products - DeactivateProducts
  11. Activate Product - ActivateProducts
  12. Partial Edit Product - PartialEditProduct
  13. Update Price - UpdateProductPrice
  14. Upload Product Image - ImageUpload
  15. Optimized Images - OptimizedImages
  16. Upload Product File - FileUpload
  17. Check Product Listing - CheckProductListing

Logistics

  1. Get Warehouse List - GetWarehouses

More content to come

FAQs

Package last updated on 02 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc