R client of COTOHA API for Developers (unofficial)
remotes::install_github("paithiov909/conifer")
First of all, you should set COTOHA_ID
and COTOHA_SECRET
as environment vars. Run Sys.setenv(COTOHA_ID = "Your Client ID")
and Sys.setenv(COTOHA_SECRET = "Your Client secret")
, then try snippets below.
token <- conifer::getAccessToken("Access Token Publish URL comes here.")
client <- conifer::cotoha(token)
See the reference for more info.
client$keyword("翔んで埼玉 お前はまだグンマを知らない")
#> [[1]]
#> [[1]]$form
#> [1] "お前"
#>
#> [[1]]$score
#> [1] 22.838
#>
#>
#> [[2]]
#> [[2]]$form
#> [1] "グンマ"
#>
#> [[2]]$score
#> [1] 13.0929