What's next in googleway: keys

Due: version 2.4

In my quest to make my life easier I've created a set_key() function. This means you can set an API key once, and use it in multiple functions.

In previous versions you had to explicitly set the key argument in each function, for example

google_directions(origin = c(-37.8179746, 144.9668636),
  destination = c(-37.81659, 144.9841),
  mode = "walking",
  key = "my_api_key")

google_geocode(address = "MCG, Melbourne, Australia",
  simplify = TRUE,
  key = "my_api_key")

Now you can use set_key() and it will be available for all function calls

set_key("my_api_key")
google_directions(origin = c(-37.8179746, 144.9668636),
  destination = c(-37.81659, 144.9841),
  mode = "walking")

google_geocode(address = "MCG, Melbourne, Australia",
  simplify = TRUE)

You can view the keys you've set using google_keys()

google_keys()
Google API keys
 -  default : my_api_key 
 -  map :  
 -  directions :  
 -  distance :  
 -  elevation :  
 -  geocode :  
 -  places :  
 -  place_autocomplete :  
 -  place_details :  
 -  reverse_geocode :  
 -  roads :  
 -  streetview :  
 -  timezone :

Notice that within set_key() you can set keys for specific APIs, or if you don't specify the API the key will be set as the default one.