seregazhuk\PinterestBot\Api\Providers\Boards::update PHP Méthode

update() public méthode

- 'privacy' can be 'public' or 'secret'. 'public' by default. - 'category' is 'other' by default.
public update ( $boardId, $attributes ) : mixed
$boardId
$attributes
Résultat mixed
    public function update($boardId, $attributes)
    {
        $requestOptions = array_merge(['board_id' => $boardId, 'category' => 'other'], $attributes);
        return $this->execPostRequest($requestOptions, UrlBuilder::RESOURCE_UPDATE_BOARD);
    }

Usage Example

 /** @test */
 public function it_should_update_board()
 {
     $attributes = ['category' => 'test', 'description' => 'test'];
     $boardId = 1;
     $this->apiShouldReturnSuccess()->assertTrue($this->provider->update($boardId, $attributes));
     $this->apiShouldReturnError()->assertFalse($this->provider->update($boardId, $attributes));
 }