Class: $.BulkDownloadRequestDelegate
- Inherits:
-
Toybox.Lang.Object
-
Toybox.Lang.Object
-
Overview
Helper class makes a web or image request with context data.
Instance Member Summary collapse
- _callback as Lang.Method(code as Lang.Number) as Void
Instance Method Summary collapse
-
initialize(callback as Lang.Method(code as Lang.Number) as Void)
Constructor.
-
makeImageRequest(url as Lang.String, params as Lang.Dictionary or Null, options as { :palette as Lang.Array<Lang.Number>, :maxWidth as Lang.Number, :maxHeight as Lang.Number, :dithering as Communications.Dithering }) as Void
Make an image request using the given options.
-
makeWebRequest(url as Lang.String, params as Lang.Dictionary<Lang.Object, Lang.Object> or Null, options as { :method as Communications.HttpRequestMethod, :headers as Lang.Dictionary, :responseType as Communications.HttpResponseContentType, :context as Lang.Object or Null, :maxBandwidth as Lang.Number, :fileDownloadProgressCallback as Lang.Method(totalBytesTransferred as Lang.Number, fileSize as Lang.Number or Null) as Void } or Null) as Void
Make a web request using the given options.
-
onImageResponse(code as Lang.Number, data as WatchUi.BitmapResource or Graphics.BitmapReference or Null) as Void
Handle completed image request.
-
onWebResponse(code as Lang.Number, data as Lang.Dictionary or Lang.String or Null) as Void
Handle completed web request.
Instance Attribute Details
var _callback as Lang.Method(code as Lang.Number) as Void
Instance Method Details
initialize(callback as Lang.Method(code as Lang.Number) as Void)
Constructor
makeImageRequest(url as Lang.String, params as Lang.Dictionary or Null, options as { :palette as Lang.Array<Lang.Number>, :maxWidth as Lang.Number, :maxHeight as Lang.Number, :dithering as Communications.Dithering }) as Void
Make an image request using the given options.
makeWebRequest(url as Lang.String, params as Lang.Dictionary<Lang.Object, Lang.Object> or Null, options as { :method as Communications.HttpRequestMethod, :headers as Lang.Dictionary, :responseType as Communications.HttpResponseContentType, :context as Lang.Object or Null, :maxBandwidth as Lang.Number, :fileDownloadProgressCallback as Lang.Method(totalBytesTransferred as Lang.Number, fileSize as Lang.Number or Null) as Void } or Null) as Void
Make a web request using the given options.
onImageResponse(code as Lang.Number, data as WatchUi.BitmapResource or Graphics.BitmapReference or Null) as Void
Handle completed image request
onWebResponse(code as Lang.Number, data as Lang.Dictionary or Lang.String or Null) as Void
Handle completed web request