{
  "endpoint": "QrGenerationHandler",
  "preferredHttpPath": "qr",
  "alternateHttpPaths": [
    "HttpQrGeneration"
  ],
  "summary": "QR code image generation-related APIs.",
  "description": "This endpoint provides APIs for generating either PNG or SVG QR code images, but only QR codes that point to approved domains.",
  "apis": [
    {
      "name": "GenerateQrCodePng",
      "httpMethod": "GET",
      "httpPathRegex": "^/pngqr64/(?<hostnamePrefix>[^?/&]+)",
      "subPathPattern": "/pngqr64/{hostnamePrefix}",
      "summary": "Deprecated.  Generates a QR code from the specified parameters.  Currently not authenticated, but the TLD must be {product}.com or localhost, so it shouldn't be particularly useful for third parties.",
      "parameters": [
        {
          "name": "hostnamePrefix",
          "required": true,
          "type": "String",
          "description": "The part of the hostname prior to {product}.com to return (unless running locally, in which case this will be ignored)."
        },
        {
          "name": "pathAndQueryStringPattern",
          "required": true,
          "type": "String",
          "description": "A pattern indicating the path and query string portion of the URL to put into the QR code."
        },
        {
          "name": "useLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether or not to put the product logo in the QR code."
        },
        {
          "name": "colorLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether to use the colorLogo logo, as opposed to black and white."
        },
        {
          "name": "pixels",
          "required": false,
          "type": "Int32",
          "description": "The number of pixels indicating the size of the desired PNG QR code."
        }
      ],
      "return": {
        "type": "CreateQrCodeImageResponse",
        "description": "A <see cref=\"T:PicMeApi.CreateQrCodeImageResponse\" /> containing the QR code image."
      }
    },
    {
      "name": "GenerateQrCodeSvg",
      "httpMethod": "GET",
      "httpPathRegex": "^/qr64/(?<hostnamePrefix>[^?/&]+)",
      "subPathPattern": "/qr64/{hostnamePrefix}",
      "summary": "Generates a QR code with a logo from the specified parameters.  Currently not authenticated, but the TLD must be {Settings.ProductName.Value.ToLowerInvariant()}.com or localhost, so it shouldn't be particularly useful for third parties.",
      "parameters": [
        {
          "name": "hostnamePrefix",
          "required": true,
          "type": "String",
          "description": "The part of the hostname prior to {Settings.ProductName.Value.ToLowerInvariant()}.com to return (unless running locally, in which case this will be ignored)."
        },
        {
          "name": "pathAndQueryStringPattern",
          "required": true,
          "type": "String",
          "description": "A pattern indicating the path and query string portion of the URL to put into the QR code."
        },
        {
          "name": "useLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether or not to put the product logo in the QR code."
        },
        {
          "name": "colorLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether to use the colorLogo logo, as opposed to black and white."
        }
      ],
      "return": {
        "type": "CreateQrCodeImageResponse",
        "description": "A <see cref=\"T:PicMeApi.CreateQrCodeImageResponse\" /> containing the QR code image."
      }
    },
    {
      "name": "GenerateTotpQrCodeSvg",
      "httpMethod": "GET",
      "httpPathRegex": "^/totp-svg/(?<algorithm>[^?/&]+)",
      "subPathPattern": "/totp-svg/{algorithm}",
      "summary": "Generates a TOTP QR code with a logo from the specified parameters.  Currently allows unauthenticated access, but the issuer is hardcoded as the appliction name, so it shouldn't be particularly useful for third parties.",
      "parameters": [
        {
          "name": "algorithm",
          "required": true,
          "type": "String",
          "description": "The encryption algorithm to put into the TOTP QR code."
        },
        {
          "name": "accountName",
          "required": true,
          "type": "String",
          "description": "The account name to be put into the QR code string.  This should tell the authenticator app which account to attach the TOTP secret to."
        },
        {
          "name": "secret",
          "required": true,
          "type": "String",
          "description": "The secret to put into the TOTP QR code."
        },
        {
          "name": "digits",
          "required": false,
          "type": "Int32",
          "description": "The number of digits to tell the QR code reader to use when generating the TOTP code."
        },
        {
          "name": "useLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether or not to put the product logo in the QR code."
        },
        {
          "name": "colorLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether to use the colorLogo logo, as opposed to black and white."
        }
      ],
      "return": {
        "type": "CreateQrCodeImageResponse",
        "description": "A <see cref=\"T:PicMeApi.CreateQrCodeImageResponse\" /> containing the QR code image."
      }
    },
    {
      "name": "GenerateTotpQrCodePng",
      "httpMethod": "GET",
      "httpPathRegex": "^/totp-png/(?<algorithm>[^?/&]+)",
      "subPathPattern": "/totp-png/{algorithm}",
      "summary": "Generates a TOTP QR code with a logo from the specified parameters.  Currently allows unauthenticated access, but the issuer is hardcoded as the appliction name, so it shouldn't be particularly useful for third parties.",
      "parameters": [
        {
          "name": "algorithm",
          "required": true,
          "type": "String",
          "description": "The encryption algorithm to put into the TOTP QR code."
        },
        {
          "name": "accountName",
          "required": true,
          "type": "String",
          "description": "The account name to be put into the QR code string.  This should tell the authenticator app which account to attach the TOTP secret to."
        },
        {
          "name": "secret",
          "required": true,
          "type": "String",
          "description": "The secret to put into the TOTP QR code."
        },
        {
          "name": "digits",
          "required": false,
          "type": "Int32",
          "description": "The number of digits to tell the QR code reader to use when generating the TOTP code."
        },
        {
          "name": "useLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether or not to put the product logo in the QR code."
        },
        {
          "name": "colorLogo",
          "required": false,
          "type": "Boolean",
          "description": "Whether to use the colorLogo logo, as opposed to black and white."
        }
      ],
      "return": {
        "type": "CreateQrCodeImageResponse",
        "description": "A <see cref=\"T:PicMeApi.CreateQrCodeImageResponse\" /> containing the QR code image."
      }
    }
  ],
  "types": [
    {
      "name": "CreateQrCodeImageResponse",
      "summary": "A record containing the response to a request to create a QR code image.",
      "type": "composite",
      "members": [
        {
          "name": "contentType",
          "type": "MimeType",
          "summary": "A <see cref=\"T:AmbientServices.MimeType\" /> containing the RFC MIME-type of the generated image."
        },
        {
          "name": "fileExtension",
          "type": "String",
          "summary": "The appropriate file extension in case the end user wants to save the image."
        },
        {
          "name": "base64Encoded",
          "type": "String",
          "summary": "The BASE-64 encoded image data."
        }
      ]
    },
    {
      "name": "MimeType",
      "summary": "A struct that holds an HTTP MimeType value.",
      "type": "proxy",
      "representedBy": "String"
    }
  ]
}