Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java and Kotlin Getting started #23

Merged
merged 55 commits into from
Dec 1, 2020
Merged

Conversation

Yoann-Abbes
Copy link
Contributor

@Yoann-Abbes Yoann-Abbes commented Nov 12, 2020

What does this PR do ?

Add Java and Kotling Getting Started

Other changes

Fix documentation (Bulk, and SearchResult next)
Fix collection:create
Update document:search signature
Fix token expired

Boyscout

@Yoann-Abbes Yoann-Abbes self-assigned this Nov 12, 2020
@Yoann-Abbes Yoann-Abbes changed the title Getting started java Add Java and Kotlin Getting started Nov 12, 2020
@Yoann-Abbes Yoann-Abbes requested a review from jenow November 12, 2020 13:03
doc/1/getting-started/kotlin/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/kotlin/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/kotlin/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/kotlin/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
@Yoann-Abbes Yoann-Abbes requested a review from jenow November 17, 2020 10:42
Copy link
Contributor

@scottinet scottinet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested changes should also be applied to the Kotlin section whenever possible

doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
Connected!
Successfully subscribing!
New document added to yellow-taxi collection!
New created document notification: [Document content as ConcurrentHashMap]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm... can the snippet serialize the document content and print it so that example gives a view of the actual notification content?

doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved
Comment on lines 148 to 149
- follow our guide to learn how to perform [basic authentication](/core/2/guides/essentials/user-authentication#local-strategy)
- follow our guide to learn how to [manage users and how to set up fine-grained access control](/core/2/guides/essentials/security)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are Kuzzle topics rather than SDK ones

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You r right, Ive copied this part from others SDK getting started, we should probably make it more accurate

doc/1/getting-started/java/snippets/document-java.java Outdated Show resolved Hide resolved
Yoann-Abbes and others added 17 commits November 18, 2020 09:46
doc/1/getting-started/kotlin/index.md Outdated Show resolved Hide resolved
doc/1/getting-started/java/index.md Outdated Show resolved Hide resolved

- discover what this SDK has to offer by browsing other sections of this documentation
- learn how to use [pagination strategies](/sdk/jvm/1/core-classes/search-result/next/#pagination-strategies) with the [document:search](/sdk/jvm/1/controllers/document/search/) API action.
- discover others [Kuzzle guides](core/2/guides/essentials/introduction/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- discover others [Kuzzle guides](core/2/guides/essentials/introduction/)
- discover other [Kuzzle guides](core/2/guides/essentials/introduction/)

Build and run your program:

```bash
$ javac -classpath ./path/to/the/sdk.jar GettingStartedRealtime.kt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong compiler

As you did before, build and run your program:

```bash
$ javac -classpath ./path/to/the/sdk.jar GettingStartedStorage.kt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong compiler

Run the program with the following command:

```bash
$ javac -classpath ./path/to/the/sdk.jar GettingStartedFirstConnection.kt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong compiler

doc/1/getting-started/kotlin/index.md Outdated Show resolved Hide resolved
// Creates a WebSocket connection.
// Replace "kuzzle" with
// your Kuzzle host name (e.g. "localhost")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

println("Connected!")

try {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines 16 to 17
// Connects to the server.
connect()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Connects to the server.
connect()
// Connects to the server.
connect()

import java.util.concurrent.ConcurrentHashMap;

fun main() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

// Creates a WebSocket connection.
// Replace "kuzzle" with
// your Kuzzle hostname like "localhost"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines 16 to 17
// Connects to the server.
connect()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Connects to the server.
connect()
// Connects to the server.
connect()

// Creates a WebSocket connection.
// Replace "kuzzle" with
// your Kuzzle hostname like "localhost"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

// Creates a WebSocket connection.
// Replace "kuzzle" with
// your Kuzzle hostname like "localhost"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

// Creates a WebSocket connection.
// Replace "kuzzle" with
// your Kuzzle host name (e.g. "localhost")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

doc/1/getting-started/kotlin/snippets/realtime-kotlin.kt Outdated Show resolved Hide resolved
@Yoann-Abbes Yoann-Abbes merged commit 51ad4e9 into 1-dev Dec 1, 2020
@Yoann-Abbes Yoann-Abbes deleted the getting-started-java branch December 1, 2020 10:39
@Yoann-Abbes Yoann-Abbes mentioned this pull request Dec 1, 2020
scottinet pushed a commit to kuzzleio/sdk-java that referenced this pull request Dec 3, 2020
## What does this PR do ?

Add a "How to Migrate from SDK Java to SDK JVM" page
#97

Since this doc use an example with `document:search`, kuzzleio/sdk-jvm#23 has to be merged before
(the signature has been updated)
### Boyscout

Typo in Getting Started
Yoann-Abbes added a commit to kuzzleio/sdk-java that referenced this pull request Dec 4, 2020
## What does this PR do ?

Add a "How to Migrate from SDK Java to SDK JVM" page
#97

Since this doc use an example with `document:search`, kuzzleio/sdk-jvm#23 has to be merged before
(the signature has been updated)
### Boyscout

Typo in Getting Started
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants