Improving API keys loading.
This commit is contained in:
parent
9e746738c9
commit
0d24cc738f
@ -0,0 +1,3 @@
|
||||
accessing
|
||||
apiKeysFile: aFileReference
|
||||
apiKeysFile := aFileReference
|
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
apiKeysFile
|
||||
"Return the defined apiKeysFile or assign a default location following the Linux Standard
|
||||
File Hierarchy, which is relatively portable to other Operative Systems."
|
||||
^ apiKeysFile ifNil: [ apiKeysFile := FileLocator home / '.config/Datanalitica/twitter-api-keys.json' ]
|
@ -1,4 +1,4 @@
|
||||
accessing
|
||||
loadKeys
|
||||
keys := STONJSON fromString: FileLocator home / '.config/Datanalitica/twitter-api-keys.json' contents.
|
||||
^ self keys
|
||||
keys := STONJSON fromString: self apiKeysFile contents.
|
||||
^ self
|
@ -5,6 +5,7 @@
|
||||
"classinstvars" : [ ],
|
||||
"pools" : [ ],
|
||||
"classvars" : [
|
||||
"apiKeysFile",
|
||||
"keys"
|
||||
],
|
||||
"instvars" : [
|
||||
|
Loading…
Reference in New Issue
Block a user