R client of COTOHA API for Developers (unofficial)

Installation

remotes::install_github("paithiov909/conifer")

Usage of COTOHA API client

Getting ready to use client

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)

Calling API

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

License

MIT license.

Icons made by bqlqn from www.flaticon.com.