Skip to content

Commit 4d776a5

Browse files
authored
feat: Added support for Nylas Notetaker (#269)
# What did you do? - [x] Added support for Notetaker APIs - [x] Added support for Notetaker via the calendar and event APIs # License <!-- Your PR comment must contain the following line for us to merge the PR. --> I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
1 parent 0a0a738 commit 4d776a5

29 files changed

+2260
-4
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "automatic"
3+
}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Nylas Java SDK Changelog
22

3+
### Unreleased
4+
* Added support for Notetaker APIs
5+
* Added support for Notetaker via the calendar and event APIs
6+
37
### [2.7.0] - Release 2025-03-03
48
* Added support for listing import events via `events.listImportEvents()`
59
* Added sandbox to the Environment Enum

examples/.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Nylas API Key - Required
2+
# Get it from your Nylas Dashboard: https://dashboard.nylas.com/
3+
NYLAS_API_KEY=your_api_key_here
4+
5+
# Meeting Link - Required for Notetaker examples
6+
# This should be a link to a Zoom, Google Meet, or Microsoft Teams meeting
7+
MEETING_LINK=your_meeting_link_here
8+
9+
# Nylas API URI - Optional (defaults to https://api.us.nylas.com)
10+
# Only change this if instructed by Nylas support
11+
NYLAS_API_URI=https://api.us.nylas.com

examples/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Compiled class files
2+
*.class
3+
4+
# Build output
5+
/build/
6+
7+
# Gradle files
8+
.gradle/
9+
10+
# IntelliJ IDEA files
11+
.idea/
12+
*.iml
13+
*.iws
14+
*.ipr
15+
out/
16+
17+
# Eclipse files
18+
.classpath
19+
.project
20+
.settings/
21+
bin/
22+
23+
# VS Code files
24+
.vscode/
25+
26+
# Environment variables
27+
.env
28+
29+
# Mac files
30+
.DS_Store
31+
32+
# Logs
33+
*.log

examples/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.PHONY: help list java kotlin
2+
3+
# Default target
4+
help:
5+
@echo "Nylas Java/Kotlin SDK Examples"
6+
@echo ""
7+
@echo "Available targets:"
8+
@echo " help - Show this help message"
9+
@echo " list - List available examples"
10+
@echo " java - Run the Java Notetaker example"
11+
@echo " kotlin - Run the Kotlin Notetaker example"
12+
13+
# List available examples
14+
list:
15+
@cd .. && ./gradlew :examples:listExamples
16+
17+
# Run the Java example
18+
java:
19+
@cd .. && ./gradlew :examples:run -PmainClass=com.nylas.examples.NotetakerExample
20+
21+
# Run the Kotlin example
22+
kotlin:
23+
@cd .. && ./gradlew :examples:run -PmainClass=com.nylas.examples.KotlinNotetakerExampleKt

examples/README.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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/).

examples/build.gradle.kts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
3+
plugins {
4+
id("java")
5+
id("application")
6+
id("org.jetbrains.kotlin.jvm") version "1.8.21"
7+
}
8+
9+
group = "com.nylas.examples"
10+
version = "1.0-SNAPSHOT"
11+
12+
repositories {
13+
mavenCentral()
14+
mavenLocal() // For local Nylas SDK development
15+
}
16+
17+
dependencies {
18+
// Add the Nylas SDK dependency
19+
implementation(project(":")) // References the main Nylas SDK project
20+
21+
// Core dependencies
22+
implementation("org.json:json:20230227")
23+
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
24+
25+
// Test dependencies
26+
testImplementation(platform("org.junit:junit-bom:5.9.1"))
27+
testImplementation("org.junit.jupiter:junit-jupiter")
28+
}
29+
30+
java {
31+
sourceCompatibility = JavaVersion.VERSION_1_8
32+
targetCompatibility = JavaVersion.VERSION_1_8
33+
}
34+
35+
tasks.withType<KotlinCompile> {
36+
kotlinOptions {
37+
jvmTarget = "1.8"
38+
}
39+
}
40+
41+
application {
42+
// The mainClass will be overridden by the -PmainClass command-line parameter
43+
mainClass.set(findProperty("mainClass") as String? ?: "com.nylas.examples.NotetakerExample")
44+
}
45+
46+
tasks.test {
47+
useJUnitPlatform()
48+
}
49+
50+
// Task to list available examples
51+
tasks.register("listExamples") {
52+
doLast {
53+
println("Available examples:")
54+
println("- Java: com.nylas.examples.NotetakerExample")
55+
println("- Kotlin: com.nylas.examples.KotlinNotetakerExampleKt")
56+
println("\nRun an example with: ./gradlew :examples:run -PmainClass=<example class name>")
57+
}
58+
}
59+
60+
// Configure source sets for Java and Kotlin
61+
sourceSets {
62+
main {
63+
java {
64+
srcDir("src/main/java")
65+
}
66+
kotlin {
67+
srcDir("src/main/kotlin")
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)