Eichhoernchen/SiriServer — Issue #153: Central API Keystorage
Author: Eichhoernchen
Created: 2012-02-08 21:00:30+00:00
State: open

I think yesterday, I was against the idea of a central API key store... but now I think it is a good idea (thx to the one asking for it)...

In the future plugins might use the same api for different things, maintaining several api keys in several files is a hassle...

How would you like your api-keys to be structured?

Central file where you have something like: "ApiName"="APIKEY"
(I don't think we should use a database for this, too compilcated to insert things there) (good filename?)

How can we ensure 2 different plugins needing the same api will use the same "ApiName" as identifier? (Or will this be an autoadaption issue?)

Are there api's with username/password combination? such that we would need:

"ApiName" = "user@password"

Do you think a plugin should be able to request an API key like this:

key = self.apiKeyForApiName("wolframalpha")

Or should we directly forbid the loading of a plugin if no necessary api key can be found... so the api key should not be accesible through the plugin class but rather be requested in the file like:

myApiKey = APIManager.apiKeyForApiName("WoLfRamAlpHa")

(we should convert everything to lowercase)

Thoughts on that?