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
|
accessing
|
||||||
loadKeys
|
loadKeys
|
||||||
keys := STONJSON fromString: FileLocator home / '.config/Datanalitica/twitter-api-keys.json' contents.
|
keys := STONJSON fromString: self apiKeysFile contents.
|
||||||
^ self keys
|
^ self
|
@ -5,6 +5,7 @@
|
|||||||
"classinstvars" : [ ],
|
"classinstvars" : [ ],
|
||||||
"pools" : [ ],
|
"pools" : [ ],
|
||||||
"classvars" : [
|
"classvars" : [
|
||||||
|
"apiKeysFile",
|
||||||
"keys"
|
"keys"
|
||||||
],
|
],
|
||||||
"instvars" : [
|
"instvars" : [
|
||||||
|
Loading…
Reference in New Issue
Block a user