Module: JPSClient::API::Publisher

Included in:
Client
Defined in:
lib/jpsclient/api/publisher.rb

Overview

Publisher 相关 API 自动生成的模块,处理 publisher 相关接口

Instance Method Summary collapse

Instance Method Details

#create_detail(params: {}) ⇒ Hash

Create Detail

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



78
79
80
81
82
83
84
85
# File 'lib/jpsclient/api/publisher.rb', line 78

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

  path = config["url"]

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

#create_publishers(params: {}) ⇒ Hash

Create Publishers

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



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

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

  path = config["url"]

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

#create_stream(params: {}) ⇒ Hash

Create Stream

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



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

def create_stream(params: {})
  config = @request_config && @request_config["publisher_stream"]
  raise JPSClient::ExceptionError, "Missing config for publisher_stream" 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:



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

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

  path = config["url"]

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

#delete_publisher(publisherId:, params: {}) ⇒ Hash

Delete Publisher

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



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

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

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

  return request_with_auth(:delete, path)
end

#get_store_applications_detail(publisherId:, params: {}) ⇒ Hash

Get Store Applications Detail

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



91
92
93
94
95
96
97
98
99
# File 'lib/jpsclient/api/publisher.rb', line 91

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

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

  return request_with_auth(:get, path, params: params)
end

#update_publisher(publisherId:, params: {}) ⇒ Hash

Update Publisher

Parameters:

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

    请求参数

Returns:

  • (Hash)

    API响应

Raises:



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

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

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

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