Open
Description
Currently how GhEntity and it's children classes work, is that you give it a raw dictionary, and from there GhEntity
creates a ZnClient
This has issues when rate limiting is had, or when private data is wanted
GhEntity >> createFrom: aKey with: aBlock onError: anErrorBlock [
^ rawData
at: aKey
ifPresent: [ :url |
| trimmedUrl |
trimmedUrl := url
copyWithRegex: '{.*}'
matchesTranslatedUsing: [ :each | ''].
ZnClient new
get: trimmedUrl
onSuccess: [ :result |
[
aBlock value: (STON fromString: result)
] on: Error do: [ :e | anErrorBlock value ] ]
onError: [ anErrorBlock value ] ]
ifAbsent: [ {} ]
]
This can easily be changed such that ghEntity has a new slot for an authentication key if desired.
I may work on this myself, and submit a patch as it seems quite trivial to do, however I may not have the time.
Metadata
Metadata
Assignees
Labels
No labels