2013-06-26 17:41:18 +02:00
|
|
|
using RestSharp;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace PocketSharp.Models
|
|
|
|
|
{
|
2013-06-27 00:53:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// All parameters which can be passed to add a new item
|
|
|
|
|
/// </summary>
|
2013-06-27 00:26:47 +02:00
|
|
|
public class AddParameters
|
2013-06-26 17:41:18 +02:00
|
|
|
{
|
2013-06-27 00:53:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the URI.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The URI.
|
|
|
|
|
/// </value>
|
2013-06-26 17:41:18 +02:00
|
|
|
public Uri Uri { get; set; }
|
|
|
|
|
|
2013-06-27 00:53:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the title.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The title.
|
|
|
|
|
/// </value>
|
2013-06-26 17:41:18 +02:00
|
|
|
public string Title { get; set; }
|
|
|
|
|
|
2013-06-27 00:53:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the tags.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The tags.
|
|
|
|
|
/// </value>
|
2013-06-26 17:41:18 +02:00
|
|
|
public string[] Tags { get; set; }
|
|
|
|
|
|
2013-06-27 00:53:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the tweet ID.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>
|
|
|
|
|
/// The tweet ID.
|
|
|
|
|
/// </value>
|
2013-06-26 17:41:18 +02:00
|
|
|
public string TweetID { get; set; }
|
|
|
|
|
|
2013-06-27 00:53:30 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Converts this instance to a parameter list.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2013-06-26 17:41:18 +02:00
|
|
|
public List<Parameter> Convert()
|
|
|
|
|
{
|
2013-06-27 00:26:47 +02:00
|
|
|
return new List<Parameter>()
|
|
|
|
|
{
|
|
|
|
|
Utilities.CreateParam("url", Uri.ToString() ),
|
|
|
|
|
Utilities.CreateParam("title", Title),
|
|
|
|
|
Utilities.CreateParam("tags", String.Join(",", Tags)),
|
|
|
|
|
Utilities.CreateParam("tweet_id", TweetID)
|
|
|
|
|
};
|
2013-06-26 17:41:18 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|