/// <summary>
 /// Initializes the options based on the specified <paramref name="board"/>, <paramref name="name"/>,
 /// <paramref name="description"/> and <paramref name="fields"/>.
 /// </summary>
 /// <param name="board">The identifier of the board to be retrived.</param>
 /// <param name="name">The new name of the board.</param>
 /// <param name="description">The new description of the board.</param>
 /// <param name="fields">A collection of the fields that should be returned.</param>
 public PinterestEditBoardOptions(string board, string name, string description, PinterestFieldsCollection fields)
 {
     Board       = board;
     Name        = name;
     Description = description;
     Fields      = fields ?? new PinterestFieldsCollection();
 }
 /// <summary>
 /// Creates a new board with the specified <paramref name="name"/> and <paramref name="description"/>.
 /// </summary>
 /// <param name="name">The name of the board to be created.</param>
 /// <param name="description">The description of the board to be created.</param>
 /// <param name="fields">The fields to be returned for the board.</param>
 /// <returns>An instance of <see cref="SocialHttpResponse"/> representing the raw response.</returns>
 public SocialHttpResponse CreateBoard(string name, string description, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrEmpty(name))
     {
         throw new ArgumentNullException(nameof(name));
     }
     return(CreateBoard(new PinterestCreateBoardOptions(name, description, fields)));
 }
示例#3
0
 /// <summary>
 /// Gets the pin with the specified <paramref name="id"/>.
 /// </summary>
 /// <param name="id">The ID of the pin to be returned.</param>
 /// <param name="fields">The fields to be returned for the pin.</param>
 /// <returns>Returns an instance of <see cref="PinterestGetPinResponse"/> representing the response.</returns>
 public PinterestGetPinResponse GetPin(string id, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrWhiteSpace(id))
     {
         throw new ArgumentNullException("id");
     }
     return(PinterestGetPinResponse.ParseResponse(Raw.GetPin(id, fields)));
 }
 /// <summary>
 /// Gets information about the user with the specified <paramref name="identifier"/>.
 /// </summary>
 /// <param name="identifier">The identifier of the user.</param>
 /// <param name="fields">The fields that should be returned.</param>
 /// <returns>Returns an instance of <code>PinterestGetUserResponse</code> representing the response.</returns>
 public PinterestGetUserResponse GetUser(string identifier, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrWhiteSpace(identifier))
     {
         throw new ArgumentNullException("identifier");
     }
     return(PinterestGetUserResponse.ParseResponse(Raw.GetUser(identifier, fields)));
 }
 /// <summary>
 /// Gets the board with the specified <paramref name="board"/> identifier.
 /// </summary>
 /// <param name="board">The identifier of the board to be retrieved. Can be either the ID of the board or the
 /// part of the URL like <c>&lt;username&gt;/&lt;board_name&gt;</c></param>
 /// <param name="fields">The fields to be returned for the board.</param>
 /// <returns>An instance of <see cref="SocialHttpResponse"/> representing the raw response.</returns>
 public SocialHttpResponse GetBoard(string board, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrEmpty(board))
     {
         throw new ArgumentNullException(nameof(board));
     }
     return(GetBoard(new PinterestGetBoardOptions(board, fields)));
 }
 /// <summary>
 /// Gets information about the user with the specified <paramref name="identifier"/>.
 /// </summary>
 /// <param name="identifier">The identifier of the user.</param>
 /// <param name="fields">The fields that should be returned.</param>
 /// <returns>An instance of <see cref="SocialHttpResponse"/> representing the raw response.</returns>
 public SocialHttpResponse GetUser(string identifier, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrWhiteSpace(identifier))
     {
         throw new ArgumentNullException(nameof(identifier));
     }
     return(GetUser(new PinterestGetUserOptions(identifier, fields)));
 }
 /// <summary>
 /// Gets a collection of pins of the Pinterest board matching the specified <paramref name="username"/> and <paramref name="board"/>.
 /// </summary>
 /// <param name="username">The username of the user owning the board.</param>
 /// <param name="board">The alias of the board.</param>
 /// <param name="fields">The fields to be returned for the pins.</param>
 /// <returns>An instance of <see cref="SocialHttpResponse"/> representing the raw response.</returns>
 public SocialHttpResponse GetPins(string username, string board, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrWhiteSpace(username))
     {
         throw new ArgumentNullException(nameof(username));
     }
     if (String.IsNullOrWhiteSpace(board))
     {
         throw new ArgumentNullException(nameof(board));
     }
     return(GetPins(new PinterestGetPinsOptions(username, board, fields)));
 }
