Charmworld0 Class
Api helper for the updated charmworld api v0.
Item Index
Attributes
Methods
_makeRequest
-
args
Send the actual request and handle response from the api.
Parameters:
-
argsObjectany query params and arguments required.
_resultsToCharmlist
-
JSON
Given a result list, turn that into a BrowserCharmList object for the application to use.
Parameters:
-
JSONObjectdecoded data from response.
charm
-
charmID -
callbacks -
bindScope
Api call to fetch a charm's details.
Parameters:
-
charmIDStringthe charm to fetch.
-
callbacksObjectthe success/failure callbacks to use.
-
bindScopeObjectthe scope of this in the callbacks.
file
-
charmID -
filename -
callbacks -
bindScope
Fetch the contents of a charm's file.
Parameters:
-
charmIDStringthe id of the charm's file we want.
-
filenameStringthe path/name of the file to fetch content.
-
callbacksObjectthe success/failure callbacks.
-
bindScopeObjectthe scope for this in the callbacks.
initializer
-
cfg
Initialize the API helper. Constructs a reusable datasource for all calls.
Parameters:
-
cfgObjectconfiguration object.
interesting
()
Object
Fetch the interesting landing content from the charmworld api.
Returns:
qa
-
charmID -
callbacks -
bindScope
Load the QA data for a specific charm.
Parameters:
-
charmIDStringthe charm to fetch qa data for.
-
callbacksObjectthe success/failure callbacks to use.
-
bindScopeObjectthe scope for 'this' in the callbacks.
search
-
text -
callbacks -
bindScope
Api call to search charms
Parameters:
-
textStringthe search text.
-
callbacksObjectthe success/failure callbacks to use.
-
bindScopeObjectthe scope of this in the callbacks.
