Skip to content

Commit

Permalink
Update module READMEs (#962)
Browse files Browse the repository at this point in the history
This reduces duplication in the README files of the individual modules
and fixes some outdated links and code.

[skip ci]
  • Loading branch information
lukellmann authored Aug 11, 2024
1 parent 2be545a commit e9c4674
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 160 deletions.
60 changes: 9 additions & 51 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Kord Core

Kord `core` is an implementation of the discord api build on top of the [gateway](https://gitlab.com/kordlib/kord/tree/master/gateway),
[rest](https://gitlab.com/kordlib/kord/tree/master/rest) and [cache](https://gitlab.com/kordlib/cache) modules. It features a high level representation of Discord's entities and their behaviour
in a non-blocking, coroutine focused, event-driven design.
Kord `core` is an implementation of the discord api build on top of the [gateway](../gateway), [rest](../rest) and
[cache](https://github.com/kordlib/cache) modules. It features a high level representation of Discord's entities and
their behavior in a non-blocking, coroutine focused, event-driven design.

## Example usage

Expand Down Expand Up @@ -31,72 +31,30 @@ suspend fun main() {
}
}
```
## Installation

Replace `{version}` with the latest version number on maven central.

For Snapshots replace `{version}` with `{branch}-SNAPSHOT`

e.g: `0.7.x-SNAPSHOT`
## Installation

[![Download](https://img.shields.io/nexus/r/dev.kord/kord-core?color=fb5502&label=Kord&logoColor=05c1fd&server=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F&style=for-the-badge) ](https://search.maven.org/search?q=g:dev.kord)
[![Snapshot](https://img.shields.io/nexus/s/dev.kord/kord-core?label=SNAPSHOT&server=https%3A%2F%2Foss.sonatype.org%2F&style=for-the-badge)](https://oss.sonatype.org/#nexus-search;quick~dev.kord)
### Gradle (groovy)
See the root [README](../README.md#installation) for more information.

```groovy
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```
### Gradle (Kotlin)

```groovy
```kotlin
dependencies {
implementation("dev.kord:kord-core:{version}")
}
```

### Gradle (kotlin)
### Gradle (Groovy)

```kotlin
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

---

```kotlin
```groovy
dependencies {
implementation("dev.kord:kord-core:{version}")
}
```

### Maven

##### Kord Snapshots Repository (Optional):

```xml

<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
```

---

```xml

<dependency>
<groupId>dev.kord</groupId>
<artifactId>kord-core-jvm</artifactId>
Expand Down
58 changes: 7 additions & 51 deletions gateway/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kord gateway

A low-level implementation of discord's [gateway](https://discordapp.com/developers/docs/topics/gateway).
A low-level implementation of discord's [gateway](https://discord.com/developers/docs/topics/gateway).

## Example usage

Expand All @@ -11,7 +11,6 @@ suspend fun main(args: Array<String>) {
val gateway = DefaultGateway { // optional builder for custom configuration
client = HttpClient {
install(WebSockets)
install(JsonFeature)
}
reconnectRetry = LinearRetry(2.seconds, 20.seconds, 10)
sendRateLimiter = IntervalRateLimiter(120, 60.seconds)
Expand Down Expand Up @@ -39,73 +38,30 @@ suspend fun main(args: Array<String>) {
}
}
```
## Installation

Replace `{version}` with the latest version number on maven central.

For Snapshots replace `{version}` with `{branch}-SNAPSHOT`

e.g: `0.7.x-SNAPSHOT`

[![Download](https://img.shields.io/nexus/r/dev.kord/kord-gateway?color=fb5502&label=Kord&logoColor=05c1fd&server=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F&style=for-the-badge) ](https://search.maven.org/search?q=g:dev.kord)
[![Snapshot](https://img.shields.io/nexus/s/dev.kord/kord-gateway?label=SNAPSHOT&server=https%3A%2F%2Foss.sonatype.org%2F&style=for-the-badge)](https://oss.sonatype.org/#nexus-search;quick~dev.kord)
## Installation

### Gradle (groovy)
See the root [README](../README.md#installation) for more information.

```groovy
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```
### Gradle (Kotlin)

```groovy
```kotlin
dependencies {
implementation("dev.kord:kord-gateway:{version}")
}
```

### Gradle (kotlin)

```kotlin
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

---
### Gradle (Groovy)

```kotlin
```groovy
dependencies {
implementation("dev.kord:kord-gateway:{version}")
}
```

### Maven

##### Kord Snapshots Repository (Optional):

```xml

<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
```

---

```xml

<dependency>
<groupId>dev.kord</groupId>
<artifactId>kord-gateway-jvm</artifactId>
Expand Down
58 changes: 7 additions & 51 deletions rest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,75 +13,31 @@ suspend fun main(args: Array<String>) {
val username = rest.user.getCurrentUser().username
println("using $username's token")
}
```
## Installation

Replace `{version}` with the latest version number on maven central.

For Snapshots replace `{version}` with `{branch}-SNAPSHOT`

e.g: `0.7.x-SNAPSHOT`
```

[![Download](https://img.shields.io/nexus/r/dev.kord/kord-rest?color=fb5502&label=Kord&logoColor=05c1fd&server=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2F&style=for-the-badge) ](https://search.maven.org/search?q=g:dev.kord)
[![Snapshot](https://img.shields.io/nexus/s/dev.kord/kord-rest?label=SNAPSHOT&server=https%3A%2F%2Foss.sonatype.org%2F&style=for-the-badge)](https://oss.sonatype.org/#nexus-search;quick~dev.kord)
## Installation

See the root [README](../README.md#installation) for more information.

### Gradle (groovy)
### Gradle (Kotlin)

```groovy
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

```groovy
```kotlin
dependencies {
implementation("dev.kord:kord-rest:{version}")
}
```

### Gradle (kotlin)

```kotlin
repositories {
mavenCentral()
// Kord Snapshots Repository (Optional):
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
```

---
### Gradle (Groovy)

```kotlin
```groovy
dependencies {
implementation("dev.kord:kord-rest:{version}")
}
```

### Maven

##### Kord Snapshots Repository (Optional):

```xml

<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
```

---

```xml

<dependency>
<groupId>dev.kord</groupId>
<artifactId>kord-rest-jvm</artifactId>
Expand Down
13 changes: 6 additions & 7 deletions voice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,26 @@ processIncomingAudio(connection.streams.incomingAudioFrames)

## Installation

Replace `{version}` with the latest version number on maven central.
See the root [README](../README.md#installation) for more information.

[![Download](https://img.shields.io/maven-central/v/dev.kord/kord-voice.svg?color=fb5502&label=Kord&logoColor=05c1fd&style=for-the-badge)](https://search.maven.org/search?q=g:%22dev.kord%22%20AND%20a:%22kord-voice%22)
### Gradle (Kotlin)

### Gradle (groovy)
```groovy
```kotlin
dependencies {
implementation("dev.kord:kord-voice:{version}")
}
```

### Gradle (kotlin)
```kotlin
### Gradle (Groovy)

```groovy
dependencies {
implementation("dev.kord:kord-voice:{version}")
}
```

### Maven

##### Kord Snapshots Repository (Optional):
```xml
<dependency>
<groupId>dev.kord</groupId>
Expand Down

0 comments on commit e9c4674

Please sign in to comment.