@scalar/api-client
TypeScript icon, indicating that this package has built-in type declarations

1.2.9 • Public • Published

Scalar API Client

Version Downloads License Discord

Installation

npm install @scalar/api-client

Usage

<script setup>
import { ApiClient } from '@scalar/api-client'
</script>

<template>
  <ApiClient />
</template>

Props

proxyUrl?: string

Pass an URL of a request proxy to avoid CORS issues.

Composable

You can use useRequestStore() to interact with the API client.

readOnly

const { readOnly } = useRequestStore()

readOnly.value = false

activeRequest

const { activeRequest } = useRequestStore()

console.log(activeRequest)

setActiveRequest

const { setActiveRequest } = useRequestStore()

setActiveRequest({
  url: 'https://echo.scalar.com'
  type: 'GET,
  path: '/foobar'
})

Package Sidebar

Install

npm i @scalar/api-client

Weekly Downloads

10,155

Version

1.2.9

License

MIT

Unpacked Size

1.53 MB

Total Files

221

Last publish

Collaborators

  • amritkahlon
  • scalar_geoff
  • mason-little
  • hwkr
  • tommastro
  • cameronrohani
  • hanspagel
  • marclave