示例#8
0
 public PinterestGetPinsResponse GetPins(string username, string board, PinterestFieldsCollection fields)
 {
     if (String.IsNullOrWhiteSpace(username))
     {
         throw new ArgumentNullException("username");
     }
     if (String.IsNullOrWhiteSpace(board))
     {
         throw new ArgumentNullException("board");
     }
     return(PinterestGetPinsResponse.ParseResponse(Raw.GetPins(username, board, fields)));
 }
示例#9
0
 /// <summary>
 /// Initializes the options based on the specified <paramref name="board"/> and <paramref name="fields"/>.
 /// </summary>
 /// <param name="board">The identifier of the board to be retrived.</param>
 /// <param name="fields">A collection of the fields that should be returned.</param>
 public PinterestGetBoardOptions(string board, PinterestFieldsCollection fields)
 {
     Board  = board;
     Fields = fields ?? new PinterestFieldsCollection();
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance with default options.
 /// </summary>
 public PinterestGetPinOptions()
 {
     Fields = new PinterestFieldsCollection();
 }
示例#11
0
 /// <summary>
 /// Initializes the options based on the specified <paramref name="id"/> and <paramref name="fields"/>.
 /// </summary>
 /// <param name="id">The ID of the pin to be returned.</param>
 /// <param name="fields">A collection of the fields that should be returned.</param>
 public PinterestGetPinOptions(string id, PinterestFieldsCollection fields)
 {
     Id     = id;
     Fields = fields ?? new PinterestFieldsCollection();
 }
 /// <summary>
 /// Creates a new board with the specified <paramref name="name"/> and <paramref name="description"/>.
 /// </summary>
 /// <param name="name">The name of the board to be created.</param>
 /// <param name="description">The description of the board to be created.</param>
 /// <param name="fields">The fields to be returned for the board.</param>
 /// <returns>Returns an instance of <see cref="PinterestCreateBoardResponse"/> representing the response.</returns>
 public PinterestCreateBoardResponse CreateBoard(string name, string description, PinterestFieldsCollection fields)
 {
     return(PinterestCreateBoardResponse.ParseResponse(Raw.CreateBoard(name, description, fields)));
 }
 /// <summary>
 /// Gets the board with the specified <paramref name="board"/> identifier.
 /// </summary>
 /// <param name="board">The identifier of the board to be retrieved. Can be either the ID of the board or the
 /// part of the URL like <code>&lt;username&gt;/&lt;board_name&gt;</code></param>
 /// <param name="fields">The fields to be returned for the board.</param>
 /// <returns>Returns an instance of <see cref="PinterestGetBoardResponse"/> representing the response.</returns>
 public PinterestGetBoardResponse GetBoard(string board, PinterestFieldsCollection fields)
 {
     return(PinterestGetBoardResponse.ParseResponse(Raw.GetBoard(board, fields)));
 }
示例#14
0
 /// <summary>
 /// Gets a collection of pins of the Pinterest board matching the specified <paramref name="username"/> and <paramref name="board"/>.
 /// </summary>
 /// <param name="username">The username of the user owning the board.</param>
 /// <param name="board">The alias of the board.</param>
 /// <param name="fields">The fields to be returned for the pins.</param>
 /// <returns>An instance of <see cref="PinterestGetPinsResponse"/> representing the response.</returns>
 public PinterestGetPinsResponse GetPins(string username, string board, PinterestFieldsCollection fields)
 {
     return(PinterestGetPinsResponse.ParseResponse(Raw.GetPins(username, board, fields)));
 }
 /// <summary>
 /// Edits the board with the specified <paramref name="board"/> identifier.
 /// </summary>
 /// <param name="board">The identifier of the board to be retrieved. Can be either the ID of the board or the
 /// part of the URL like <code>&lt;username&gt;/&lt;board_name&gt;</code></param>
 /// <param name="name">The new name of the board.</param>
 /// <param name="description">The new description of the board.</param>
 /// <param name="fields">The fields to be returned for the board.</param>
 /// <returns>Returns an instance of <see cref="PinterestEditBoardResponse"/> representing the response.</returns>
 public PinterestEditBoardResponse EditBoard(string board, string name, string description, PinterestFieldsCollection fields)
 {
     return(PinterestEditBoardResponse.ParseResponse(Raw.EditBoard(board, name, description, fields)));
 }
示例#16
0
 /// <summary>
 /// Gets information about the user with the specified <paramref name="identifier"/>.
 /// </summary>
 /// <param name="identifier">The identifier of the user.</param>
 /// <param name="fields">The fields that should be returned.</param>
 /// <returns>An instance of <see cref="PinterestGetUserResponse"/> representing the response.</returns>
 public PinterestGetUserResponse GetUser(string identifier, PinterestFieldsCollection fields)
 {
     return(PinterestGetUserResponse.ParseResponse(Raw.GetUser(identifier, fields)));
 }
示例#17
0
 /// <summary>
 /// Gets the pin with the specified <paramref name="id"/>.
 /// </summary>
 /// <param name="id">The ID of the pin to be returned.</param>
 /// <param name="fields">The fields to be returned for the pin.</param>
 /// <returns>An instance of <see cref="PinterestGetPinResponse"/> representing the response.</returns>
 public PinterestGetPinResponse GetPin(string id, PinterestFieldsCollection fields)
 {
     return(PinterestGetPinResponse.ParseResponse(Raw.GetPin(id, fields)));
 }
 /// <summary>
 /// Initializes a new instance with default options.
 /// </summary>
 public PinterestEditBoardOptions()
 {
     Fields = new PinterestFieldsCollection();
 }
示例#19
0
 /// <summary>
 /// Initializes a new instance with default options.
 /// </summary>
 public PinterestCreateBoardOptions()
 {
     Fields = new PinterestFieldsCollection();
 }
示例#20
0
 /// <summary>
 /// Initializes the options based on the specified <paramref name="name"/>, <paramref name="description"/> and
 /// <paramref name="fields"/>.
 /// </summary>
 /// <param name="name">The name of the board to be created.</param>
 /// <param name="description">The description of the board to be created.</param>
 /// <param name="fields">A collection of the fields that should be returned.</param>
 public PinterestCreateBoardOptions(string name, string description, PinterestFieldsCollection fields)
 {
     Name        = name;
     Description = description;
     Fields      = fields ?? new PinterestFieldsCollection();
 }
示例#21
0
 /// <summary>
 /// Initializes the options based on the specified <paramref name="username"/>, <paramref name="board"/> and
 /// <paramref name="fields"/>.
 /// </summary>
 /// <param name="username">The username of the user.</param>
 /// <param name="board">The alias of the board.</param>
 /// <param name="fields">A collection of the fields that should be returned.</param>
 public PinterestGetPinsOptions(string username, string board, PinterestFieldsCollection fields)
 {
     Board    = board;
     Username = username;
     Fields   = fields ?? new PinterestFieldsCollection();
 }
 /// <summary>
 /// Initializes the options based on the specified <paramref name="identifier"/> and <paramref name="fields"/>.
 /// </summary>
 /// <param name="identifier">The identifier (ID) of the user.</param>
 /// <param name="fields">A collection of the fields that should be returned.</param>
 public PinterestGetUserOptions(string identifier, PinterestFieldsCollection fields)
 {
     Identifier = identifier;
     Fields     = fields ?? new PinterestFieldsCollection();
 }