New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mittwald/api-client

Package Overview
Dependencies
Maintainers
2
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mittwald/api-client

Auto-generated client for the mittwald API

  • 2.0.5
  • npm
  • Socket score

Version published
Weekly downloads
637
decreased by-25.58%
Maintainers
2
Weekly downloads
 
Created
Source

mittwald API JavaScript client

This package contains a (mostly auto-generated) JavaScript client for the mittwald API.

License

Copyright (c) 2023 Mittwald CM Service GmbH & Co. KG and contributors

This project (and all NPM packages) therein is licensed under the MIT License; see the LICENSE file for details.

Installing

You can install this package from the regular NPM registry:

yarn add @mittwald/api-client

Usage

Import the client:

import { MittwaldAPIV2Client } from "@mittwald/api-client";

To create a client instance you can use one of the following factory method for different types of authentication:

  1. MittwaldAPIClient.newUnauthenticated()
  2. MittwaldAPIClient.newWithToken(apiToken: string) (recommended)
  3. MittwaldAPIClient.newWithCredentials(email: string, password: string) (does actually perform a login in the background and thus returns a promise)

Have a look at our API introduction for more information on how to obtain an API token and how to get started with the API.

Example

import { MittwaldAPIV2Client } from "@mittwald/api-client";

const mittwaldApi = MittwaldAPIClient.newWithToken("your-access-token");

const projects = await mittwaldApi.project.listProjects();

API documentation

The API documentation can be found at https://api.mittwald.de/v2/docs/. You can find the operation ID on the right side of each operation.

Accessing the underlying Axios instance

The client uses the popular Axios HTTP client under the hood. You may access the Axios instance with the clients axios property.

Intercepting requests or responses

To intercept requests or responses you can use Axios' interceptors.

Usage with TypeScript

All response and request types can be imported from the MittwaldAPIV2 namespace.

Importing types

import { MittwaldAPIV2 } from "@mittwald/api-client";

type Project =
  MittwaldAPIV2.Paths.V2Projects.Get.Responses.$200.Content.ApplicationJson[number];

Keywords

FAQs

Package last updated on 14 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc