무료로 14일 동안 무제한 사용
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-downloader`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/downloader/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치하기
설치 제목AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
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-downloader` plugin in my project.만약 Manual Setup을 선호한다면, 다음 명령어를 실행하여 플러그인을 설치하고 아래의 플랫폼별 지침을 따르세요.
bun add @capgo/capacitor-downloaderbunx cap syncImport
Import 섹션import { CapacitorDownloader } from '@capgo/capacitor-downloader';API 개요
섹션: API 개요download
다운로드 섹션새 다운로드 작업을 시작하세요.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
const task = await CapacitorDownloader.download({ id: 'my-download', url: 'https://example.com/file.pdf', destination: 'downloads/file.pdf'});pause
Section titled “정지”다운로드를 일시 정지합니다. 다운로드는 동일한 위치에서 다시 시작할 수 있습니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.pause({ id: 'id-123' });resume
Section titled “재개”다운로드를 일시 정지한 상태에서 재개합니다. 정지된 위치에서 다시 시작합니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.resume({ id: 'id-123' });다운로드를 영구적으로 중지하고 취소합니다. 다운로드한 데이터는 삭제됩니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.stop({ id: 'id-123' });checkStatus
Section titled “상태 확인”다운로드의 현재 상태를 확인합니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
const result = await CapacitorDownloader.checkStatus({ id: 'id-123' });console.log(result);getFileInfo
Section titled “다운로드 정보 가져오기”다운로드한 파일에 대한 정보를 가져옵니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
const result = await CapacitorDownloader.getFileInfo({ path: 'path/to/file' });console.log(result);DownloadOptions
Section titled “다운로드 옵션”다운로드를 시작하기 위한 구성 옵션입니다.
export interface DownloadOptions { /** Unique identifier for this download task */ id: string; /** URL of the file to download */ url: string; /** Local file path where the download will be saved */ destination: string; /** Optional HTTP headers to include in the request */ headers?: { [key: string]: string }; /** Network type requirement for download */ network?: 'cellular' | 'wifi-only'; /** Download priority level */ priority?: 'high' | 'normal' | 'low';}DownloadTask
Section titled “다운로드 작업”다운로드 작업의 현재 상태와 진행 상황을 나타냅니다.
export interface DownloadTask { /** Unique identifier for the download task */ id: string; /** Download progress from 0 to 100 */ progress: number; /** Current state of the download */ state: 'PENDING' | 'RUNNING' | 'PAUSED' | 'DONE' | 'ERROR';}실질적인 출처
Source Of Truth이 페이지는 플러그인의 src/definitions.ts Re-run the sync when the public API changes upstream.
Getting Started
Section titled “Getting Started”Capgo를 사용 중이라면 Getting Started 다운로더 플러그인을 사용하여 대시보드와 API 작업을 계획하고 연결하세요. Using @capgo/capacitor-downloader Capgo native 기능을 사용하는 @capgo/capacitor-다운로더에 대해 API 개요 API 개요 소개 소개에 대한 구현 세부 정보를 위해 API 키 API 키에 대한 구현 세부 정보를 위해, 및 장치 소개에 대한 구현 세부 정보를 위해