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

2024.7.28 • Public • Published

Схемы и клиент для взаимодействия с API Твой ФФ

Представляет интерфейс для совершения запросов к API по адресу https://api.profcomff.com.

Использование

import { createClient } from '@profcomff/api-uilib';

// Setup client with base API path
// You can use environment `import.meta.env.VITE_API_URL` for example
const apiClient = createClient("https://api.test.profcomff.com");

// Setup token for requests to API
// It is optional, only for routes with authention
setupAuth("myApiTokenHere");

// Make request
const me_with_scopes = await apiClient.GET("/auth/me", {
    params: {
        query: {
            info: ["session_scopes"]
        }
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i @profcomff/api-uilib

Weekly Downloads

88

Version

2024.7.28

License

BSD 3-Clause

Unpacked Size

304 kB

Total Files

18

Last publish

Collaborators

  • physphile
  • dyakovri