Socialmetrica/Socialmetrica.package/NitterUser.class/instance/exportProfileImageOn..st

14 lines
372 B
Smalltalk

accessing
exportProfileImageOn: fileReference
| file |
file := fileReference asFileReference.
file exists ifFalse: [
file ensureCreateFile.
file binaryWriteStreamDo: [ :stream |
stream nextPutAll: profileImageUrl asUrl retrieveContents ].
self class inform: 'Exported as: ', String cr, file fullName.
^ file
].
self downloadWithRenaming: fileReference