Pinterest Creating a new board

Creating a new board

Below is a quick example on how to create a new board:

@using Skybrud.Social.Pinterest.Objects.Boards
@using Skybrud.Social.Pinterest.Responses.Boards
@inherits WebViewPage<Skybrud.Social.Pinterest.PinterestService>
              
@{
    
    // Initialize the parameters
    string boardName = "My new board";
    string boardDesc = "Description of my new board";

    // Make the call to the Pinterest API
    PinterestCreateBoardResponse response = Model.Boards.CreateBoard(boardName, boardDesc);
    
    // Get a reference to created the board
    PinterestBoard board = response.Body.Data;

    // Get the ID of the board
    string boardId = board.Id;
    
}