Module: JPSClient::API::PublisherCategory
- Defined in:
- lib/jpsclient/api/archived_outdated/publisher_category.rb
Overview
PublisherCategory 相关 API 自动生成的模块,处理 publisher_category 相关接口
Instance Method Summary collapse
-
#create_publisher_categories(params: {}) ⇒ Hash
Create Publisher Categories.
-
#create_publisher_category(params: {}) ⇒ Hash
Create Publisher Category.
-
#create_publishers(params: {}) ⇒ Hash
Create Publishers.
-
#create_weights(params: {}) ⇒ Hash
Create Weights.
-
#delete_publisher_category(categoryId:, params: {}) ⇒ Hash
Delete Publisher Category.
-
#update_publisher_category(categoryId:, params: {}) ⇒ Hash
Update Publisher Category.
Instance Method Details
#create_publisher_categories(params: {}) ⇒ Hash
Create Publisher Categories
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/jpsclient/api/archived_outdated/publisher_category.rb', line 123 def create_publisher_categories(params: {}) config = @request_config && @request_config["publisher_category_publisher_categories"] raise JPSClient::ExceptionError, "Missing config for publisher_category_publisher_categories" unless config && config["url"] path = config["url"] response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) if result.need_login? do_login(force_login: true) response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) end return result.to_h end |
#create_publisher_category(params: {}) ⇒ Hash
Create Publisher Category
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/jpsclient/api/archived_outdated/publisher_category.rb', line 57 def create_publisher_category(params: {}) config = @request_config && @request_config["publisher_category_publisher_category"] raise JPSClient::ExceptionError, "Missing config for publisher_category_publisher_category" unless config && config["url"] path = config["url"] response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) if result.need_login? do_login(force_login: true) response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) end return result.to_h end |
#create_publishers(params: {}) ⇒ Hash
Create Publishers
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/jpsclient/api/archived_outdated/publisher_category.rb', line 101 def create_publishers(params: {}) config = @request_config && @request_config["publisher_category_publishers"] raise JPSClient::ExceptionError, "Missing config for publisher_category_publishers" unless config && config["url"] path = config["url"] response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) if result.need_login? do_login(force_login: true) response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) end return result.to_h end |
#create_weights(params: {}) ⇒ Hash
Create Weights
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/jpsclient/api/archived_outdated/publisher_category.rb', line 79 def create_weights(params: {}) config = @request_config && @request_config["publisher_category_weights"] raise JPSClient::ExceptionError, "Missing config for publisher_category_weights" unless config && config["url"] path = config["url"] response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) if result.need_login? do_login(force_login: true) response = @http_client.post(path, body: params) result = JPSClient::Response.new(response) end return result.to_h end |
#delete_publisher_category(categoryId:, params: {}) ⇒ Hash
Delete Publisher Category
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/jpsclient/api/archived_outdated/publisher_category.rb', line 34 def delete_publisher_category(categoryId:, params: {}) config = @request_config && @request_config["publisher_category_publisher_category"] raise JPSClient::ExceptionError, "Missing config for publisher_category_publisher_category" unless config && config["url"] path = config["url"] path = path.gsub("{categoryId}", categoryId.to_s) response = @http_client.delete(path) result = JPSClient::Response.new(response) if result.need_login? do_login(force_login: true) response = @http_client.delete(path) result = JPSClient::Response.new(response) end return result.to_h end |
#update_publisher_category(categoryId:, params: {}) ⇒ Hash
Update Publisher Category
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jpsclient/api/archived_outdated/publisher_category.rb', line 11 def update_publisher_category(categoryId:, params: {}) config = @request_config && @request_config["publisher_category_publisher_category"] raise JPSClient::ExceptionError, "Missing config for publisher_category_publisher_category" unless config && config["url"] path = config["url"] path = path.gsub("{categoryId}", categoryId.to_s) response = @http_client.put(path, body: params) result = JPSClient::Response.new(response) if result.need_login? do_login(force_login: true) response = @http_client.put(path, body: params) result = JPSClient::Response.new(response) end return result.to_h end |