From e0e3f589b8ff32cf874a9730eca949d80c3b97bd Mon Sep 17 00:00:00 2001 From: ***** Date: Thu, 10 Nov 2016 16:59:58 -0500 Subject: [PATCH] add comment about yt_outh to all man pages --- NEWS.md | 1 + R/get_captions.R | 3 +++ R/get_channel_stats.R | 3 +++ R/get_comment_threads.R | 3 +++ R/get_comments.R | 3 +++ R/get_playlist_items.R | 3 +++ R/get_playlists.R | 3 +++ R/get_related_videos.R | 3 +++ R/get_stats.R | 3 +++ R/get_subscriptions.R | 3 +++ R/get_video_details.R | 3 +++ R/list_abuse_report_reasons.R | 3 +++ R/list_caption_tracks.R | 3 +++ R/list_channel_activities.R | 3 +++ R/list_channel_resources.R | 3 +++ R/list_channel_sections.R | 3 +++ R/list_channel_videos.R | 3 +++ R/list_guidecats.R | 3 +++ R/list_langs.R | 8 +++++++- R/list_regions.R | 3 +++ R/list_videocats.R | 3 +++ R/list_videos.R | 3 +++ R/yt_topic_search.R | 3 +++ man/get_captions.Rd | 3 +++ man/get_channel_stats.Rd | 3 +++ man/get_comment_threads.Rd | 3 +++ man/get_comments.Rd | 3 +++ man/get_playlist_items.Rd | 3 +++ man/get_playlists.Rd | 3 +++ man/get_related_videos.Rd | 3 +++ man/get_stats.Rd | 3 +++ man/get_subscriptions.Rd | 3 +++ man/get_video_details.Rd | 3 +++ man/list_abuse_report_reasons.Rd | 3 +++ man/list_caption_tracks.Rd | 3 +++ man/list_channel_activities.Rd | 3 +++ man/list_channel_resources.Rd | 3 +++ man/list_channel_sections.Rd | 3 +++ man/list_channel_videos.Rd | 3 +++ man/list_guidecats.Rd | 3 +++ man/list_langs.Rd | 3 +++ man/list_regions.Rd | 3 +++ man/list_videocats.Rd | 3 +++ man/list_videos.Rd | 3 +++ man/yt_topic_search.Rd | 3 +++ 45 files changed, 137 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e107c5a..f16cd09 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # version 0.6.0 +* Based on CRAN feedback, add comment about yt_outh to all man pages * video_id is returned as part of the list for get_stats, get_video_details * handles errors stemming from bad video id for get_stats, get_video_details * fixed bug in get_comment that delivers separate results for diff. filters, error handling for bad comment_id, and now comment_id returned as part of df diff --git a/R/get_captions.R b/R/get_captions.R index c39559d..2e979ac 100644 --- a/R/get_captions.R +++ b/R/get_captions.R @@ -16,6 +16,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_captions(video_id="yJXTXN4xrI8") #' get_captions(id="y3ElXcEME3lSISz6izkWVT5GvxjPu8pA") #' } diff --git a/R/get_channel_stats.R b/R/get_channel_stats.R index 4b6598f..56772ef 100644 --- a/R/get_channel_stats.R +++ b/R/get_channel_stats.R @@ -14,6 +14,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_channel_stats(channel_id="UChTJTbr5kf3hYazJZO-euHg") #' } diff --git a/R/get_comment_threads.R b/R/get_comment_threads.R index 330ae20..7b12674 100644 --- a/R/get_comment_threads.R +++ b/R/get_comment_threads.R @@ -26,6 +26,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_comment_threads(filter = c(video_id="N708P-A45D0")) #' } diff --git a/R/get_comments.R b/R/get_comments.R index d62d225..14ba31f 100644 --- a/R/get_comments.R +++ b/R/get_comments.R @@ -28,6 +28,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_comments(filter = c(comment_id="z13dh13j5rr0wbmzq04cifrhtuypwl4hsdk")) #' get_comments(filter = #' c(comment_id="z13dh13j5rr0wbmzq04cifrhtuypwl4hsdk, z13dh13j5rr0wbmzq04cifrhtuypwl4hsdk")) diff --git a/R/get_playlist_items.R b/R/get_playlist_items.R index a837cdb..5c2c92d 100644 --- a/R/get_playlist_items.R +++ b/R/get_playlist_items.R @@ -18,6 +18,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_playlist_items(filter= c(playlist_id="PLrEnWoR732-CN09YykVof2lxdI3MLOZda")) #' } diff --git a/R/get_playlists.R b/R/get_playlists.R index a64ca18..4b868ce 100644 --- a/R/get_playlists.R +++ b/R/get_playlists.R @@ -18,6 +18,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_playlists(filter=c(channel_id="UChTJTbr5kf3hYazJZO-euHg")) #' } diff --git a/R/get_related_videos.R b/R/get_related_videos.R index 520b880..33b5dd3 100644 --- a/R/get_related_videos.R +++ b/R/get_related_videos.R @@ -16,6 +16,9 @@ #' @references \url{https://developers.google.com/youtube/v3/docs/search/list} #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_related_videos(video_id="yJXTXN4xrI8") #' } diff --git a/R/get_stats.R b/R/get_stats.R index 5790b8d..f28e9ce 100644 --- a/R/get_stats.R +++ b/R/get_stats.R @@ -11,6 +11,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_stats(video_id="N708P-A45D0") #' } diff --git a/R/get_subscriptions.R b/R/get_subscriptions.R index 049e342..e57e321 100644 --- a/R/get_subscriptions.R +++ b/R/get_subscriptions.R @@ -21,6 +21,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_subscriptions(filter=c(channel_id="UChTJTbr5kf3hYazJZO-euHg")) #' } diff --git a/R/get_video_details.R b/R/get_video_details.R index 8dd7d94..3598cc7 100644 --- a/R/get_video_details.R +++ b/R/get_video_details.R @@ -14,6 +14,9 @@ #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' get_video_details(video_id="yJXTXN4xrI8") #' } diff --git a/R/list_abuse_report_reasons.R b/R/list_abuse_report_reasons.R index bb918b4..62e288d 100644 --- a/R/list_abuse_report_reasons.R +++ b/R/list_abuse_report_reasons.R @@ -16,6 +16,9 @@ #' @references \url{https://developers.google.com/youtube/v3/docs/videoAbuseReportReasons/list} #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_abuse_report_reasons() #' list_abuse_report_reasons(part="id") #' list_abuse_report_reasons(part="snippet") diff --git a/R/list_caption_tracks.R b/R/list_caption_tracks.R index b99719e..7484819 100644 --- a/R/list_caption_tracks.R +++ b/R/list_caption_tracks.R @@ -18,6 +18,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_caption_tracks(video_id="yJXTXN4xrI8") #' } diff --git a/R/list_channel_activities.R b/R/list_channel_activities.R index bb54adc..d232201 100644 --- a/R/list_channel_activities.R +++ b/R/list_channel_activities.R @@ -21,6 +21,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_channel_activities(filter = c(channel_id="UCRw8bIz2wMLmfgAgWm903cA")) #' list_channel_activities(filter = c(channel_id="UCRw8bIz2wMLmfgAgWm903cA", regionCode="US")) #' } diff --git a/R/list_channel_resources.R b/R/list_channel_resources.R index 9913d89..deae53b 100644 --- a/R/list_channel_resources.R +++ b/R/list_channel_resources.R @@ -22,6 +22,9 @@ #' @examples #' #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_channel_resources(filter = c(channel_id = "UCT5Cx1l4IS3wHkJXNyuj4TA")) #' list_channel_resources(filter = c(username = "latenight"), part="id, contentDetails") #' list_channel_resources(filter = c(username = "latenight"), part="id, contentDetails", diff --git a/R/list_channel_sections.R b/R/list_channel_sections.R index 0433996..fd7fbf0 100644 --- a/R/list_channel_sections.R +++ b/R/list_channel_sections.R @@ -18,6 +18,9 @@ #' @examples #' #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_channel_sections(c(channel_id="UCRw8bIz2wMLmfgAgWm903cA")) #' } diff --git a/R/list_channel_videos.R b/R/list_channel_videos.R index 756bc56..e811fb8 100644 --- a/R/list_channel_videos.R +++ b/R/list_channel_videos.R @@ -11,6 +11,9 @@ #' @examples #' #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_channel_videos(channel_id = "UCT5Cx1l4IS3wHkJXNyuj4TA") #' list_channel_videos(channel_id = "UCT5Cx1l4IS3wHkJXNyuj4TA", max_results=10) #' } diff --git a/R/list_guidecats.R b/R/list_guidecats.R index 7b352eb..1dfa15a 100644 --- a/R/list_guidecats.R +++ b/R/list_guidecats.R @@ -18,6 +18,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_guidecats(c(region_code = "JP")) #' } diff --git a/R/list_langs.R b/R/list_langs.R index 94b1fe0..a0ba7d1 100644 --- a/R/list_langs.R +++ b/R/list_langs.R @@ -1,13 +1,19 @@ #' List Languages That Youtube Currently Supports #' -#' @return data.frame with 3 columns: hl (two letter abbreviation), name (of the language), etag #' @param hl Language used for text values. Optional. Default is \code{en-US}. For other allowed language codes, see \code{\link{list_langs}}. #' @param \dots Additional arguments passed to \code{\link{tuber_GET}}. #' +#' @return data.frame with 3 columns: hl (two letter abbreviation), name (of the language), etag +#' #' @export +#' #' @references \url{https://developers.google.com/youtube/v3/docs/i18nLanguages/list} +#' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_langs() #' } diff --git a/R/list_regions.R b/R/list_regions.R index 554a21a..0122654 100644 --- a/R/list_regions.R +++ b/R/list_regions.R @@ -9,6 +9,9 @@ #' @references \url{https://developers.google.com/youtube/v3/docs/i18nRegions/list} #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_regions() #' } diff --git a/R/list_videocats.R b/R/list_videocats.R index 51f0cc6..acce623 100644 --- a/R/list_videocats.R +++ b/R/list_videocats.R @@ -14,6 +14,9 @@ #' #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_videocats(c(region_code = "JP")) #' } diff --git a/R/list_videos.R b/R/list_videos.R index 7f5cb79..77b129f 100644 --- a/R/list_videos.R +++ b/R/list_videos.R @@ -16,6 +16,9 @@ #' @references \url{https://developers.google.com/youtube/v3/docs/search/list} #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' list_videos() #' } diff --git a/R/yt_topic_search.R b/R/yt_topic_search.R index 5f5fcc0..59de600 100644 --- a/R/yt_topic_search.R +++ b/R/yt_topic_search.R @@ -8,6 +8,9 @@ #' @export #' @examples #' \dontrun{ +#' +#' # Set API token via yt_oauth() first +#' #' yt_topic_search(topic="Barack Obama") #' } diff --git a/man/get_captions.Rd b/man/get_captions.Rd index 4da1de0..c1a68d2 100644 --- a/man/get_captions.Rd +++ b/man/get_captions.Rd @@ -26,6 +26,9 @@ information. } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_captions(video_id="yJXTXN4xrI8") get_captions(id="y3ElXcEME3lSISz6izkWVT5GvxjPu8pA") } diff --git a/man/get_channel_stats.Rd b/man/get_channel_stats.Rd index f9c41dd..21ed4e8 100644 --- a/man/get_channel_stats.Rd +++ b/man/get_channel_stats.Rd @@ -22,6 +22,9 @@ Get statistics of a Channel } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_channel_stats(channel_id="UChTJTbr5kf3hYazJZO-euHg") } } diff --git a/man/get_comment_threads.Rd b/man/get_comment_threads.Rd index 00af5e9..873434c 100644 --- a/man/get_comment_threads.Rd +++ b/man/get_comment_threads.Rd @@ -39,6 +39,9 @@ Get Comments Threads } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_comment_threads(filter = c(video_id="N708P-A45D0")) } } diff --git a/man/get_comments.Rd b/man/get_comments.Rd index 9993f43..bba439c 100644 --- a/man/get_comments.Rd +++ b/man/get_comments.Rd @@ -41,6 +41,9 @@ Get Comments } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_comments(filter = c(comment_id="z13dh13j5rr0wbmzq04cifrhtuypwl4hsdk")) get_comments(filter = c(comment_id="z13dh13j5rr0wbmzq04cifrhtuypwl4hsdk, z13dh13j5rr0wbmzq04cifrhtuypwl4hsdk")) diff --git a/man/get_playlist_items.Rd b/man/get_playlist_items.Rd index 1b646ae..5ea8f46 100644 --- a/man/get_playlist_items.Rd +++ b/man/get_playlist_items.Rd @@ -32,6 +32,9 @@ Get Playlist Items } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_playlist_items(filter= c(playlist_id="PLrEnWoR732-CN09YykVof2lxdI3MLOZda")) } } diff --git a/man/get_playlists.Rd b/man/get_playlists.Rd index 89b5a2a..39c9644 100644 --- a/man/get_playlists.Rd +++ b/man/get_playlists.Rd @@ -32,6 +32,9 @@ Get Playlists } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_playlists(filter=c(channel_id="UChTJTbr5kf3hYazJZO-euHg")) } } diff --git a/man/get_related_videos.Rd b/man/get_related_videos.Rd index 4da2231..09ac040 100644 --- a/man/get_related_videos.Rd +++ b/man/get_related_videos.Rd @@ -27,6 +27,9 @@ Takes a video id and returns related videos } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_related_videos(video_id="yJXTXN4xrI8") } } diff --git a/man/get_stats.Rd b/man/get_stats.Rd index 73e9d90..7cabf08 100644 --- a/man/get_stats.Rd +++ b/man/get_stats.Rd @@ -19,6 +19,9 @@ Get statistics of a Video } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_stats(video_id="N708P-A45D0") } } diff --git a/man/get_subscriptions.Rd b/man/get_subscriptions.Rd index c87f8fe..b690ccd 100644 --- a/man/get_subscriptions.Rd +++ b/man/get_subscriptions.Rd @@ -36,6 +36,9 @@ Get Subscriptions } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_subscriptions(filter=c(channel_id="UChTJTbr5kf3hYazJZO-euHg")) } } diff --git a/man/get_video_details.Rd b/man/get_video_details.Rd index b8b3f43..824fb0d 100644 --- a/man/get_video_details.Rd +++ b/man/get_video_details.Rd @@ -20,6 +20,9 @@ Get details such as when the video was published, the title, description, thumbn } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + get_video_details(video_id="yJXTXN4xrI8") } } diff --git a/man/list_abuse_report_reasons.Rd b/man/list_abuse_report_reasons.Rd index 60900a4..6f3ae37 100644 --- a/man/list_abuse_report_reasons.Rd +++ b/man/list_abuse_report_reasons.Rd @@ -25,6 +25,9 @@ List reasons that can be used to report abusive videos } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_abuse_report_reasons() list_abuse_report_reasons(part="id") list_abuse_report_reasons(part="snippet") diff --git a/man/list_caption_tracks.Rd b/man/list_caption_tracks.Rd index f1ef6df..9036c02 100644 --- a/man/list_caption_tracks.Rd +++ b/man/list_caption_tracks.Rd @@ -31,6 +31,9 @@ Get Captions of a Video } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_caption_tracks(video_id="yJXTXN4xrI8") } } diff --git a/man/list_channel_activities.Rd b/man/list_channel_activities.Rd index c76abe4..a694751 100644 --- a/man/list_channel_activities.Rd +++ b/man/list_channel_activities.Rd @@ -36,6 +36,9 @@ Returns a list of channel events that match the request criteria. } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_channel_activities(filter = c(channel_id="UCRw8bIz2wMLmfgAgWm903cA")) list_channel_activities(filter = c(channel_id="UCRw8bIz2wMLmfgAgWm903cA", regionCode="US")) } diff --git a/man/list_channel_resources.Rd b/man/list_channel_resources.Rd index 7b89a90..32c7fba 100644 --- a/man/list_channel_resources.Rd +++ b/man/list_channel_resources.Rd @@ -36,6 +36,9 @@ Returns List of Requested Channel Resources \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_channel_resources(filter = c(channel_id = "UCT5Cx1l4IS3wHkJXNyuj4TA")) list_channel_resources(filter = c(username = "latenight"), part="id, contentDetails") list_channel_resources(filter = c(username = "latenight"), part="id, contentDetails", diff --git a/man/list_channel_sections.Rd b/man/list_channel_sections.Rd index 7bad782..4e45431 100644 --- a/man/list_channel_sections.Rd +++ b/man/list_channel_sections.Rd @@ -28,6 +28,9 @@ Returns list of channel sections that channel id belongs to. \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_channel_sections(c(channel_id="UCRw8bIz2wMLmfgAgWm903cA")) } } diff --git a/man/list_channel_videos.Rd b/man/list_channel_videos.Rd index 205d72c..3bb85f7 100644 --- a/man/list_channel_videos.Rd +++ b/man/list_channel_videos.Rd @@ -22,6 +22,9 @@ Returns List of Requested Channel Videos \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_channel_videos(channel_id = "UCT5Cx1l4IS3wHkJXNyuj4TA") list_channel_videos(channel_id = "UCT5Cx1l4IS3wHkJXNyuj4TA", max_results=10) } diff --git a/man/list_guidecats.Rd b/man/list_guidecats.Rd index 1a253d5..c4b7a8a 100644 --- a/man/list_guidecats.Rd +++ b/man/list_guidecats.Rd @@ -25,6 +25,9 @@ Get List of categories that can be associated with YouTube channels } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_guidecats(c(region_code = "JP")) } } diff --git a/man/list_langs.Rd b/man/list_langs.Rd index b237fb9..177e6cb 100644 --- a/man/list_langs.Rd +++ b/man/list_langs.Rd @@ -19,6 +19,9 @@ List Languages That Youtube Currently Supports } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_langs() } } diff --git a/man/list_regions.Rd b/man/list_regions.Rd index 9d158a3..6fab04e 100644 --- a/man/list_regions.Rd +++ b/man/list_regions.Rd @@ -19,6 +19,9 @@ List Content Regions That Youtube Currently Supports } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_regions() } } diff --git a/man/list_videocats.Rd b/man/list_videocats.Rd index bc51ad9..c433bda 100644 --- a/man/list_videocats.Rd +++ b/man/list_videocats.Rd @@ -23,6 +23,9 @@ List of Categories That Can be Associated with Videos } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_videocats(c(region_code = "JP")) } } diff --git a/man/list_videos.Rd b/man/list_videos.Rd index e7726b3..76951e2 100644 --- a/man/list_videos.Rd +++ b/man/list_videos.Rd @@ -35,6 +35,9 @@ List Videos } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + list_videos() } } diff --git a/man/yt_topic_search.Rd b/man/yt_topic_search.Rd index 4b75b6d..4daa30c 100644 --- a/man/yt_topic_search.Rd +++ b/man/yt_topic_search.Rd @@ -21,6 +21,9 @@ It uses the Freebase list of topics } \examples{ \dontrun{ + +# Set API token via yt_oauth() first + yt_topic_search(topic="Barack Obama") } }