dirkgroenen / pinterest-api-php

A PHP wrapper for the official Pinterest API. :pushpin:
https://developers.pinterest.com/docs/getting-started/introduction/
Apache License 2.0
173 stars 76 forks source link

Is there a way to check if board has been created? #89

Closed olubunmitosin closed 5 years ago

olubunmitosin commented 6 years ago

Compliments for your good work.

How can i check if a board has been created already to avoid creating a board with same name which can lead to error?

dirkgroenen commented 5 years ago

You could try to retrieve the board via boards->get() and see if a board or exception is being returned/thrown.

Alternatively you could try to create the board, catch the exception and use that to inform the user about the already existing board.