diff --git a/src/MyCounter/Challenge0.class.st b/src/MyCounter/Challenge0.class.st new file mode 100644 index 0000000..3f9d519 --- /dev/null +++ b/src/MyCounter/Challenge0.class.st @@ -0,0 +1,19 @@ +Class { + #name : #Challenge0, + #superclass : #Object, + #instVars : [ + 'response' + ], + #category : #MyCounter +} + +{ #category : #actions } +Challenge0 >> fetch [ + + response := ZnEasy getPng: 'http://pharo.org/files/pharo.png'. +] + +{ #category : #actions } +Challenge0 >> open [ + response asMorph openInWorld +] diff --git a/src/MyCounter/Challenge1.class.st b/src/MyCounter/Challenge1.class.st new file mode 100644 index 0000000..63da009 --- /dev/null +++ b/src/MyCounter/Challenge1.class.st @@ -0,0 +1,22 @@ +Class { + #name : #Challenge1, + #superclass : #Object, + #instVars : [ + 'response' + ], + #category : #MyCounter +} + +{ #category : #actions } +Challenge1 >> fetch [ + |email url asHex| + email := MD5 new hashMessage: 'belka@caraus.de'. + asHex := email hex asString. + url := 'http://www.gravatar.com/avatar/', asHex, '.jpg'. + response := ZnEasy getJpeg: url +] + +{ #category : #actions } +Challenge1 >> open [ + response asMorph openInHand +]