Skip to content

Commit

Permalink
fixes #41 based on @Canin
Browse files Browse the repository at this point in the history
  • Loading branch information
soodoku committed Dec 4, 2017
1 parent 13006c2 commit d1a11af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -2,6 +2,7 @@

* A new vignette for tuber that shows how to deal with emojis in tuber
* A new function for fetching all the comments, including replies.
* Added the missing partner scope fixing #41.

# version 0.9.2

Expand Down
8 changes: 7 additions & 1 deletion R/yt_oauth.R
Expand Up @@ -6,7 +6,8 @@
#'
#' @param app_id client id; required; no default
#' @param app_secret client secret; required; no default
#' @param scope Character. \code{ssl}, \code{basic}, \code{own_account_readonly}, \code{upload_and_manage_own_videos} and \code{partner_audit}.
#' @param scope Character. \code{ssl}, \code{basic}, \code{own_account_readonly}, \code{upload_and_manage_own_videos},
#' \code{partner}, and \code{partner_audit}.
#' Required. \code{ssl} and \code{basic} are basically interchangeable. Default is \code{ssl}.
#' @param token path to file containing the token. If a path is given, the function will first try to read from it.
#' Default is \code{.httr-oauth} in the local directory.
Expand Down Expand Up @@ -72,6 +73,11 @@ yt_oauth <- function (app_id = NULL, app_secret = NULL, scope = "ssl",
google_token <- oauth2.0_token(oauth_endpoints("google"), myapp,
scope = "https://www.googleapis.com/auth/youtubepartner-channel-audit",
...)
} else if (scope == "partner") {

google_token <- oauth2.0_token(oauth_endpoints("google"), myapp,
scope = "https://www.googleapis.com/auth/youtubepartner",
...)
}
}
options(google_token = google_token)
Expand Down
3 changes: 2 additions & 1 deletion man/yt_oauth.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d1a11af

Please sign in to comment.