mirror of
https://github.com/foss42/apidash.git
synced 2025-08-02 01:37:38 +08:00
Merge branch 'foss42:main' into add-feat-insomia
This commit is contained in:
@ -1,13 +1,40 @@
|
|||||||
# Installation Instructions
|
# Installation Instructions
|
||||||
|
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
Download the latest Windows Installer (64 bit) from [here](https://github.com/foss42/apidash/releases/latest)
|
|
||||||
|
|
||||||
To install it, simply double click on the installer.
|
- Download the latest Windows Installer (64 bit) from [here](https://github.com/foss42/apidash/releases/latest)
|
||||||
|
- To install it, simply double click on the installer.
|
||||||
|
- If prompted by Windows that **Windows prevented an unrecognized app from running**, click on **Run anyway**.
|
||||||
|
- Now, follow the step by step installation wizard.
|
||||||
|
|
||||||
If prompted by Windows that **Windows prevented an unrecognized app from running**, click on **Run anyway**.
|
Detailed, step by step instructions are provided below:
|
||||||
|
|
||||||
Now, follow the step by step installation wizard.
|
### Step 1: Download the Installer
|
||||||
|
1. Visit the [latest release page](https://github.com/foss42/apidash/releases/latest) on GitHub.
|
||||||
|
2. Download the **Windows Installer (64-bit)** file.
|
||||||
|
|
||||||
|
### Step 2: Install the Application
|
||||||
|
1. Locate the downloaded installer file (usually found in your `Downloads` folder).
|
||||||
|
2. Double-click on the installer to begin the installation process.
|
||||||
|
|
||||||
|
### Step 3: Handle Windows Security Warnings
|
||||||
|
- **Unrecognized App Warning**:
|
||||||
|
If you see a message saying:
|
||||||
|
> *Windows protected your PC*
|
||||||
|
This occurs because the app is from an unrecognized publisher.
|
||||||
|
- Click on **More info**.
|
||||||
|
- Then, click on **Run anyway** to proceed.
|
||||||
|
|
||||||
|
### Step 4: Follow the Installation Wizard
|
||||||
|
1. Follow the step-by-step instructions provided in the installation wizard.
|
||||||
|
2. Customize the installation location if required, or proceed with the default options.
|
||||||
|
3. Click **Install** to complete the process.
|
||||||
|
|
||||||
|
### Step 5: Launch the Application
|
||||||
|
Once the installation is complete, you can:
|
||||||
|
- Launch the application directly from the final screen of the installer.
|
||||||
|
- Or, open it later from the Start Menu or Desktop shortcut.
|
||||||
|
|
||||||
## MacOS
|
## MacOS
|
||||||
|
|
||||||
|
@ -39,8 +39,36 @@ android {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Web
|
For more information on multidex support, you can refer to the Android developer guide on [Configuring Multidex](https://developer.android.com/studio/build/multidex).
|
||||||
|
|
||||||
Running it on web requires the following modification in the local cached code of `printing` package.
|
## Web
|
||||||
|
|
||||||
|
If you're building a Flutter app for the web, you may encounter a build error like:
|
||||||
|
|
||||||
|
```
|
||||||
|
Launching lib/main.dart on Chrome in debug mode...
|
||||||
|
../../../.pub-cache/hosted/pub.dev/printing-5.13.4/lib/printing_web.dart:218:16: Error:
|
||||||
|
A value of type 'JSString' can't be assigned to a variable of type 'String'.
|
||||||
|
.toJS;
|
||||||
|
^
|
||||||
|
Failed to compile application.
|
||||||
|
```
|
||||||
|
|
||||||
|
This happens because `.toJS` is no longer required for converting Dart strings to JavaScript strings in recent Dart versions.
|
||||||
|
|
||||||
|
**Fix:**
|
||||||
|
Update the `printing_web.dart` file in the cached `printing` package by removing `.toJS` as done in the PR [here](https://github.com/DavBfr/dart_pdf/pull/1739/files)
|
||||||
|
|
||||||
|
```dart
|
||||||
|
script.innerHTML =
|
||||||
|
'''function ${_frameId}_print(){var f=document.getElementById('$_frameId');f.focus();f.contentWindow.print();}'''
|
||||||
|
.toJS;
|
||||||
|
```
|
||||||
|
|
||||||
|
Change it to:
|
||||||
|
```dart
|
||||||
|
script.innerHTML =
|
||||||
|
'''function ${_frameId}_print(){var f=document.getElementById('$_frameId');f.focus();f.contentWindow.print();}''';
|
||||||
|
```
|
||||||
|
|
||||||
Read more about it here - https://github.com/DavBfr/dart_pdf/issues/1791
|
Read more about it here - https://github.com/DavBfr/dart_pdf/issues/1791
|
||||||
|
@ -115,11 +115,103 @@ TODO
|
|||||||
|
|
||||||
## Python (requests)
|
## Python (requests)
|
||||||
|
|
||||||
TODO
|
Here are the detailed instructions for running the generated API Dash code in Python (using `requests`) for macOS, Windows, and Linux:
|
||||||
|
|
||||||
|
### 1. Install Python:
|
||||||
|
#### macOS:
|
||||||
|
- Go to the official Python website: [https://www.python.org/downloads/macos/](https://www.python.org/downloads/macos/)
|
||||||
|
- Download the latest version for macOS and follow the installation instructions.
|
||||||
|
|
||||||
|
#### Windows:
|
||||||
|
- Go to the official Python website: [https://www.python.org/downloads/](https://www.python.org/downloads/)
|
||||||
|
- Download the latest version for Windows and run the installer. During installation, make sure to check the box that says "Add Python to PATH."
|
||||||
|
|
||||||
|
#### Linux:
|
||||||
|
- Most Linux distributions come with Python pre-installed. To check if Python is already installed, open the terminal and type:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 --version
|
||||||
|
```
|
||||||
|
|
||||||
|
- If it's not installed, you can install it via your package manager:
|
||||||
|
- On Ubuntu/Debian-based systems:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install python3
|
||||||
|
```
|
||||||
|
|
||||||
|
- On Fedora/CentOS-based systems:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo dnf install python3
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Install the `requests` library:
|
||||||
|
#### macOS and Linux:
|
||||||
|
Open the terminal and type the following command to install the `requests` library using `pip`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip3 install requests
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Windows:
|
||||||
|
Open Command Prompt (or PowerShell) and type the following command to install the `requests` library using `pip`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install requests
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Execute the generated code:
|
||||||
|
Once you have Python and `requests` installed, follow these steps to execute the generated code:
|
||||||
|
|
||||||
|
1. **Open a text editor** ✍️ (like Notepad on Windows, TextEdit on macOS, or any code editor like Visual Studio Code).
|
||||||
|
2. **Copy the generated code** 📋 from API Dash.
|
||||||
|
3. **Paste the code** into the text editor 🔄.
|
||||||
|
4. **Save the file** 💾 with a `.py` extension, such as `api_test.py`.
|
||||||
|
|
||||||
|
This makes the steps a little more visual and fun!
|
||||||
|
|
||||||
|
#### macOS and Linux:
|
||||||
|
1. Open the **Terminal**.
|
||||||
|
2. **Navigate to the directory** where you saved the `.py` file. For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /path/to/your/file
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Run the Python script** by typing the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 api_test.py
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Windows:
|
||||||
|
1. Open **Command Prompt** (or PowerShell).
|
||||||
|
2. **Navigate to the directory** where you saved the `.py` file. For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd C:\path\to\your\file
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Run the Python script** by typing the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python api_test.py
|
||||||
|
```
|
||||||
|
|
||||||
## Python (http.client)
|
## Python (http.client)
|
||||||
|
|
||||||
TODO
|
Here are the detailed instructions for running the generated API Dash code in Python using `http.client`:
|
||||||
|
|
||||||
|
### 1. Install Python:
|
||||||
|
Check out the instructions [here](#1-install-python) for detailed steps on how to install Python on macOS, Windows, or Linux.
|
||||||
|
|
||||||
|
### 2. `http.client` is a built-in library:
|
||||||
|
Unlike other Python libraries (like `requests`), `http.client` is part of Python's standard library. You can directly use it without any additional installation steps.
|
||||||
|
|
||||||
|
### 3. Execute the generated code:
|
||||||
|
Check out the instructions [here](#3-execute-the-generated-code) for detailed steps on how to run the code.
|
||||||
|
|
||||||
## Ruby (faraday)
|
## Ruby (faraday)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user