Returns the maximum value of all the results returned by the provided subtasks and subjobs. Nested tasks or jobs must return a Number.

Input: None

Returns: A numerical result.

Example: Returns the maximum numerical result from 3 tasks.

{"maxTask": {"tasks": [{"valueTask": {"value": 10}},{"valueTask": {"value": 20}},{"valueTask": {"value": 30}}]}}

Example: Returns the maximum numerical result from 3 jobs.

{"maxTask": {"jobs": [{"tasks": [{"httpTask": {"url": "https://www.binance.com/api/v3/ticker/price?symbol=SOLUSDT"}},{"jsonParseTask": {"path": "$.price"}}]},{"tasks": [{"httpTask": {"url": "https://www.binance.us/api/v3/ticker/price?symbol=SOLUSD"}},{"jsonParseTask": {"path": "$.price"}}]},{"tasks": [{"httpTask": {"url": "https://api-pub.bitfinex.com/v2/tickers?symbols=tSOLUSD"}},{"jsonParseTask": {"path": "$[0][7]"}}]}]}}

Implements

Constructors

  • Constructs a new MaxTask.

    Parameters

    • Optional properties: IMaxTask

      Properties to set

    Returns MaxTask

Properties

jobs: IOracleJob[]

A list of subjobs to process and produce a list of result values.

tasks: ITask[]

A list of subtasks to process and produce a list of result values.

Methods

  • Converts this MaxTask to JSON.

    Returns {
        [k: string]: any;
    }

    JSON object

    • [k: string]: any
  • Creates a new MaxTask instance using the specified properties.

    Parameters

    • Optional properties: IMaxTask

      Properties to set

    Returns MaxTask

    MaxTask instance

  • Decodes a MaxTask message from the specified reader or buffer.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    • Optional length: number

      Message length if known beforehand

    Returns MaxTask

    MaxTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Decodes a MaxTask message from the specified reader or buffer, length delimited.

    Parameters

    • reader: Uint8Array | Reader

      Reader or buffer to decode from

    Returns MaxTask

    MaxTask

    Throws

    If the payload is not a reader or valid buffer

    Throws

    If required fields are missing

  • Encodes the specified MaxTask message. Does not implicitly verify messages.

    Parameters

    • message: IMaxTask

      MaxTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Encodes the specified MaxTask message, length delimited. Does not implicitly verify messages.

    Parameters

    • message: IMaxTask

      MaxTask message or plain object to encode

    • Optional writer: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Creates a MaxTask message from a plain object. Also converts values to their respective internal types.

    Parameters

    • object: {
          [k: string]: any;
      }

      Plain object

      • [k: string]: any

    Returns MaxTask

    MaxTask

  • Gets the default type url for MaxTask

    Parameters

    • Optional typeUrlPrefix: string

      your custom typeUrlPrefix(default "type.googleapis.com")

    Returns string

    The default type url

  • Creates a plain object from a MaxTask message. Also converts values to other types if specified.

    Parameters

    • message: MaxTask

      MaxTask

    • Optional options: IConversionOptions

      Conversion options

    Returns {
        [k: string]: any;
    }

    Plain object

    • [k: string]: any
  • Verifies a MaxTask message.

    Parameters

    • message: {
          [k: string]: any;
      }

      Plain object to verify

      • [k: string]: any

    Returns string

    null if valid, otherwise the reason why it is not

Generated using TypeDoc