Class: Aliexpress::Category

Inherits:
Base
  • Object
show all
Defined in:
lib/aliexpress/category.rb

Constant Summary

Constants inherited from Base

Base::ACCESS_TOKEN_KEY, Base::REFRESH_TOKEN_KEY

Class Method Summary collapse

Methods inherited from Base

api_endpoint

Class Method Details

.getChildAttributesResultByPostCateIdAndPath(params = {}) ⇒ Object

根据发布类目id、父属性路径(可选)获取子属性信息 地址:gw.api.alibaba.com/dev/doc/intl/api.htm?ns=aliexpress.open&n=getChildAttributesResultByPostCateIdAndPath&v=1

Parameters:

  • params (Hash) (defaults to: {})

    应用级参数 - { cateId: 0, parentAttrValueList: [[2,200013977]] }


42
43
44
# File 'lib/aliexpress/category.rb', line 42

def self.getChildAttributesResultByPostCateIdAndPath(params = {})
  api_endpoint 'getChildAttributesResultByPostCateIdAndPath', params
end

.getChildrenPostCategoryById(id = 0) ⇒ Object

Note:

与获取单个类目信息内容相同

获取下级目录的类目信息 地址: gw.api.alibaba.com/dev/doc/intl/api.htm?ns=aliexpress.open&n=api.getChildrenPostCategoryById&v=1

Parameters:

  • id (Fixnum) (defaults to: 0)

    类目属性 ID


14
15
16
# File 'lib/aliexpress/category.rb', line 14

def self.getChildrenPostCategoryById(id = 0)
  api_endpoint 'api.getChildrenPostCategoryById', {cateId: id}
end

.getPostCategoryById(id = 0) ⇒ Object

Parameters:

  • id (Fixnum) (defaults to: 0)

    类目属性 ID


23
24
25
# File 'lib/aliexpress/category.rb', line 23

def self.getPostCategoryById(id = 0)
  api_endpoint 'api.getPostCategoryById', {cateId: id}
end

.recommendCategoryByKeyword(params = {}) ⇒ Object

Parameters:

  • params (Hash) (defaults to: {})

    应用级参数 - { keyword: 'mp4' }


32
33
34
35
# File 'lib/aliexpress/category.rb', line 32

def self.recommendCategoryByKeyword(params = {})
  params[:keyword] ||= 'mp3'
  api_endpoint 'api.recommendCategoryByKeyword', params
end

.sizeModelIsRequiredForPostCat(params = {}) ⇒ Object

Parameters:

  • parmas (Hash)

    应用级参数 - { postCatId: 0 }


51
52
53
# File 'lib/aliexpress/category.rb', line 51

def self.sizeModelIsRequiredForPostCat(params = {})
  api_endpoint 'sizeModelIsRequiredForPostCat', params
end

.sizeModelsRequiredForPostCat(params = {}) ⇒ Object

Parameters:

  • parmas (Hash)

    应用级参数 - { postCatId: 0 }


60
61
62
# File 'lib/aliexpress/category.rb', line 60

def self.sizeModelsRequiredForPostCat(params = {})
  api_endpoint 'api.sizeModelsRequiredForPostCat', params
end