seregazhuk\PinterestBot\Api\Providers\Boards::create PHP Method

create() public method

Create a new board.
public create ( string $name, string $description, string $privacy = self::BOARD_PRIVACY_PUBLIC ) : boolean
$name string
$description string
$privacy string Can be 'public' or 'secret'. 'public' by default.
return boolean
    public function create($name, $description, $privacy = self::BOARD_PRIVACY_PUBLIC)
    {
        $requestOptions = ['name' => $name, 'description' => $description, 'privacy' => $privacy];
        return $this->execPostRequest($requestOptions, UrlBuilder::RESOURCE_CREATE_BOARD);
    }

Usage Example

Exemplo n.º 1
0
 /** @test */
 public function createBoard()
 {
     $response = $this->createSuccessApiResponse();
     $error = $this->createErrorApiResponse();
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturn($error);
     $this->assertTrue($this->provider->create('test', 'test'));
     $this->assertFalse($this->provider->delete('test', 'test'));
 }
All Usage Examples Of seregazhuk\PinterestBot\Api\Providers\Boards::create