Esempio n. 1
0
        /// <summary>
        /// Allowing users to add articles, videos, images and URLs to Pocket is most likely the first type of integration that you’ll want to build into your application.
        /// </summary>
        /// <param name="userToken">Authorize Token of the user</param>
        /// <param name="url">The URL of the item you want to save</param>
        /// <param name="title">This can be included for cases where an item does not have a title, which is typical for image or PDF URLs.
        /// If Pocket detects a title from the content of the page, this parameter will be ignored.</param>
        /// <param name="tags">A comma-separated list of tags to apply to the item</param>
        /// <param name="tweetId">If you are adding Pocket support to a Twitter client, please send along a reference to the tweet status id.
        /// This allows Pocket to show the original tweet alongside the article.</param>
        /// <returns>The response contains all of the meta information we have resolved about the saved item</returns>
        public AddResult Add(String userToken, String url, String title = null, String tags = null, String tweetId = null)
        {
            var newArticle = new ArticleRequest
            {
                consumer_key = this.ConsumerKey,
                access_token = userToken,
                url          = url,
                title        = title,
                tags         = tags,
                tweet_id     = tweetId
            };

            return(this.Add(newArticle));
        }
Esempio n. 2
0
 /// <summary>
 /// Allowing users to add articles, videos, images and URLs to Pocket is most likely the first type of integration that you’ll want to build into your application.
 /// </summary>
 /// <param name="newArticle">An completed Add Request</param>
 /// <returns>The response contains all of the meta information we have resolved about the saved item</returns>
 public AddResult Add(ArticleRequest newArticle)
 {
     newArticle.consumer_key = this.ConsumerKey;
     return(this.PocketRequest <AddResult>(AddService, Method.POST, newArticle));
 }