Class: PinterestSdkClient::BoardsApi
- Inherits:
-
Object
- Object
- PinterestSdkClient::BoardsApi
- Defined in:
- lib/pinterest_sdk/api/boards_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#board_sections_create(board_id, board_section, opts = {}) ⇒ BoardSection
Create board section Create a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_create_with_http_info(board_id, board_section, opts = {}) ⇒ Array<(BoardSection, Integer, Hash)>
Create board section Create a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_delete(board_id, section_id, opts = {}) ⇒ nil
Delete board section Delete a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_delete_with_http_info(board_id, section_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete board section Delete a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_list(board_id, opts = {}) ⇒ Paginated
List board sections Get a list of all board sections from a board owned by the "operation user_account" - or a group board that has been shared with this account.
-
#board_sections_list_pins(board_id, section_id, opts = {}) ⇒ Paginated
List Pins on board section Get a list of the Pins on a board section of a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_list_pins_with_http_info(board_id, section_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List Pins on board section Get a list of the Pins on a board section of a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_list_with_http_info(board_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List board sections Get a list of all board sections from a board owned by the "operation user_account" - or a group board that has been shared with this account.
-
#board_sections_update(board_id, section_id, board_section, opts = {}) ⇒ BoardSection
Update board section Update a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#board_sections_update_with_http_info(board_id, section_id, board_section, opts = {}) ⇒ Array<(BoardSection, Integer, Hash)>
Update board section Update a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#boards_create(board, opts = {}) ⇒ Board
Create board Create a board owned by the "operation user_account".
-
#boards_create_with_http_info(board, opts = {}) ⇒ Array<(Board, Integer, Hash)>
Create board Create a board owned by the "operation user_account".
-
#boards_delete(board_id, opts = {}) ⇒ nil
Delete board Delete a board owned by the "operation user_account".
-
#boards_delete_with_http_info(board_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete board Delete a board owned by the "operation user_account".
-
#boards_get(board_id, opts = {}) ⇒ Board
Get board Get a board owned by the operation user_account - or a group board that has been shared with this account.
-
#boards_get_with_http_info(board_id, opts = {}) ⇒ Array<(Board, Integer, Hash)>
Get board Get a board owned by the operation user_account - or a group board that has been shared with this account.
-
#boards_list(opts = {}) ⇒ Paginated
List boards Get a list of the boards owned by the "operation user_account" + group boards where this account is a collaborator Optional: Specify a privacy type (public, protected, or secret) to indicate which boards to return.
-
#boards_list_pins(board_id, opts = {}) ⇒ Paginated
List Pins on board Get a list of the Pins on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#boards_list_pins_with_http_info(board_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List Pins on board Get a list of the Pins on a board owned by the "operation user_account" - or on a group board that has been shared with this account.
-
#boards_list_with_http_info(opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List boards Get a list of the boards owned by the "operation user_account" + group boards where this account is a collaborator Optional: Specify a privacy type (public, protected, or secret) to indicate which boards to return.
-
#boards_update(board_id, board_update, opts = {}) ⇒ Board
Update board Update a board owned by the "operating user_account".
-
#boards_update_with_http_info(board_id, board_update, opts = {}) ⇒ Array<(Board, Integer, Hash)>
Update board Update a board owned by the "operating user_account".
-
#initialize(api_client = ApiClient.default) ⇒ BoardsApi
constructor
A new instance of BoardsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#board_sections_create(board_id, board_section, opts = {}) ⇒ BoardSection
Create board section Create a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
28 29 30 31 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 28 def board_sections_create(board_id, board_section, opts = {}) data, _status_code, _headers = board_sections_create_with_http_info(board_id, board_section, opts) data end |
#board_sections_create_with_http_info(board_id, board_section, opts = {}) ⇒ Array<(BoardSection, Integer, Hash)>
Create board section Create a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 39 def board_sections_create_with_http_info(board_id, board_section, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_create ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_create" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_create, must conform to the pattern #{pattern}." end # verify the required parameter 'board_section' is set if @api_client.config.client_side_validation && board_section.nil? fail ArgumentError, "Missing the required parameter 'board_section' when calling BoardsApi.board_sections_create" end # resource path local_var_path = '/boards/{board_id}/sections'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(board_section) # return_type return_type = opts[:debug_return_type] || 'BoardSection' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.board_sections_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#board_sections_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#board_sections_delete(board_id, section_id, opts = {}) ⇒ nil
Delete board section Delete a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
107 108 109 110 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 107 def board_sections_delete(board_id, section_id, opts = {}) board_sections_delete_with_http_info(board_id, section_id, opts) nil end |
#board_sections_delete_with_http_info(board_id, section_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete board section Delete a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 118 def board_sections_delete_with_http_info(board_id, section_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_delete ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_delete" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_delete, must conform to the pattern #{pattern}." end # verify the required parameter 'section_id' is set if @api_client.config.client_side_validation && section_id.nil? fail ArgumentError, "Missing the required parameter 'section_id' when calling BoardsApi.board_sections_delete" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && section_id !~ pattern fail ArgumentError, "invalid value for 'section_id' when calling BoardsApi.board_sections_delete, must conform to the pattern #{pattern}." end # resource path local_var_path = '/boards/{board_id}/sections/{section_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)).sub('{' + 'section_id' + '}', CGI.escape(section_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.board_sections_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#board_sections_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#board_sections_list(board_id, opts = {}) ⇒ Paginated
List board sections Get a list of all board sections from a board owned by the "operation user_account" - or a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
187 188 189 190 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 187 def board_sections_list(board_id, opts = {}) data, _status_code, _headers = board_sections_list_with_http_info(board_id, opts) data end |
#board_sections_list_pins(board_id, section_id, opts = {}) ⇒ Paginated
List Pins on board section Get a list of the Pins on a board section of a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
270 271 272 273 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 270 def board_sections_list_pins(board_id, section_id, opts = {}) data, _status_code, _headers = board_sections_list_pins_with_http_info(board_id, section_id, opts) data end |
#board_sections_list_pins_with_http_info(board_id, section_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List Pins on board section Get a list of the Pins on a board section of a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 283 def board_sections_list_pins_with_http_info(board_id, section_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_list_pins ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_list_pins" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_list_pins, must conform to the pattern #{pattern}." end # verify the required parameter 'section_id' is set if @api_client.config.client_side_validation && section_id.nil? fail ArgumentError, "Missing the required parameter 'section_id' when calling BoardsApi.board_sections_list_pins" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && section_id !~ pattern fail ArgumentError, "invalid value for 'section_id' when calling BoardsApi.board_sections_list_pins, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list_pins, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list_pins, must be greater than or equal to 1.' end # resource path local_var_path = '/boards/{board_id}/sections/{section_id}/pins'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)).sub('{' + 'section_id' + '}', CGI.escape(section_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.board_sections_list_pins", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#board_sections_list_pins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#board_sections_list_with_http_info(board_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List board sections Get a list of all board sections from a board owned by the "operation user_account" - or a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 199 def board_sections_list_with_http_info(board_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_list ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_list" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_list, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.board_sections_list, must be greater than or equal to 1.' end # resource path local_var_path = '/boards/{board_id}/sections'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.board_sections_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#board_sections_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#board_sections_update(board_id, section_id, board_section, opts = {}) ⇒ BoardSection
Update board section Update a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
362 363 364 365 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 362 def board_sections_update(board_id, section_id, board_section, opts = {}) data, _status_code, _headers = board_sections_update_with_http_info(board_id, section_id, board_section, opts) data end |
#board_sections_update_with_http_info(board_id, section_id, board_section, opts = {}) ⇒ Array<(BoardSection, Integer, Hash)>
Update board section Update a board section on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 374 def board_sections_update_with_http_info(board_id, section_id, board_section, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.board_sections_update ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.board_sections_update" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.board_sections_update, must conform to the pattern #{pattern}." end # verify the required parameter 'section_id' is set if @api_client.config.client_side_validation && section_id.nil? fail ArgumentError, "Missing the required parameter 'section_id' when calling BoardsApi.board_sections_update" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && section_id !~ pattern fail ArgumentError, "invalid value for 'section_id' when calling BoardsApi.board_sections_update, must conform to the pattern #{pattern}." end # verify the required parameter 'board_section' is set if @api_client.config.client_side_validation && board_section.nil? fail ArgumentError, "Missing the required parameter 'board_section' when calling BoardsApi.board_sections_update" end # resource path local_var_path = '/boards/{board_id}/sections/{section_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)).sub('{' + 'section_id' + '}', CGI.escape(section_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(board_section) # return_type return_type = opts[:debug_return_type] || 'BoardSection' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.board_sections_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#board_sections_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#boards_create(board, opts = {}) ⇒ Board
Create board Create a board owned by the "operation user_account". - By default, the "operation user_account" is the token user_account.
450 451 452 453 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 450 def boards_create(board, opts = {}) data, _status_code, _headers = boards_create_with_http_info(board, opts) data end |
#boards_create_with_http_info(board, opts = {}) ⇒ Array<(Board, Integer, Hash)>
Create board Create a board owned by the "operation user_account". - By default, the "operation user_account" is the token user_account.
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 460 def boards_create_with_http_info(board, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.boards_create ...' end # verify the required parameter 'board' is set if @api_client.config.client_side_validation && board.nil? fail ArgumentError, "Missing the required parameter 'board' when calling BoardsApi.boards_create" end # resource path local_var_path = '/boards' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(board) # return_type return_type = opts[:debug_return_type] || 'Board' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.boards_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#boards_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#boards_delete(board_id, opts = {}) ⇒ nil
Delete board Delete a board owned by the "operation user_account". - By default, the "operation user_account" is the token user_account.
518 519 520 521 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 518 def boards_delete(board_id, opts = {}) boards_delete_with_http_info(board_id, opts) nil end |
#boards_delete_with_http_info(board_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete board Delete a board owned by the "operation user_account". - By default, the "operation user_account" is the token user_account.
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 528 def boards_delete_with_http_info(board_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.boards_delete ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_delete" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_delete, must conform to the pattern #{pattern}." end # resource path local_var_path = '/boards/{board_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.boards_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#boards_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#boards_get(board_id, opts = {}) ⇒ Board
Get board Get a board owned by the operation user_account - or a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
586 587 588 589 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 586 def boards_get(board_id, opts = {}) data, _status_code, _headers = boards_get_with_http_info(board_id, opts) data end |
#boards_get_with_http_info(board_id, opts = {}) ⇒ Array<(Board, Integer, Hash)>
Get board Get a board owned by the operation user_account - or a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 596 def boards_get_with_http_info(board_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.boards_get ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_get" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_get, must conform to the pattern #{pattern}." end # resource path local_var_path = '/boards/{board_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Board' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.boards_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#boards_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#boards_list(opts = {}) ⇒ Paginated
List boards Get a list of the boards owned by the "operation user_account" + group boards where this account is a collaborator Optional: Specify a privacy type (public, protected, or secret) to indicate which boards to return. - If no privacy is specified, all boards that can be returned (based on the scopes of the token and ad_account role if applicable) will be returned.
656 657 658 659 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 656 def boards_list(opts = {}) data, _status_code, _headers = boards_list_with_http_info(opts) data end |
#boards_list_pins(board_id, opts = {}) ⇒ Paginated
List Pins on board Get a list of the Pins on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
734 735 736 737 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 734 def boards_list_pins(board_id, opts = {}) data, _status_code, _headers = boards_list_pins_with_http_info(board_id, opts) data end |
#boards_list_pins_with_http_info(board_id, opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List Pins on board Get a list of the Pins on a board owned by the "operation user_account" - or on a group board that has been shared with this account. - By default, the "operation user_account" is the token user_account.
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 746 def boards_list_pins_with_http_info(board_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.boards_list_pins ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_list_pins" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_list_pins, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list_pins, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list_pins, must be greater than or equal to 1.' end # resource path local_var_path = '/boards/{board_id}/pins'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.boards_list_pins", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#boards_list_pins\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#boards_list_with_http_info(opts = {}) ⇒ Array<(Paginated, Integer, Hash)>
List boards Get a list of the boards owned by the "operation user_account" + group boards where this account is a collaborator Optional: Specify a privacy type (public, protected, or secret) to indicate which boards to return. - If no privacy is specified, all boards that can be returned (based on the scopes of the token and ad_account role if applicable) will be returned.
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 668 def boards_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.boards_list ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling BoardsApi.boards_list, must be greater than or equal to 1.' end allowable_values = ["PUBLIC", "PROTECTED", "SECRET"] if @api_client.config.client_side_validation && opts[:'privacy'] && !allowable_values.include?(opts[:'privacy']) fail ArgumentError, "invalid value for \"privacy\", must be one of #{allowable_values}" end # resource path local_var_path = '/boards' # query parameters query_params = opts[:query_params] || {} query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'privacy'] = opts[:'privacy'] if !opts[:'privacy'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Paginated' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.boards_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#boards_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#boards_update(board_id, board_update, opts = {}) ⇒ Board
Update board Update a board owned by the "operating user_account".
815 816 817 818 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 815 def boards_update(board_id, board_update, opts = {}) data, _status_code, _headers = boards_update_with_http_info(board_id, board_update, opts) data end |
#boards_update_with_http_info(board_id, board_update, opts = {}) ⇒ Array<(Board, Integer, Hash)>
Update board Update a board owned by the "operating user_account".
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 |
# File 'lib/pinterest_sdk/api/boards_api.rb', line 826 def boards_update_with_http_info(board_id, board_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BoardsApi.boards_update ...' end # verify the required parameter 'board_id' is set if @api_client.config.client_side_validation && board_id.nil? fail ArgumentError, "Missing the required parameter 'board_id' when calling BoardsApi.boards_update" end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && board_id !~ pattern fail ArgumentError, "invalid value for 'board_id' when calling BoardsApi.boards_update, must conform to the pattern #{pattern}." end # verify the required parameter 'board_update' is set if @api_client.config.client_side_validation && board_update.nil? fail ArgumentError, "Missing the required parameter 'board_update' when calling BoardsApi.boards_update" end # resource path local_var_path = '/boards/{board_id}'.sub('{' + 'board_id' + '}', CGI.escape(board_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(board_update) # return_type return_type = opts[:debug_return_type] || 'Board' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"BoardsApi.boards_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BoardsApi#boards_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |