3
3
[ ![ Maven Central] ( https://img.shields.io/maven-central/v/com.vonage/server-sdk-kotlin )] ( https://central.sonatype.com/artifact/com.vonage/server-sdk-kotlin )
4
4
[ ![ 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 )
5
5
[ ![ codecov] ( https://codecov.io/gh/Vonage/vonage-kotlin-sdk/graph/badge.svg?token=YNBJUD8OUT )] ( https://codecov.io/gh/Vonage/vonage-kotlin-sdk )
6
+ [ ![ KDoc] ( https://javadoc.io/badge2/com.vonage/server-sdk-kotlin/javadoc.svg )] ( https://javadoc.io/doc/com.vonage/server-sdk-kotlin )
6
7
![ SLOC] ( https://sloc.xyz/github/Vonage/vonage-kotlin-sdk )
7
8
[ ![ Contributor Covenant] ( https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg )] ( CODE_OF_CONDUCT.md )
8
9
[ ![ License] ( https://img.shields.io/badge/License-Apache%202.0-blue.svg )] ( LICENSE.txt )
@@ -115,9 +116,30 @@ val vonageClient = Vonage {
115
116
```
116
117
117
118
## Usage
119
+
120
+ As with our other SDKs, the architecture is based around the ` Vonage ` class, which defines the authentication
121
+ credentials and optional advanced settings for the HTTP client. The class has a field for each supported API,
122
+ which returns an object containing methods available on that API. Where the SDK differs from other SDKs is that
123
+ it uses a resource-based approach for CRUD operations, rather than a flat list of methods.
124
+ These are inner classes defined for each API resources and are always prefixed with ` Existing ` - for example,
125
+ ` ExistingCall ` , ` ExistingSession ` , ` ExistingApplication ` etc. As a general rule, resources with unique identifiers
126
+ have a corresponding ` Existing[Resource] ` class which is used to perform operations on that resource, rather
127
+ than repeatedly passing the ID of that resource to methods on the parent class, as is the case in the Java SDK.
128
+
129
+ ### Examples
118
130
You can find complete runnable code samples in the [ Code Snippets repository] ( https://github.com/Vonage/vonage-kotlin-code-snippets ) ,
119
131
including [ a searchable list of snippets] ( https://github.com/Vonage/vonage-kotlin-code-snippets/blob/main/SNIPPETS.md ) .
120
132
133
+ ### Documentation
134
+ The SDK is fully documented with KDocs, so you should have complete documentation from your IDE. You may need to
135
+ click "Download Sources" in IntelliJ to get the full documentation. Alternatively, you can browse the documentation
136
+ using a service such as [ Javadoc.io] ( https://javadoc.io/doc/com.vonage/server-sdk-kotlin/latest/index.html ) , which
137
+ renders the documentation for you from [ the artifacts on Maven Central] ( https://repo.maven.apache.org/maven2/com/vonage/server-sdk-kotlin/ ) .
138
+
139
+ For help with any specific APIs, refer to the relevant documentation on our [ developer portal] ( https://developer.vonage.com/en/documentation ) ,
140
+ using the links provided in the [ Supported APIs] ( #supported-apis ) section. For completeness, you can also consult the
141
+ [ API specifications] ( https://developer.vonage.com/api ) if you believe there are any discrepancies.
142
+
121
143
## Frequently Asked Questions
122
144
123
145
** Q: Why use this SDK instead of the [ Vonage Java Server SDK] ( https://github.com/Vonage/vonage-java-sdk ) ?**
@@ -126,14 +148,20 @@ including [a searchable list of snippets](https://github.com/Vonage/vonage-kotli
126
148
syntactic sugar, so you can avoid the cumbersome builder pattern in favour of a more idiomatic DSL-like
127
149
syntax, optional and named parameters with default values etc. whilst still reataining the strong typing
128
150
offered by the Java SDK. Furthermore, you are more partially shielded from "platform types" (the ` ! ` )
129
- so you have a better idea of what is and isn't nullable when creating requests.
151
+ so you have a better idea of what is and isn't nullable when creating requests. You can read more about the
152
+ differences in [ the v1.0.0 announcement blog post] ( https://developer.vonage.com/en/blog/announcing-the-vonage-kotlin-server-sdk ) .
130
153
131
154
** Q: What is your policy on thread safety?**
132
155
133
156
** A:** As with the Java Server SDK, only one thread should use the client at a time.
134
157
If you would like to use the SDK in a multithreaded environment, create a separate instance of
135
158
` Vonage ` for each thread, or use a ThreadLocal instance.
136
159
160
+ ** Q: I'm having issues with my project when including the SDK as a dependency. How can I troubleshoot this?**
161
+
162
+ ** A:** Please see [ this blog post] ( https://developer.vonage.com/en/blog/one-simple-trick-for-resolving-java-runtime-dependency-issues ) .
163
+ In short, you may have conflicting dependency versions in your project which clash with this SDK's transitive dependencies.
164
+
137
165
## Contribute!
138
166
139
167
_ We :heart : contributions to this library!_
0 commit comments