seregazhuk\PinterestBot\Api\Providers\Pins::edit PHP Method

edit() public method

Edit pin by ID. You can move pin to a new board by setting this board id.
public edit ( integer $pindId, string $description = '', string $link = '', integer | null $boardId = null ) : boolean
$pindId integer
$description string
$link string
$boardId integer | null
return boolean
    public function edit($pindId, $description = '', $link = '', $boardId = null)
    {
        $requestOptions = ['id' => $pindId, 'description' => $description, 'link' => $link, 'board_id' => $boardId];
        return $this->execPostRequest($requestOptions, UrlBuilder::RESOURCE_UPDATE_PIN);
    }

Usage Example

 /** @test */
 public function it_should_edit_pins()
 {
     $this->apiShouldReturnSuccess()->assertTrue($this->provider->edit(1, 'new', 'changed'));
     $this->apiShouldReturnError()->assertFalse($this->provider->edit(1, 'new', 'changed'));
 }