Skip to content

Commit

Permalink
bump version 1.0.2 -> 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wusatosi committed Nov 25, 2019
1 parent a4b3d39 commit 47b5e24
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This client aims to be as simple as possible
"reCAPTCHA is a free CAPTCHA service that protects websites from spam and abuse."

- reCAPTCHA: https://www.google.com/recaptcha
- Version: 1.0.2
- Version: 1.0.3
- License: MIT, see [LICENSE](LICENSE)

## Installation
Expand All @@ -22,7 +22,8 @@ For v2 client:
```kotlin
import com.wusatosi.recaptcha.v2.RecaptchaV2Client

val v2Client = RecaptchaV2Client("your secret key...")
// val v2Client = RecaptchaClient.createV2("your site key...")
val v2Client = RecaptchaV2Client.create("your site key...")

runBlocking {
// RecaptchaV2Client.verify is an suspend function
Expand All @@ -36,7 +37,8 @@ For v3 client
```kotlin
import com.wusatosi.recaptcha.v3.RecaptchaV3Client

val v3Client = RecaptchaV3Client("your secret key...")
// val v3Client = RecaptchaClient.createV3("your site key...")
val v3Client = RecaptchaV3Client.create("your site key...")
runBlocking {

// RecaptchaV3Client.getVerifyScore is an suspend function
Expand All @@ -46,26 +48,41 @@ runBlocking {
}
```

Universal
```kotlin
import com.wusatosi.recaptcha.RecaptchaClient

val universalClient = RecaptchaClient.createUniversal("your site key...")

runBlocking {

// RecaptchaClient.verify is an suspend function
val result: Boolean = universalClient.verify(token)

// ...
}
```

Supports using "www.recaptcha.net" instead of "www.google.com" as the API endpoint,
[for google side more documentation](https://developers.google.com/recaptcha/docs/faq),
this can be enable via:
```kotlin
// V2
RecaptchaV2Client("your secret key...", true)
// RecaptchaV2Client("your secret key...", useRecaptchaDotNetEndPoint = true)
RecaptchaClient.createV2("your secret key...", true)
// RecaptchaClient.createV2("your secret key...", useRecaptchaDotNetEndPoint = true)

// V3
RecaptchaV3Client("your secret key...", true)
// RecaptchaV3Client("your secret key...", useRecaptchaDotNetEndPoint = true)
RecaptchaClient.createV3("your secret key...", true)
// RecaptchaClient.createV3("your secret key...", useRecaptchaDotNetEndPoint = true)
```

## Contributing
[Issues](https://github.com/wusatosi/kotlin-recaptcha-client/issues/new), pull requests, all always welcome
[Issues](https://github.com/wusatosi/kotlin-recaptcha-client/issues/new), pull requests, are all always welcome

## Uses:
* Kotlin-coroutines, version 1.1.0
* [Fuel](https://github.com/kittinunf/Fuel) (http client), version 1.16.0
* Gson, version 2.8.5
* [Kotlin-coroutines](https://github.com/Kotlin/kotlinx.coroutines)
* [Fuel](https://github.com/kittinunf/Fuel) (http client)
* [Gson](https://github.com/google/gson)

## License
[MIT](https://choosealicense.com/licenses/mit/)
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'com.wusatosi.recaptcha'
version '1.0.2'
version '1.0.3'

repositories {
mavenCentral()
Expand Down

0 comments on commit 47b5e24

Please sign in to comment.