Module: JPSClient::API::AssetsCategory

Defined in:
lib/jpsclient/api/archived_outdated/assets_category.rb

Overview

AssetsCategory 相关 API 自动生成的模块,处理 assets_category 相关接口

Instance Method Summary collapse

Instance Method Details

#create_assets_categories(params: {}) ⇒ Hash

Create Assets Categories

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



65
66
67
68
69
70
71
72
# File 'lib/jpsclient/api/archived_outdated/assets_category.rb', line 65

def create_assets_categories(params: {})
  config = @request_config && @request_config["assets_category_assets_categories"]
  raise JPSClient::ExceptionError, "Missing config for assets_category_assets_categories" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#create_assets_category(params: {}) ⇒ Hash

Create Assets Category

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



39
40
41
42
43
44
45
46
# File 'lib/jpsclient/api/archived_outdated/assets_category.rb', line 39

def create_assets_category(params: {})
  config = @request_config && @request_config["assets_category_assets_category"]
  raise JPSClient::ExceptionError, "Missing config for assets_category_assets_category" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#create_weights(params: {}) ⇒ Hash

Create Weights

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



52
53
54
55
56
57
58
59
# File 'lib/jpsclient/api/archived_outdated/assets_category.rb', line 52

def create_weights(params: {})
  config = @request_config && @request_config["assets_category_weights"]
  raise JPSClient::ExceptionError, "Missing config for assets_category_weights" unless config && config["url"]

  path = config["url"]

  return request_with_auth(:post, path, body: params)
end

#delete_assets_category(categoryId:, params: {}) ⇒ Hash

Delete Assets Category

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



25
26
27
28
29
30
31
32
33
# File 'lib/jpsclient/api/archived_outdated/assets_category.rb', line 25

def delete_assets_category(categoryId:, params: {})
  config = @request_config && @request_config["assets_category_assets_category"]
  raise JPSClient::ExceptionError, "Missing config for assets_category_assets_category" unless config && config["url"]

  path = config["url"]
  path = path.gsub("{categoryId}", categoryId.to_s)

  return request_with_auth(:delete, path)
end

#update_assets_category(categoryId:, params: {}) ⇒ Hash

Update Assets Category

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



11
12
13
14
15
16
17
18
19
# File 'lib/jpsclient/api/archived_outdated/assets_category.rb', line 11

def update_assets_category(categoryId:, params: {})
  config = @request_config && @request_config["assets_category_assets_category"]
  raise JPSClient::ExceptionError, "Missing config for assets_category_assets_category" unless config && config["url"]

  path = config["url"]
  path = path.gsub("{categoryId}", categoryId.to_s)

  return request_with_auth(:put, path, body: params)
end