php-pinterest-bot icon indicating copy to clipboard operation
php-pinterest-bot copied to clipboard

if board exist return board id else create function

Open oguzdelioglu opened this issue 5 years ago • 1 comments

How can?

public function create($name, $description, $privacy = self::BOARD_PRIVACY_PUBLIC) { $requestOptions = [ 'name' => $name, 'description' => $description, 'privacy' => $privacy, ]; return $this->post(UrlBuilder::RESOURCE_CREATE_BOARD, $requestOptions); }

this function should be return a created board id.

Since the generated board ID does not give, we have to search the boards of the account again.

I can find out if there is a board or not, but when I try to create a new board, it doesn't give me the board id.

In fact, the simplest may be.When using the Create function, if the board name already exists, give it its id.If not, let it create and give id.

oguzdelioglu avatar Oct 29 '19 09:10 oguzdelioglu

@oguzdelioglu have you ever checked the endpoint? What is the response of board create endpoint? Could you please share if you have

kaankilic avatar Feb 19 '20 20:02 kaankilic