mdl_token: Obtains a Mendeley Token valid for the current session.

Description Usage Arguments Examples

View source: R/mendeleyr.R

Description

The first time you get the token you will need to authorise your application (mendeleyr) access to your account.

Usage

1

Arguments

mendeley_conf

a list with two items: client_id and client_secret. If it is a file path to a json file, it will be loaded with mdl_conf_load()

cache

A logical value or a string. TRUE means to cache using the default cache file .httr-oauth, FALSE means don't cache, and NA means to guess using some sensible heuristics. A string mean use the specified path as the cache file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
 # loads secret from ".mendeley_conf.json" in current directory:
token <- mdl_token()
# loads secret from "secret.json" in current directory
token <- mdl_token("secret.json")
# Loads secret from code (not recommended, as it may be accidentally redistributed)
token <- mdl_token(list(client_id = "given-by-mendeley", client_secret = "given-by-mendeley"))


## End(Not run)

zeehio/mendeleyr documentation built on May 6, 2019, 10:54 a.m.