メインコンテンツにスキップ

Getting Started

GitHub

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

__CAPGO_KEEP_0__スキルをAIツールに追加するには、以下のコマンドを実行してください:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

コピー

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-shake` plugin in my project.

コピー

Manual セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の説明を参照してください:
bun add @capgo/capacitor-shake
bunx cap sync
import { CapacitorShake } from '@capgo/capacitor-shake';

コピーをします。APIの概要

Section titled “API Overview”

Listen for shake event on the device.

addListenerを使用して、shakeイベントが検出されたときに呼び出されるリスナーを登録します。

import { CapacitorShake } from '@capgo/capacitor-shake';
const listener = await CapacitorShake.addListener('shake', () => {
console.log('Shake detected!');
});
// To remove the listener:
await listener.remove();

getPluginVersion

Copy to clipboard

Get the native Capacitor plugin version.

Get the native __CAPGO_KEEP_0__ plugin version.

import { CapacitorShake } from '@capgo/capacitor-shake';
const { version } = await CapacitorShake.getPluginVersion();
console.log('Plugin version:', version);

Copy to clipboard

Source Of Truth

Section titled “Source Of Truth” src/definitions.ts. upstream の API が変更されたときに、再度 sync を実行してください。

Getting Started から続けてください。

Getting Started から続けてください。

「Getting Started から続けてください。」というセクション あなたが「Getting Started から続けてください。」を使用している場合 あなたがダッシュボードと API の作業を計画するために使用している場合、API を接続してください。 Using @capgo/capacitor-shake Using @capgo/capacitor-shake のネイティブ機能 API Overview API の実装詳細 Introduction Introduction の実装詳細 API キー API キーとその実装詳細のための デバイス デバイスの実装詳細のための