Handle Results

When implementing custom checkers in FireflyAIO, it's important to understand the expected return values based on the account's validation status. Here are the guidelines for returning appropriate responses:

Valid Account

  • Hit: If the account is valid, you should return "Hit".

  • Hit with Capture: If you want to capture additional information about the account, return "Hit:Capture", where Capture can be any relevant data such as Account Balance, Plan, etc.

Example:

-- For a valid account without capture
return "Hit"

-- For a valid account with capture (e.g., capturing account balance)
return "Hit:Account Balance: $100"

Invalid Account

  • Fail: If the account is invalid, return "Fail".

Example:

-- For an invalid account
return "Fail"

Request Failure

  • Retry: If the request fails due to network issues, server errors, or other transient problems, return "Retry".

Example:

-- For a failed request that should be retried
return "Retry"

Free Account

  • Free: If the account is valid and is a free account, you should return "Free".

  • Free with Capture: If you want to capture additional information about the free account, return "Free:Capture", where Capture can be any relevant data.

Example:

-- For a valid free account without capture
return "Free"

-- For a valid free account with capture (e.g., capturing subscription status)
return "Free:Subscription: Free Tier"

Two-Factor Authentication (2FA)

  • 2FA: If the account requires two-factor authentication, you should return "2FA".

  • 2FA with Capture: If you want to capture additional information about the 2FA requirement, return "2FA:Capture", where Capture can be any relevant data.

Example:

-- For an account requiring 2FA without capture
return "2FA"

-- For an account requiring 2FA with capture (e.g., capturing 2FA method)
return "2FA:Method: SMS"

By following these guidelines, you ensure that FireflyAIO correctly handles the results of your custom checkers, leading to efficient and accurate account validation.

Last updated