ExoRepo/src/ExoRepo/GitHubAsset.class.st

57 lines
1.2 KiB
Smalltalk

Class {
#name : #GitHubAsset,
#superclass : #Object,
#instVars : [
'name',
'created',
'updated',
'size',
'downloadLink'
],
#category : #'ExoRepo-External'
}
{ #category : #accessing }
GitHubAsset class >> fromDictionary: aGitHubAssetDictionary [
| response |
response := self new
name: (aGitHubAssetDictionary at: 'name');
size: (aGitHubAssetDictionary at: 'size');
created: (aGitHubAssetDictionary at: 'created_at');
updated: (aGitHubAssetDictionary at: 'updated_at');
downloadLink: (aGitHubAssetDictionary at: 'browser_download_url').
^ response
]
{ #category : #accessing }
GitHubAsset >> created: anObject [
created := anObject
]
{ #category : #accessing }
GitHubAsset >> downloadLink: anUrl [
downloadLink := anUrl
]
{ #category : #accessing }
GitHubAsset >> name: anObject [
name := anObject
]
{ #category : #accessing }
GitHubAsset >> printOn: aStream [
super initialize.
aStream
nextPutAll: '(', name, ')'
]
{ #category : #accessing }
GitHubAsset >> size: anObject [
size := anObject
]
{ #category : #accessing }
GitHubAsset >> updated: anObject [
updated := anObject
]