| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Visit the pre-generated documentation, trimmed OpenAPI spec, and Postman collection at https://jamamp.github.io/FloatplaneAPIDocs/.
Visit Floatplane at https://www.floatplane.com.
This repository is an API specification of the video streaming service Floatplane using in the OpenAPI 3.0.3 specification for REST and AsyncAPI 2.4.0 specification for asynchronous events. The main files for this repository are floatplane-openapi-specification.json, floatplane-asyncapi-chat-specification.json, and floatplane-asyncapi-frontend-specification.json. Contained in them are definitions for all of the paths and channels in the Floatplane API, definitions of common models between the API endpoints, descriptions of authentication and authorization mechanisms, and more.
This repository serves as an open and central source specification for the Floatplane API by the community, for purposes of tinkering and creating custom clients for Floatplane. At the time of writing, Floatplane has its main website, along with both Android and iOS applications. The main use case envisioned in the creation of this repository is to make it easier to create TV-first applications for, e.g., tvOS, Roku, Google TV, etc.
⚠️ NOTE ⚠️: Please set a custom User-Agent header in your library of choice that uniquely identifies what app the requests are coming from, and *what version of your app is sending the requests. This is very helpful to the Floatplane team, and is good practice to do in general.
The main purpose of this repository is to enable automatic generation of documentation and client code libraries.
The Floatplane API specification can be used to automatically generate client code of the Floatplane API in most major programming languages. It is best advised to use the trimmed version of the REST API to only generate the endpoints that have been thoroughly documented. Various generators exist for different use cases.
A notable open-source generator is OpenAPI Generator which supports 38 different languages, along with variations for different networking libraries in some languages. It additionally includes many configurations when generating clients. For AsyncAPI, the AsyncAPI Generator is recommended.
It would be best to keep your version of the specification, and a script to auto-generate the library with all of the correct configurations, in source control. Then, run the script to generate the code library or files, and keep those in source control as well in your project, or execute the script in your build scripts.
openapi-generator openapi-generator generate -i floatplane-openapi-specification-trimmed.json -o Swift -g swift5 --library vaporag -o FloatplaneChatAPI floatplane-asyncapi-chat-specification.json @asyncapi/nodejs-templateThe API specifications can also be used to generate documentation. Pre-generated renders of the documentation for this repository are available at https://jamamp.github.io/FloatplaneAPIDocs. There are a variety of renders available, including:
redoc-cli bundle -o Docs/Redoc/redoc-static.html floatplane-openapi-specification.jsonag -o Docs/AsyncAPIChat floatplane-asyncapi-chat-specification.json @asyncapi/html-templateIn order to generate all of the documentation available at https://jamamp.github.io/FloatplaneAPIDocs automatically when testing changes to the OpenAPI file,
Then, open /Docs/index.html to view the changes. A Dockerfile is also available:
docker build --tag fpapidocs:latest .The list of APIs was generated from the Floatplane frontend files, available at https://frontend.floatplane.com/{version}/*.js
When a new version of the Floatplane frontend is released (which is done silently), we can analyze the differences between the files to find new endpoints being used. To do so more easily, some tools are included:
The file fp-frontend-version.txt is a collection of recent version changes that Floatplane has made, starting with 3.5.1. This may be updated irregularly.
After making changes to the floatplane-openapi-specification.json, run make test in order to run integration tests with the Floatplane API. This ensures that the specification and its models are aligned with the API correctly.
Integration test run requirements:
Integration tests will test for:
Write integration/unit tests in the tests/SchemaThesisTests Python/Poetry project.
Anyone is free to help
MIT License. See the LICENSE file.
| Back | FazBrowse Home | New Git URL |