Skip to content

Commit e98cc6b

Browse files
nbarracloughclaude
andauthored
docs: refresh README to match nylas-nodejs style (#321)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 18a9e9f commit e98cc6b

2 files changed

Lines changed: 141 additions & 58 deletions

File tree

README.md

Lines changed: 141 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,193 @@
1-
<a href="https://www.nylas.com/">
2-
<img src="https://brand.nylas.com/assets/downloads/logo_horizontal_png/Nylas-Logo-Horizontal-Blue_.png" alt="Aimeos logo" title="Aimeos" align="right" height="60" />
3-
</a>
1+
<div align="center">
2+
<a href="https://www.nylas.com/">
3+
<img src="/diagrams/nylas-logo.png" alt="Nylas" height="80" />
4+
</a>
45

5-
# Nylas SDK for Kotlin & Java
6+
<h1>Nylas Kotlin & Java SDK</h1>
67

7-
![Maven Central Version](https://img.shields.io/maven-central/v/com.nylas.sdk/nylas)
8-
[![codecov](https://codecov.io/gh/nylas/nylas-java/graph/badge.svg?token=R94RD91GZ3)](https://codecov.io/gh/nylas/nylas-java)
8+
<p>
9+
<strong>The official Kotlin & Java SDK for Nylas — the infrastructure that powers communications</strong>
10+
</p>
911

10-
This is the GitHub repository for the Nylas SDK for Kotlin and Java. This repo is primarily for anyone who wants to make contributions to the SDK or install it from source. For documentation on how to use this SDK to access the Nylas Email, Calendar, or Contacts APIs, see the official [Java SDK Quickstart Guide](https://developer.nylas.com/docs/sdks/java/).
12+
<p>
13+
<a href="https://central.sonatype.com/artifact/com.nylas.sdk/nylas"><img src="https://img.shields.io/maven-central/v/com.nylas.sdk/nylas" alt="version" /></a>
14+
<a href="https://codecov.io/gh/nylas/nylas-java"><img src="https://codecov.io/gh/nylas/nylas-java/graph/badge.svg?token=R94RD91GZ3" alt="code coverage" /></a>
15+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="license" /></a>
16+
</p>
1117

12-
The Nylas Communications Platform provides REST APIs for [Email](https://developer.nylas.com/docs/email/), [Calendar](https://developer.nylas.com/docs/calendar/), and [Contacts](https://developer.nylas.com/docs/contacts/), and the Nylas SDK is the quickest way to build your integration using Kotlin or Java.
18+
<p>
19+
<a href="https://developer.nylas.com/docs/v3/sdks/kotlin-java/">📖 SDK Guide</a> ·
20+
<a href="https://developer.nylas.com/docs/api/v3/">📚 API Reference</a> ·
21+
<a href="https://dashboard-v3.nylas.com/register">🚀 Sign up</a> ·
22+
<a href="https://github.com/orgs/nylas-samples/repositories?q=java">💡 Samples</a> ·
23+
<a href="https://forums.nylas.com">💬 Forum</a>
24+
</p>
25+
</div>
1326

14-
Here are some resources to help you get started:
27+
<br />
1528

16-
- [Sign up for your free Nylas account](https://dashboard.nylas.com/register)
17-
- [Nylas API v3 Quickstart Guide](https://developer.nylas.com/docs/v3-beta/v3-quickstart/)
18-
- [Nylas SDK Reference](https://nylas-java-sdk-reference.pages.dev/)
19-
- [Nylas API Reference](https://developer.nylas.com/docs/api/)
20-
- [Nylas Samples repo for code samples and example applications](https://github.com/orgs/nylas-samples/repositories?q=&type=all&language=java)
29+
The official Kotlin & Java SDK for [Nylas](https://developer.nylas.com/docs/v3/) — the infrastructure that powers communications. Integrate with Gmail, Microsoft, IMAP, Zoom, and 250+ email, calendar, and meeting providers in 5 minutes. Covers [Email](https://developer.nylas.com/docs/v3/email/), [Calendar](https://developer.nylas.com/docs/v3/calendar/), [Contacts](https://developer.nylas.com/docs/v3/email/contacts/), [Scheduler](https://developer.nylas.com/docs/v3/scheduler/), [Notetaker](https://developer.nylas.com/docs/v3/notetaker/), and [Agent Accounts](https://developer.nylas.com/docs/v3/agent-accounts/).
2130

22-
If you have a question about the Nylas Communications Platform, [contact Nylas Support](https://support.nylas.com/) for help.
31+
This repository is for contributors and anyone installing the SDK from source. If you just want to use the SDK in your app, head straight to the **[Kotlin & Java SDK guide](https://developer.nylas.com/docs/v3/sdks/kotlin-java/)** on developer.nylas.com.
32+
33+
## Get started
34+
35+
1. [Sign up for a free Nylas account](https://dashboard-v3.nylas.com/register).
36+
2. Follow the [getting started guide](https://developer.nylas.com/docs/v3/getting-started/) to create an application and provision your first API key.
37+
3. Bootstrap a project with the Nylas CLI:
38+
39+
```bash
40+
brew install nylas/nylas-cli/nylas
41+
nylas init
42+
```
2343

2444
## ⚙️ Install
2545

26-
**Note:** The Nylas SDK for Kotlin & Java requires JRE 8 or later.
46+
> **Requirements:** Java 8 or later. Kotlin 1.8 or later.
2747
28-
### Set up using Gradle
48+
### Gradle
2949

30-
If you're using Gradle, add the following to the dependencies section of `build.gradle`:
50+
Kotlin DSL (`build.gradle.kts`):
3151

32-
```groovy
52+
```kotlin
3353
implementation("com.nylas.sdk:nylas:2.15.1")
3454
```
3555

36-
### Build from source
56+
Groovy (`build.gradle`):
3757

38-
To build from source, clone this repo and build the project with Gradle.
58+
```groovy
59+
implementation 'com.nylas.sdk:nylas:2.15.1'
60+
```
3961

40-
```shell
41-
git clone https://github.com/nylas/nylas-java.git && cd nylas-java
62+
### Maven
63+
64+
```xml
65+
<dependency>
66+
<groupId>com.nylas.sdk</groupId>
67+
<artifactId>nylas</artifactId>
68+
<version>2.15.1</version>
69+
</dependency>
70+
```
71+
72+
### Build from source
73+
74+
```bash
75+
git clone https://github.com/nylas/nylas-java.git
76+
cd nylas-java
4277
./gradlew build uberJar
4378
```
4479

45-
This creates a new jar file in `build/libs/nylas-java-sdk-2.15.1-uber.jar`.
80+
This produces `build/libs/nylas-java-sdk-<version>-uber.jar`.
81+
82+
## ⚡️ Usage
4683

47-
See the Gradle documentation on [Building Libraries](https://guides.gradle.org/building-java-libraries/)
48-
or the [Gradle User Manual](https://docs.gradle.org/current/userguide/userguide.html) for more information.
84+
Initialize the client with your API key:
4985

50-
## ⚡️Usage
86+
```java
87+
import com.nylas.NylasClient;
88+
import com.nylas.models.Calendar;
89+
import com.nylas.models.ListResponse;
5190

52-
To use this SDK, you must first [get a free Nylas account](https://dashboard.nylas.com/register).
91+
NylasClient nylas = new NylasClient.Builder("NYLAS_API_KEY").build();
5392

54-
Then, follow the Quickstart guide to [set up your first app and get your API keys](https://developer.nylas.com/docs/v3-beta/v3-quickstart/).
93+
ListResponse<Calendar> calendars = nylas.calendars().list("GRANT_ID");
94+
```
5595

56-
For code examples that demonstrate how to use this SDK, take a look at our [Java repos in the Nylas Samples collection](https://github.com/orgs/nylas-samples/repositories?q=&type=all&language=java).
96+
For step-by-step walkthroughs, see the developer guides:
5797

58-
### 🚀 Making Your First Request
98+
- [Send and receive email](https://developer.nylas.com/docs/v3/email/)
99+
- [Read and manage calendar events](https://developer.nylas.com/docs/v3/calendar/)
100+
- [Find available meeting times with Scheduler](https://developer.nylas.com/docs/v3/scheduler/)
101+
- [Capture meeting notes with Notetaker](https://developer.nylas.com/docs/v3/notetaker/)
102+
- [Manage Agent Accounts](https://developer.nylas.com/docs/v3/agent-accounts/)
103+
- [Subscribe to webhooks and notifications](https://developer.nylas.com/docs/v3/notifications/)
104+
- [Choose a data residency region](https://developer.nylas.com/docs/dev-guide/platform/data-residency/)
59105

60-
You use the `NylasClient` object to make requests to the Nylas API. The SDK is organized into different resources, each of which has methods to make requests to the API. Each resource is available through the `NylasClient` object configured with your API key.
106+
### Error handling
61107

62-
For example, to get a list of calendars, you can use the following code:
108+
Nylas API errors extend `AbstractNylasApiError` (e.g. `NylasApiError`, `NylasOAuthError`). SDK-side errors extend `AbstractNylasSdkError` (e.g. `NylasSdkTimeoutError`, `NylasSdkRemoteClosedError`).
63109

64110
```java
65-
NylasClient nylas = new NylasClient.Builder("API_KEY").build();
66-
ListResponse<Calendars> calendars = nylas.calendars().list("GRANT_ID");
111+
import com.nylas.models.AbstractNylasApiError;
112+
import com.nylas.models.AbstractNylasSdkError;
113+
import com.nylas.models.NylasApiError;
114+
115+
try {
116+
nylas.calendars().list("GRANT_ID");
117+
} catch (NylasApiError e) {
118+
System.err.println("API error " + e.getStatusCode() + ": " + e.getMessage());
119+
System.err.println("Request ID: " + e.getRequestId());
120+
} catch (AbstractNylasSdkError e) {
121+
System.err.println("SDK error: " + e.getMessage());
122+
}
67123
```
68124

69-
## 📚 Documentation
125+
### Logging
70126

71-
Nylas maintains a [reference guide for the Kotlin and Java SDK](https://nylas-java-sdk-reference.pages.dev/) to help you get familiar with the available methods and classes.
127+
The SDK uses [SLF4J](http://www.slf4j.org). The HTTP client exposes three DEBUG-level loggers:
72128

73-
## ✨ Upgrading from 1.x
129+
- `com.nylas.http.Summary` — one line per request/response (method, URI, status, size, duration)
130+
- `com.nylas.http.Headers` — request/response headers (Authorization redacted by default)
131+
- `com.nylas.http.Body` — request/response bodies (first 10 kB by default)
74132

75-
See [UPGRADE.md](UPGRADING.md) for instructions on upgrading from 1.x to 2.x.
133+
Enable them with your logging framework, e.g. log4j2:
76134

77-
**Note**: The Kotlin/Java SDK 2.x is not compatible with the Nylas API earlier than v3-beta.
135+
```xml
136+
<Logger name="com.nylas" level="DEBUG"/>
137+
```
78138

79-
## 🪵 Logging
139+
Customize redaction and body-size limits by passing your own `HttpLoggingInterceptor` to `NylasClient.Builder`.
80140

81-
The SDK uses [SLF4J](http://www.slf4j.org) for logging. If you are using the SDK you can [choose what logging framework to use with it](http://www.slf4j.org/manual.html#projectDep) for your app.
141+
## 💡 Examples
82142

83-
Common choices are log4j, logback, java.util.logging. If the application doesn't specify any logging framework,
84-
SLF4J emits one single warning and is then completely silent.
143+
Runnable Java and Kotlin examples live in [`examples/`](examples) (folders, events, messages, large attachments, Notetaker). For full apps, browse [Java repos in nylas-samples](https://github.com/orgs/nylas-samples/repositories?q=java).
85144

86-
By default, the HTTP client is configured with the `com.nylas.HttpLoggingInterceptor`
87-
which provides three DEBUG level loggers for HTTP requests.
145+
## 🤖 AI agents
88146

89-
- `com.nylas.http.Summary` logs one line for each request, containing the method, URI, and content size,
90-
and one line for each response containing the status code, message, content size and duration.
91-
- `com.nylas.http.Headers` logs the request and response HTTP headers (except Authorization value by default).
92-
- `com.nylas.http.Body` logs request and response bodies (first 10kB by default).
147+
[nylas/skills](https://github.com/nylas/skills) drops Nylas into Claude Code, Cursor, Codex, and other agents that support the skills format:
93148

94-
You can enable or disable these loggers using whatever logging framework you use.
149+
```bash
150+
npx skills add nylas/skills
151+
/plugin marketplace add nylas/skills # Claude Code
152+
```
153+
154+
The CLI also installs an MCP server for Claude Desktop, Claude Code, Cursor, Windsurf, or VS Code:
155+
156+
```bash
157+
brew install nylas/nylas-cli/nylas
158+
nylas mcp install
159+
```
95160

96-
For example, if you're using log4j2 and with an xml configuration file, include this line to enable all three:
97-
`<Logger name="com.nylas" level="DEBUG"/>`
161+
Walkthrough: [give AI agents email access via MCP](https://cli.nylas.com/guides/give-ai-agents-email-access-via-mcp).
98162

99-
You can configure how you log HTTP Authorization header values and the body size limit using a
100-
`NylasClient.Builder` with a customized `HttpLoggingInterceptor`
163+
## 📚 Reference
164+
165+
- [Kotlin & Java SDK guide](https://developer.nylas.com/docs/v3/sdks/kotlin-java/)
166+
- [API reference](https://developer.nylas.com/docs/api/v3/)
167+
- [Getting started](https://developer.nylas.com/docs/v3/getting-started/)
168+
- [Javadoc / Dokka SDK reference](https://nylas-java-sdk-reference.pages.dev/)
169+
- [Data residency](https://developer.nylas.com/docs/dev-guide/platform/data-residency/)
170+
- [Nylas CLI](https://cli.nylas.com)
171+
- [Dashboard](https://dashboard-v3.nylas.com)
172+
173+
## ✨ Upgrading
174+
175+
See [CHANGELOG.md](CHANGELOG.md) for release notes and [UPGRADE.md](UPGRADE.md) for migration instructions between major versions.
101176

102177
## 💙 Contributing
103178

104-
We value and appreciate contributors' time! We welcome questions, bug reports, and pull requests.
179+
We welcome questions, bug reports, and pull requests. See [Contributing.md](Contributing.md) for how to get involved, or ask in the [Nylas forum](https://forums.nylas.com).
180+
181+
## 🔒 Security
182+
183+
Found a security issue? Please follow the [Nylas vulnerability disclosure policy](https://www.nylas.com/security/vulnerability-disclosure-policy/) instead of opening a public issue.
184+
185+
## 🔗 Other Nylas SDKs
105186

106-
See the [Contributing](Contributing.md) for information about how to make contributions to this project.
187+
- [nylas-nodejs](https://github.com/nylas/nylas-nodejs)
188+
- [nylas-python](https://github.com/nylas/nylas-python)
189+
- [nylas-ruby](https://github.com/nylas/nylas-ruby)
107190

108191
## 📝 License
109192

110-
This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) for the full terms.
193+
This project is licensed under the terms of the [MIT license](LICENSE).

diagrams/nylas-logo.png

24.4 KB
Loading

0 commit comments

Comments
 (0)