Getting Started
__CAPGO_KEEP_4__
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.
__CAPGO_KEEP_11__
설치란 제목Capgo 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-downloader` plugin in my project.만약에 수동 설치를 원한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼에 따라 설명된 지침을 따르세요.
bun add @capgo/capacitor-downloaderbunx cap syncImport
임포트란 제목import { CapacitorDownloader } from '@capgo/capacitor-downloader';API 개요
API 개요 섹션download
다운로드 섹션새로운 다운로드 작업을 시작합니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
const task = await Downloader.download({ id: 'my-download', url: 'https://example.com/file.pdf', destination: 'downloads/file.pdf'});pause
중단 섹션다운로드를 중단합니다. 중단된 위치에서 다운로드를 다시 시작할 수 있습니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.pause({} as { id: string });resume
재개 섹션중단된 다운로드를 재개합니다. 중단된 위치에서 다운로드를 계속합니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.resume({} as { id: string });stop
중지 섹션다운로드를 영구적으로 중단하고 취소하세요. 다운로드한 데이터는 삭제됩니다.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.stop({} as { id: string });checkStatus
checkStatus다운로드의 현재 상태를 확인하세요.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.checkStatus({} as { id: string });getFileInfo
getFileInfo다운로드한 파일에 대한 정보를 가져오세요.
import { CapacitorDownloader } from '@capgo/capacitor-downloader';
await CapacitorDownloader.getFileInfo({} as { path: string });타입 참조
Type ReferenceDownloadOptions
다운로드 옵션다운로드를 시작할 때의 설정 옵션
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
다운로드 작업 제목다운로드 작업의 현재 상태와 진행 상황을 나타냅니다.
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';}진실의 근원
진실의 근원 제목이 페이지는 플러그인의 src/definitions.ts. 업스트림에서 API이 변경될 때마다 공공 API을 다시 동기화하세요.
Getting Started에서 계속
Getting Started에서 계속 제목다운로드 작업을 사용 중이라면 Getting Started API 대시보드를 계획하고 운영을 위해 연결하세요. Using @capgo/capacitor-다운로더 capgo의 네이티브 기능을 사용하는 Using @capgo/capacitor-다운로더 API 개요 API의 구현 세부 사항에 대해 알아보세요. 소개 소개의 구현 세부 사항에 대해 알아보세요. API 키 API 키의 구현 세부 사항에 대해 알아보세요. 기기 기기의 구현 세부 사항에 대해 알아보세요.