From da7267af2789e49243d138e15261ddb0d407eeec Mon Sep 17 00:00:00 2001 From: ashutoshkhainar33-star Date: Fri, 14 Aug 2026 14:36:24 +0530 Subject: [PATCH] updated readme seo aeo --- README.md | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 96c6a09..6f31220 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,26 @@ # FastPix Java SDK +[![Maven Central](https://img.shields.io/maven-central/v/io.fastpix/sdk)](https://central.sonatype.com/artifact/io.fastpix/sdk) +[![license](https://img.shields.io/github/license/FastPix/fastpix-java)](https://github.com/FastPix/fastpix-java/blob/main/LICENSE) +[![Java 11+](https://img.shields.io/badge/Java-11%2B-007396?logo=openjdk&logoColor=white)](https://www.oracle.com/java/) + A robust, type-safe Java SDK designed for seamless integration with the FastPix API platform. +The FastPix Java SDK is a type-safe Java client for the FastPix video API. From any Java 11+ application (Maven or Gradle) you can upload and manage videos, run live streams and simulcasts, create and secure playback IDs, manage playlists and signing keys, pull video analytics (views, metrics, dimensions, and errors), and drive in-video AI features such as subtitles, chapters, summaries, and content moderation - with both synchronous and asynchronous APIs. + +**Works with:** Java 11+ 路 Maven and Gradle 路 sync and async (CompletableFuture / Reactive Streams) 路 Spring Boot and any JVM app 路 Maven Central `io.fastpix:sdk` + +馃摉 **Docs:** https://fastpix.com/docs/language-sdks/java-sdk  路  馃殌 **Free account:** https://dashboard.fastpix.com + +
+ ## Introduction The FastPix Java SDK simplifies integration with the FastPix platform. It provides a clean, type-safe interface for secure and efficient communication with the FastPix API, enabling easy management of media uploads, live streaming, on鈥慸emand content, playlists, video analytics, and signing keys for secure access and token management. It is intended for use with Java 11 and above. +
+ ## Prerequisites ### Environment and Version Support @@ -19,6 +33,8 @@ The FastPix Java SDK simplifies integration with the FastPix platform. It provid > Pro Tip: We recommend using Java 17+ for optimal performance and the latest language features. +
+ ### Getting Started with FastPix To get started with the FastPix Java SDK, ensure you have the following: @@ -38,6 +54,8 @@ export FASTPIX_PASSWORD="your-secret-key" > Security Note: Never commit your credentials to version control. Use environment variables or secure credential management systems. +
+ ## Table of Contents * [FastPix Java SDK](#fastpix-java-sdk) @@ -50,8 +68,12 @@ export FASTPIX_PASSWORD="your-secret-key" * [Server Selection](#server-selection) * [Custom HTTP Client](#custom-http-client) * [Debugging](#debugging) + * [FAQ](#faq) + * [Which FastPix SDK should I use?](#which-fastpix-sdk-should-i-use) * [Development](#development) +
+ ## Setup ### Installation @@ -106,6 +128,8 @@ If you wish to build from source and publish the SDK artifact to your local Mave gradlew.bat publishToMavenLocal -Pskip.signing ``` +
+ ### Initialization Initialize the FastPix SDK with your credentials: @@ -138,6 +162,20 @@ FastPixSDK sdk = FastPixSDK.builder() .build(); ``` +
+ +### Verify Installation + +Run a simple API request to confirm your credentials and SDK configuration are working correctly. + +```java +sdk.manageVideos() + .list() + .call(); +``` + +
+ ## Example Usage > **Note:** In the examples below, `package hello.world;` is used for demonstration purposes. When creating your own Java files, ensure the package name matches your directory structure (e.g., if your file is at `src/main/java/com/example/MyApp.java`, use `package com.example;`). @@ -189,6 +227,8 @@ public class Application { } ``` +
+ ## Asynchronous Support The SDK provides comprehensive asynchronous support using Java's [`CompletableFuture`][comp-fut] and [Reactive Streams `Publisher`][reactive-streams] APIs. This design makes no assumptions about your choice of reactive toolkit, allowing seamless integration with any reactive library. @@ -292,6 +332,8 @@ public class Application { [comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html [reactive-streams]: https://www.reactive-streams.org/ +
+ ## Available Resources and Operations Comprehensive Java SDK for FastPix platform integration with full API coverage. @@ -441,6 +483,8 @@ Enhance video content with AI-powered features including moderation, summarizati +
+ ## Retries Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. @@ -569,6 +613,18 @@ public class Application { } ``` +
+ +## Rate Limits + +The FastPix API enforces rate limits to help maintain platform stability. + +When a rate limit is exceeded, the API returns an HTTP `429 Too Many Requests` response. + +We recommend using the SDK retry functionality described in the Retries section to automatically handle temporary rate limiting and transient failures. + +
+ ## Error Handling [`FastpixException`](./src/main/java/models/errors/FastpixException.java) is the base class for all HTTP error responses. It has the following properties: @@ -649,6 +705,8 @@ public class Application { } ``` +
+ ### Error Classes **Primary error:** @@ -669,6 +727,8 @@ many more subclasses in the JDK platform). +
+ ## Server Selection ### Override Server URL Per-Client @@ -723,6 +783,8 @@ public class Application { } ``` +
+ ## Custom HTTP Client The Java SDK makes API calls using an `HTTPClient` that wraps the native @@ -841,6 +903,8 @@ public class Application { +
+ ## Debugging ### Debug & Logging @@ -895,6 +959,8 @@ Configure logging levels in your `logback.xml`: - **Streaming**: Stream initialization, item processing, closure - **Hooks**: Hook execution counts, operation IDs, exceptions +
+ #### Legacy Debug Logging For backward compatibility, you can still use the legacy debug logging method: @@ -929,7 +995,75 @@ Response body: Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this option does not log request/response bodies. -# Development +
+ +## FAQ + +**How do I install the FastPix Java SDK?** + +Add `io.fastpix:sdk` to your build - `implementation 'io.fastpix:sdk:'` for Gradle, or the equivalent `` for Maven. See [Setup](#setup) and [Installation](#installation). + +**How do I authenticate the SDK?** + +FastPix uses Basic Auth: build a `Security` with your access token as `username` and secret key as `password`, then pass it to `FastPixSDK.builder()`. See [Initialization](#initialization). + +**How do I upload a video in Java?** + +Create media from a URL or a direct upload through `sdk.inputVideos()`. See [Example Usage](#example-usage) and [Available Resources and Operations](#available-resources-and-operations). + +**Does the SDK support async / reactive?** + +Yes - it provides asynchronous APIs using `CompletableFuture` and Reactive Streams `Publisher`, so it integrates with Reactor, RxJava, and other reactive libraries. See [Asynchronous Support](#asynchronous-support). + +**How do I start a live stream?** + +Use the Live API resources to create and manage streams, simulcasts, and live playback IDs. See [Available Resources and Operations](#available-resources-and-operations). + +**How do I get video analytics and metrics in Java?** + +The Video Data API exposes metrics, views, dimensions, and errors for quality-of-experience monitoring. See [Available Resources and Operations](#available-resources-and-operations). + +**How do I handle API errors?** + +Catch `FastpixException` (the base class for HTTP error responses); it exposes the message, status code, headers, and body. See [Error Handling](#error-handling). + +**How do I configure automatic retries?** + +Provide a `RetryConfig` per call or at SDK initialization to control the backoff strategy. See [Retries](#retries). + +**How do I use a custom HTTP client, proxy, or timeout?** + +Provide your own `HTTPClient` implementation (custom executors, SSL context, connection pools, hooks) or wrap the default. See [Custom HTTP Client](#custom-http-client). + +**How do I enable debug logging?** + +The SDK logs through SLF4j; you can also use `enableHTTPDebugLogging(true)`. See [Debugging](#debugging). + +**Which Java versions are supported?** + +Java 11 and above (JDK). See [Prerequisites](#prerequisites). + +
+ +## Which FastPix SDK should I use? + +FastPix publishes a server SDK for every major backend language, each generated from the same API specification: + +| Language | Repo | Install | +|---|---|---| +| **Java** (this repo) | [fastpix-java](https://github.com/FastPix/fastpix-java) | `io.fastpix:sdk` (Maven/Gradle) | +| Node.js / TypeScript | [node-sdk](https://github.com/FastPix/node-sdk) | `npm install @fastpix/fastpix-node` | +| Python | [fastpix-python](https://github.com/FastPix/fastpix-python) | `pip install fastpix-python` | +| PHP | [fastpix-php](https://github.com/FastPix/fastpix-php) | `composer require fastpix/sdk` | +| Go | [fastpix-go](https://github.com/FastPix/fastpix-go) | `go get github.com/FastPix/fastpix-go` | +| C# / .NET | [fastpix-sdk-csharp](https://github.com/FastPix/fastpix-sdk-csharp) | `dotnet add package Fastpix` | +| Ruby | [fastpix-ruby](https://github.com/FastPix/fastpix-ruby) | `gem install fastpixapi` | + +To upload and play the media these SDKs create, use the FastPix browser libraries: [web-uploads-sdk](https://github.com/FastPix/web-uploads-sdk), [react-web-uploader](https://github.com/FastPix/react-web-uploader), and [web-player-component](https://github.com/FastPix/web-player-component). Browse everything in the [FastPix organization](https://github.com/orgs/FastPix/repositories). + +
+ +## Development This Java SDK is programmatically generated from our API specifications. Any manual modifications to internal files will be overwritten during subsequent generation cycles. @@ -940,3 +1074,10 @@ We value community contributions and feedback. Feel free to submit pull requests For comprehensive understanding of each API's functionality, including detailed request and response specifications, parameter descriptions, and additional examples, please refer to the [FastPix API Reference](https://fastpix.com/docs/product-os-api/overview). The API reference offers complete documentation for all available endpoints and features, enabling developers to integrate and leverage FastPix APIs effectively. + +## Support + +- Documentation: https://fastpix.com/docs +- API Reference: https://fastpix.com/docs/platform-api/overview +- GitHub Issues: https://github.com/FastPix/fastpix-java/issues +- Dashboard: https://dashboard.fastpix.com \ No newline at end of file