|
| 1 | +# Nylas Java/Kotlin SDK Examples |
| 2 | + |
| 3 | +Simple examples demonstrating how to use the Nylas Java/Kotlin SDK. |
| 4 | + |
| 5 | +## Available Examples |
| 6 | + |
| 7 | +### Notetaker Example |
| 8 | + |
| 9 | +The `NotetakerExample` demonstrates how to use the Nylas Java/Kotlin SDK to interact with the Notetakers API: |
| 10 | + |
| 11 | +- Invite a Notetaker to a meeting |
| 12 | +- List all Notetakers |
| 13 | +- Get media from a Notetaker (if available) |
| 14 | +- Leave a Notetaker session |
| 15 | + |
| 16 | +## Setup |
| 17 | + |
| 18 | +### 1. Environment Setup |
| 19 | + |
| 20 | +Copy the `.env.example` file to `.env` and fill in your credentials: |
| 21 | + |
| 22 | +```bash |
| 23 | +cp .env.example .env |
| 24 | +``` |
| 25 | + |
| 26 | +Edit the `.env` file with your details: |
| 27 | +``` |
| 28 | +# Get your API key from the Nylas Dashboard |
| 29 | +NYLAS_API_KEY=your_api_key_here |
| 30 | +
|
| 31 | +# Add your meeting link (Zoom, Google Meet, or Microsoft Teams) |
| 32 | +MEETING_LINK=your_meeting_link_here |
| 33 | +``` |
| 34 | + |
| 35 | +### 2. Running the Examples |
| 36 | + |
| 37 | +#### Option 1: Using Gradle |
| 38 | + |
| 39 | +Run Java example: |
| 40 | +```bash |
| 41 | +./gradlew :examples:run -PmainClass=com.nylas.examples.NotetakerExample |
| 42 | +``` |
| 43 | + |
| 44 | +Run Kotlin example: |
| 45 | +```bash |
| 46 | +./gradlew :examples:run -PmainClass=com.nylas.examples.KotlinNotetakerExampleKt |
| 47 | +``` |
| 48 | + |
| 49 | +#### Option 2: Using the Makefile |
| 50 | + |
| 51 | +List available examples: |
| 52 | +```bash |
| 53 | +make list |
| 54 | +``` |
| 55 | + |
| 56 | +Run the Java example: |
| 57 | +```bash |
| 58 | +make java |
| 59 | +``` |
| 60 | + |
| 61 | +Run the Kotlin example: |
| 62 | +```bash |
| 63 | +make kotlin-way |
| 64 | +``` |
| 65 | + |
| 66 | +#### Option 3: From an IDE |
| 67 | + |
| 68 | +1. Open the project in your IDE (IntelliJ IDEA, Eclipse, etc.) |
| 69 | +2. Set the required environment variables in your run configuration |
| 70 | +3. Run the main method in either: |
| 71 | + - `NotetakerExample.java` (Java) |
| 72 | + - `KotlinNotetakerExample.kt` (Kotlin) |
| 73 | + |
| 74 | +## Project Structure |
| 75 | + |
| 76 | +``` |
| 77 | +examples/ |
| 78 | +├── .env.example # Template for environment variables |
| 79 | +├── build.gradle.kts # Gradle build file for examples |
| 80 | +├── Makefile # Helpful commands for running examples |
| 81 | +├── README.md # This file |
| 82 | +└── src/ |
| 83 | + └── main/ |
| 84 | + ├── java/ # Java examples |
| 85 | + │ └── com/nylas/examples/ |
| 86 | + │ └── NotetakerExample.java |
| 87 | + └── kotlin/ # Kotlin examples |
| 88 | + └── com/nylas/examples/ |
| 89 | + └── KotlinNotetakerExample.kt |
| 90 | +``` |
| 91 | + |
| 92 | +## Additional Information |
| 93 | + |
| 94 | +For more information about the Nylas API, refer to the [Nylas API documentation](https://developer.nylas.com/). |
0 commit comments