import React, { useState } from 'react' import { Button, MarketingDrawer } from '@app/components/general' import { Box } from '@a11ywatch/ui' import { TextSkeleton } from '@app/components/placeholders' import { UserManager, AppManager } from '@app/managers' import { useUserData } from '@app/data' import { metaSetter } from '@app/utils' import { GrCopy } from 'react-icons/gr' import { companyName } from '@app/configs' import { apiRoutes } from '@app/templates/rest-api' import { ApiCell } from '@app/components/general/cells/api-info-cell' import { Header } from '@app/components/general/header' import { SectionContainer } from '@app/components/stateless/containers/section-container' import { APIInfoBlock } from '@app/components/general/blocks/api-info' // TODO: GENERATE DOCS FROM API function ApiInfo() { const [keyVisible, setKey] = useState(false) const { data, loading } = useUserData() const { user } = data ?? { user: null } const toggleKey = () => setKey((c) => !c) const copyText = (text: string) => (e: React.MouseEvent): void => { e?.preventDefault() navigator.clipboard.writeText(text) AppManager.toggleSnack(true, `Copied: ${text}`, 'success') } // token const token = UserManager.token const authed = !!user return (
Web Accessibility API

The free web accessibility API built to handle large workloads.

In order to get started using the A11yWatch API you need to add your authorization header with the JWT format Bearer TOKEN.

For more information go to the{' '} OpenAPI ,{' '} GraphQL , or{' '} gRPC {' '} documentation.

{!data?.user && loading ? ( ) : data?.user ? (
Toggle the visibility of your authentication token
Copy your authentication token to clipboard

{token}

) : null}
    {apiRoutes.map((ro, i: number) => { return (
    • {ro.routes.map((route: any, ii: number) => { const routeKey = `api-info-route-${i}-${ii}` return ( ) })}
  • ) })}

By default, the {companyName} API docs demonstrate using curl to interact with the API over HTTP. Most routes allow params to be sent from the url or the body. It{`'`}s best to stick to using the body for PUTS and POST request since some params are set to be arrays and other none string shapes. In the example replace a11ywatch.com with the website you want to target. Using{' '} {companyName} on the CI to up keep accessibility will save thousands - millions of dollars of machine uptime and developer uptime due to speed and efficiency. We can process over 15,000 urls in seconds or minutes depending on if the website is being tested locally or external.

) } export default metaSetter( { ApiInfo }, { title: `${companyName}: Web Accessibility API`, description: `The web accessibility API for testing in real time. Determine accurate image alts and other inclusive recommendations with OpenAPI, graphQL, or gRPC.`, gql: true, } )