Skip to content

Commit

Permalink
docs: Further guidance on installation
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Nov 21, 2024
1 parent 985b07c commit a842b8f
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 34 deletions.
20 changes: 1 addition & 19 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL Advanced"
name: "CodeQL"
on:
push:
branches: [ "main" ]
Expand Down Expand Up @@ -48,26 +48,8 @@ jobs:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cbe18979603527f12c7871a6eb04833ecf1548c7
with:
Expand Down
59 changes: 48 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Vonage Server SDK for Kotlin (JVM)

[![Maven Central](https://img.shields.io/maven-central/v/com.vonage/server-sdk-kotlin)](https://central.sonatype.com/artifact/com.vonage/server-sdk-kotlin)
[![KDoc](https://javadoc.io/badge2/com.vonage/server-sdk-kotlin/javadoc.svg)](https://javadoc.io/doc/com.vonage/server-sdk-kotlin)
[![Build Status](https://github.com/Vonage/vonage-kotlin-sdk/actions/workflows/build.yml/badge.svg)](https://github.com/Vonage/vonage-kotlin-sdk/actions/workflows/build.yml)
![CodeQL](https://github.com/Vonage/vonage-kotlin-sdk/actions/workflows/codeql.yml/badge.svg)
[![codecov](https://codecov.io/gh/Vonage/vonage-kotlin-sdk/graph/badge.svg?token=YNBJUD8OUT)](https://codecov.io/gh/Vonage/vonage-kotlin-sdk)
![SLOC](https://sloc.xyz/github/Vonage/vonage-kotlin-sdk)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Vonage/vonage-kotlin-sdk/badge)](https://scorecard.dev/viewer/?uri=github.com/Vonage/vonage-kotlin-sdk)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.txt)
<!--[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.txt)-->

This Kotlin SDK allows you to use [Vonage APIs](https://developer.vonage.com/api) in any JVM-based application.
You'll need to have [created a Vonage account](https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=java-client-library).
Expand Down Expand Up @@ -45,17 +44,49 @@ We also provide server SDKs in other languages:
- [.NET](https://github.com/Vonage/vonage-dotnet-sdk)
- [PHP](https://github.com/Vonage/vonage-php-sdk)
- [Python](https://github.com/Vonage/vonage-python-sdk)
- [Ruby](https://github.com/Vonage/vonage-ruby-sdk)
- [NodeJS](https://github.com/Vonage/vonage-node-sdk)
- [Ruby](https://github.com/Vonage/vonage-ruby-sdk)

We also offer [client-side SDKs](https://developer.vonage.com/en/vonage-client-sdk/overview) for iOS, Android and JavaScript.
We also offer [client-side SDKs](https://developer.vonage.com/en/vonage-client-sdk/overview) for Android, iOS and JavaScript.
See all of our SDKs and integrations on the [Vonage Developer portal](https://developer.vonage.com/en/tools).

## Installation
Releases are published to [Maven Central](https://central.sonatype.com/artifact/com.vonage/server-sdk-kotlin).
Instructions for your build system can be found in the snippets section.
They're also available from [here](https://mvnrepository.com/artifact/com.vonage/server-sdk-kotlin/latest).
Release notes can be found in the [changelog](CHANGELOG.md).
They're also available from [here](https://search.maven.org/artifact/com.vonage/server-sdk-kotlin/1.1.0/jar).
Release notes for each version can be found in the [changelog](CHANGELOG.md).

Here are the instructions for including the SDK in your project:

### Gradle
#### Groovy DSL
Add the following to your `build.gradle` file:

```groovy
dependencies {
implementation "com.vonage:server-sdk-kotlin:1.1.0"
}
```

#### Kotlin DSL
Add the following to your `build.gradle.kts` file:

```kotlin
dependencies {
implementation("com.vonage:server-sdk-kotlin:1.1.0")
}
```

### Maven
Add the following to the `<dependencies>` section of your `pom.xml` file:

```xml
<dependency>
<groupId>com.vonage</groupId>
<artifactId>server-sdk-kotlin</artifactId>
<version>1.1.0</version>
</dependency>
```

### Build It Yourself

Expand All @@ -73,6 +104,7 @@ The `uberjar` profile will create a JAR file with all dependencies included in t
directory at the root of the repo. You can then include this in your project's classpath.

## Configuration
The SDK requires very little configuration to get started.

## Typical Instantiation
For default configuration, you just need to specify your Vonage account credentials using API key and secret,
Expand Down Expand Up @@ -125,16 +157,21 @@ These are inner classes defined for each API resources and are always prefixed w
`ExistingCall`, `ExistingSession`, `ExistingApplication` etc. As a general rule, resources with unique identifiers
have a corresponding `Existing[Resource]` class which is used to perform operations on that resource, rather
than repeatedly passing the ID of that resource to methods on the parent class, as is the case in the Java SDK.
These resource classes are constructed from a method call in the top-level API class. So, for example, to work with
an `ExistingSession`, you would do: `client.video.session(SESSION_ID)`, where `client` is an instance of `Vonage` and
`SESSION_ID` is the unique identifier of the video session you want to work with.

### Examples
You can find complete runnable code samples in the [Code Snippets repository](https://github.com/Vonage/vonage-kotlin-code-snippets),
including [a searchable list of snippets](https://github.com/Vonage/vonage-kotlin-code-snippets/blob/main/SNIPPETS.md).

### Documentation
The SDK is fully documented with KDocs, so you should have complete documentation from your IDE. You may need to
click "Download Sources" in IntelliJ to get the full documentation. Alternatively, you can browse the documentation
using a service such as [Javadoc.io](https://javadoc.io/doc/com.vonage/server-sdk-kotlin/latest/server-sdk-kotlin/com.vonage.client.kt/index.html),
which renders the documentation for you from [the artifacts on Maven Central](https://repo.maven.apache.org/maven2/com/vonage/server-sdk-kotlin/).
[![javadoc](https://javadoc.io/badge2/com.vonage/server-sdk-kotlin/javadoc.svg)](https://javadoc.io/doc/com.vonage/server-sdk-kotlin)

The SDK is fully documented with [KDocs](https://kotlinlang.org/docs/kotlin-doc.html), so you should have complete
documentation from your IDE. You may need to click "Download Sources" in IntelliJ to get the full documentation.
Alternatively, you can browse the documentation using a service like [Javadoc.io](https://javadoc.io/doc/com.vonage/server-sdk-kotlin/1.1.0/index.html),
which renders the documentation for you from [the artifacts on Maven Central](https://repo.maven.apache.org/maven2/com/vonage/server-sdk-kotlin/1.1.0/).

For help with any specific APIs, refer to the relevant documentation on our [developer portal](https://developer.vonage.com/en/documentation),
using the links provided in the [Supported APIs](#supported-apis) section. For completeness, you can also consult the
Expand Down
6 changes: 4 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Security Policy
Ths file describes how security issues are handled in the Vonage Kotlin SDK.

## Supported Versions
Only the latest version of the SDK is supported.
Only the latest version of the SDK is supported. The timeline for fixing issues is within the next two releases
of it being reported and fixed. This is to cover the scenario where an issue is reported just before or after
a planned release, to allow time for the fix to be included in the next release.

## Reporting a Vulnerability

To report a security concern, use the "[Report a Vulnerability](https://github.com/Vonage/vonage-kotlin-sdk/security/advisories/new)" tab.
You can also contact the Developer Relations team directly via [email](devrel@vonage.com) for more private disclosure.
You can also [raise an Issue](https://github.com/Vonage/vonage-kotlin-sdk/issues/new/choose) and/or create a [Pull Request](https://github.com/Vonage/vonage-kotlin-sdk/pulls) from your fork of the repo.
Expand Down
20 changes: 19 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.vonage</groupId>
<artifactId>server-sdk-kotlin</artifactId>
<version>1.1.1</version>
<version>1.1.0</version>

<name>Vonage Kotlin Server SDK</name>
<description>Kotlin client for Vonage APIs</description>
Expand Down Expand Up @@ -109,6 +109,24 @@
match="VONAGE_KOTLIN_SDK_VERSION = &quot;.+&quot;"
replace="VONAGE_KOTLIN_SDK_VERSION = &quot;${project.version}&quot;"
/>
<replaceregexp
file="README.md"
match="\/server-sdk-kotlin\/([0-9\.]+)\/"
replace="\/server-sdk-kotlin\/${project.version}\/"
flags="g"
/>
<replaceregexp
file="README.md"
match="vonage:server-sdk-kotlin:.+&quot;"
replace="vonage:server-sdk-kotlin:${project.version}&quot;"
flags="g"
/>
<replaceregexp
file="README.md"
match="&lt;version&gt;.+&lt;/version&gt;"
replace="&lt;version&gt;${project.version}&lt;\/version&gt;"
flags="g"
/>
</target>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/vonage/client/kt/Vonage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package com.vonage.client.kt
import com.vonage.client.HttpConfig
import com.vonage.client.VonageClient

const val VONAGE_KOTLIN_SDK_VERSION = "1.1.1"
const val VONAGE_KOTLIN_SDK_VERSION = "1.1.0"
private const val SDK_USER_AGENT = "vonage-kotlin-sdk/$VONAGE_KOTLIN_SDK_VERSION"

/**
Expand Down

0 comments on commit a842b8f

Please sign in to comment.