Socialmetrica/Socialmetrica.package/Nitter.class/class/instancesCache.st

9 lines
330 B
Smalltalk
Raw Permalink Normal View History

2024-02-10 17:34:50 +00:00
accessing
instancesCache
| cache cacheFile |
cacheFile := FileLocator temp / 'nitter-instances.ston'.
cacheFile exists
ifFalse: [
cache := STON fromString: 'https://status.d420.de/api/v1/instances' asUrl retrieveContents.
MarkupFile exportAsFileOn: cacheFile containing: cache ].
^ STON fromString: cacheFile contents