@orangefox-recovery/foxclient
v6.0.10
Published
OpenAPI client for @orangefox-recovery/foxclient
Readme
@orangefox-recovery/[email protected]
A TypeScript SDK client for the api.orangefox.download API.
Usage
First, install the SDK from npm.
npm install @orangefox-recovery/foxclient --saveNext, try it out.
import {
Configuration,
DeviceApi,
} from '@orangefox-recovery/foxclient';
import type { GetDeviceRequest } from '@orangefox-recovery/foxclient';
async function example() {
console.log("🚀 Testing @orangefox-recovery/foxclient SDK...");
const api = new DeviceApi();
const body = {
// string (optional)
deviceId: deviceId_example,
// string (optional)
codename: codename_example,
// string (optional)
id: id_example,
} satisfies GetDeviceRequest;
try {
const data = await api.getDevice(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to https://api.orangefox.download
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- DeviceApi | getDevice | GET /devices/get | GET /devices/get - Get a single device by device_id, codename, or _id. DeviceApi | getDeviceById | GET /devices/{device_id} | GET /devices/{device_id} - Get device by ID (deprecated). DeviceApi | getOems | GET /oems | GET /oems - Get a list of all unique OEM names. DeviceApi | listDevices | GET /devices | GET /devices/ - List devices with filters. PasteApi | createPaste | POST /paste | POST /paste/ - Create a new paste. PasteApi | getPaste | GET /paste/{paste_id} | GET /paste/{paste_id} - Get a paste by ID. ReleaseApi | downloadRelease | GET /release/{release_id}/dl | GET /release/{release_id}/dl - Download a release binary. ReleaseApi | getRelease | GET /releases/get | GET /releases/get - Get a single release. ReleaseApi | getReleaseById | GET /releases/{release_id} | GET /releases/{release_id} - Get release by ID (deprecated). ReleaseApi | getUpdatesAfter | GET /updates/{last_known_id} | GET /updates/{last_known_id} - Get releases after a given release ID (deprecated). ReleaseApi | listReleases | GET /releases | GET /releases/ - List releases with filters. ReportApi | newReport | POST /report/{release_id} | POST /report/{release_id} - Submit a bug report. StatsApi | getGlobalStats | GET /stats | GET /stats/ - Get global download statistics. UptimeApi | getUptime | GET /uptime | GET /uptime - Aggregated public infrastructure status.
Models
- DeviceResponse
- ErrorResponse
- GlobalStatsResponse
- ListResponseReleaseResponse
- ListResponseReleaseResponseDataInner
- ListResponseShortDeviceResponse
- ListResponseShortDeviceResponseDataInner
- ListResponseString
- MaintainerShortResponse
- NewReportRequest
- PasteInput
- PasteResponse
- RecoveryImgResponse
- ReleaseGroupsResponse
- ReleaseListResponse
- ReleaseResponse
- ShortDeviceResponse
- ShortReleaseResponse
- TokenResponse
- UptimeHealth
- UptimeHealthHost
- UptimeMonitor
- UptimeMonitorGroup
- UptimeMonitors
- UptimeResponse
Authorization
Authentication schemes defined for the API:
bearer_auth
- Type: HTTP Bearer Token authentication (JWT)
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
6.0.10 - Package version:
6.0.10 - Generator version:
7.21.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish