From 737997b5fdf0aab033a8640889cfa3c4efc86174 Mon Sep 17 00:00:00 2001
From: Lukas Romsicki <3951690+lfroms@users.noreply.github.com>
Date: Thu, 28 Nov 2024 16:01:47 -0500
Subject: [PATCH] Add basic documentation for Tophat 2 changes (#38)
---
README.md | 84 +++++++++++++++++++++++++++++-
TophatKit/README.md | 122 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 204 insertions(+), 2 deletions(-)
create mode 100644 TophatKit/README.md
diff --git a/README.md b/README.md
index 4552809..517a003 100644
--- a/README.md
+++ b/README.md
@@ -17,16 +17,21 @@
### One-Click Installation
-With Tophat, you can skip building branches locally. Tophat hosts a lightweight web server, allowing you to easily add Tophat links to your CI pipeline and launch apps right from GitHub.
+With Tophat, you can skip building branches locally. Use Tophatʼs many features and APIs to easily create installation links to CI artifacts. Take your tooling a step further and offer contributors the ability to test pull requests without cloning anything!
+
+### Extensions
+
+With the [TophatKit](./TophatKit) SDK, you can easily extend Tophat to integrate with custom build and caching systems. This makes Tophat compatible with virtually any tooling setup you can imagine!
### Quick Launch
-Quick Launch allows you to add your favourite apps right in the Tophat menu. Need the latest build? Click on the icon and go! Tophat will download the latest version, update the icon, and launch it on your device.
+Quick Launch allows you to add your favourite apps right to the Tophat menu. Need the latest build? Click on the icon and go! Tophat will download the latest version, automatically update the icon, and launch it on your device.
+
### Device Pinning
Have lots of devices and only use a couple at a time? Easily pin them to the top of the devices list for quick access.
@@ -45,6 +50,79 @@ Customize Tophat to your needs with the Settings window. Adjust preferences, add
## Integrating Tophat
+> :bulb: As of Tophat 2, key Tophat APIs have changed and the legacy APIs have been removed. If you still need to support your existing integrations, use Tophat 1 and refer to the [legacy integration guide](#integrating-tophat-legacy) below.
+
+Downloads with Tophat are powered by _artifact providers_. Some artifact providers are built-in to Tophat, while some can be installed using Tophat Extensions (see [_Extensions_](#extensions)). When triggering an install with Tophat, you will need to specify the following information:
+
+- The artifact providerʼs ID.
+- The artifact providerʼs parameters.
+- The platform (optional).
+- The destination (optional).
+- A list of launch arguments (optional).
+
+The format by which this information is specified varies slightly depending on whether you use URLs, Quick Launch, or `tophatctl`, but each API requires roughly the same information.
+
+You can view a list of all artifact provider IDs using `tophatctl providers`.
+
+Each request can install multiple artifacts. Within each request, these are called _recipes_, and are particularly useful when you want to have one link that supports both simulators and devices in the same link, where different builds are required for each.
+
+### URLs
+
+Tophat handles URLs using both the `tophat://` and `http://` schemes so that you can use them in any website or application. Where possible, prefer the `tophat://` scheme which does not navigate away from the current page.
+
+The examples below will use `tophat://`, but `tophat://` is interchangeable with `https://localhost:29070/` for use with GitHub, for example.
+
+#### Format
+
+Below is an example for a hypothetical artifact provider for Google Cloud Storage. In this case, `gcs` is the artifact provider ID:
+
+```
+tophat://install/gcs?bucket=&object=