{"id":15188785,"url":"https://github.com/revenuemonster/rm-kotlin-sdk","last_synced_at":"2025-10-27T10:31:56.258Z","repository":{"id":38234739,"uuid":"370565536","full_name":"RevenueMonster/rm-kotlin-sdk","owner":"RevenueMonster","description":"Revenue Monster Kotlin Multiplatform SDK ⚡️","archived":false,"fork":false,"pushed_at":"2024-07-12T18:36:00.000Z","size":97447,"stargazers_count":3,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T05:23:36.423Z","etag":null,"topics":["android","coroutines","gradle","ios","jitpack","jvm","kmp","kotlin-kmp-lib","kotlin-native","linux","macos","maven-central","multiplatform","window"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RevenueMonster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-25T04:39:39.000Z","updated_at":"2024-04-29T09:20:14.000Z","dependencies_parsed_at":"2024-09-18T16:35:16.761Z","dependency_job_id":"466a520c-77fd-42dc-a8e1-b884c8bd95c0","html_url":"https://github.com/RevenueMonster/rm-kotlin-sdk","commit_stats":{"total_commits":262,"total_committers":4,"mean_commits":65.5,"dds":0.4847328244274809,"last_synced_commit":"36342cd8d0f19b14ffcafa2103e3801e6ff67093"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-kotlin-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-kotlin-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-kotlin-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-kotlin-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RevenueMonster","download_url":"https://codeload.github.com/RevenueMonster/rm-kotlin-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238480870,"owners_count":19479572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","coroutines","gradle","ios","jitpack","jvm","kmp","kotlin-kmp-lib","kotlin-native","linux","macos","maven-central","multiplatform","window"],"created_at":"2024-09-27T19:42:27.635Z","updated_at":"2025-10-27T10:31:50.691Z","avatar_url":"https://github.com/RevenueMonster.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RM Kotlin Multiplatform SDK\n\n\u003cp\u003e\n   \u003ca href=\"https://search.maven.org/search?q=g:io.revenuemonster.sdk\"\u003e\u003cimg src=\"https://img.shields.io/maven-central/v/io.revenuemonster.sdk/rm-kotlin-sdk\" alt=\"maven central\" title=\"maven central\"/\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/RevenueMonster/rm-kotlin-sdk/actions?query=workflow%3ATest\"\u003e\u003cimg src=\"https://github.com/RevenueMonster/rm-kotlin-sdk/workflows/Test/badge.svg?branch=main\" alt=\"test status\" title=\"test status\"/\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/RevenueMonster/rm-kotlin-sdk/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/RevenueMonster/rm-kotlin-sdk\" alt=\"license\" title=\"license\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n![badge][badge-android]\n![badge][badge-mac]\n![badge][badge-linux]\n![badge][badge-windows]\n\n[badge-android]: http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat\n[badge-ios]: http://img.shields.io/badge/platform-ios-CDCDCD.svg?style=flat\n[badge-js]: http://img.shields.io/badge/platform-js-F8DB5D.svg?style=flat\n[badge-jvm]: http://img.shields.io/badge/platform-jvm-DB413D.svg?style=flat\n[badge-linux]: http://img.shields.io/badge/platform-linux-2D3F6C.svg?style=flat\n[badge-windows]: http://img.shields.io/badge/platform-windows-4D76CD.svg?style=flat\n[badge-mac]: http://img.shields.io/badge/platform-macos-111111.svg?style=flat\n[badge-watchos]: http://img.shields.io/badge/platform-watchos-C0C0C0.svg?style=flat\n[badge-tvos]: http://img.shields.io/badge/platform-tvos-808080.svg?style=flat\n[badge-wasm]: https://img.shields.io/badge/platform-wasm-624FE8.svg?style=flat\n[badge-nodejs]: https://img.shields.io/badge/platform-nodejs-68a063.svg?style=flat\n\n\u003e Revenue Monster Kotlin Multiplatform SDK, support every possible platform, such as desktop and mobile.\n\n\n## 🔨 Installation with Gradle\n\n### Maven Central\n\n```bash\nrepositories {\n    google()\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"io.revenuemonster.sdk:rm-kotlin-sdk:2.2.0\")\n}\n```\n⚠ Don't forget to implement ⚠\u003c/br\u003e\n[Kotlin Coroutines](https://github.com/Kotlin/kotlinx.coroutines) \u003c/br\u003e\n[Kotlinx Datetime](https://github.com/Kotlin/kotlinx-datetime) \u003c/br\u003e\n\nFor more detail please visit our [wiki](https://github.com/RevenueMonster/rm-kotlin-sdk/wiki)\n\n## 🪣 Requirements\n\n- [Kotlin](https://github.com/JetBrains/kotlin) compiler at least 1.5.10\n- [JDK](https://www.oracle.com/java/technologies/javase-downloads.html) at least 1.8\n\n## ✨ Features\n\n- Minimal package dependency\n- Support multiple platform\n\n## 📦️ Dependencies\n\n| Package name                                                             | Version |\n| ------------------------------------------------------------------------ |---------|\n| [ktor](https://github.com/ktorio/ktor)                                   | 2.1.2   |\n| [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) | 1.7.20  |\n| [kotlinx-datetime](https://github.com/Kotlin/kotlinx-datetime)           | 0.4.0   |\n\n## 🤖 Supported Platforms\n\n\u003e The idea is to support every possible platforms without pain\n\n| Platform                | Architecture | Technology | Package name          | Support |\n| ----------------------- | ------------ | --------- | --------------------- | :-----: |\n| ![badge][badge-mac]     | macOS        | JVM       | rm-kotlin-sdk-jvm     |   ✅    |\n| ![badge][badge-linux]   | linux        | JVM       | rm-kotlin-sdk-jvm     |   ✅    |\n| ![badge][badge-windows] | window       | JVM       | rm-kotlin-sdk-jvm     |   ✅    |\n| ![badge][badge-android] | android      | Android   | rm-kotlin-sdk-android |   ✅    |\n\n\n## 🙈 Example\n\n[How to get your credential](https://github.com/RevenueMonster/rm-kotlin-sdk/wiki/How-to-get-your-credential)\n\n```kotlin\nimport io.revenuemonster.sdk.RevenueMonsterAuth\nimport io.revenuemonster.sdk.RevenueMonsterSDK\nimport io.revenuemonster.sdk.model.auth.Config\nimport io.revenuemonster.sdk.util.RMException\n\nval config = Config(\n    clientID = \"\u003c\u003c\u003cClient ID\u003e\u003e\u003e\",\n    clientSecret = \"\u003c\u003c\u003cClient Secret\u003e\u003e\u003e\",\n    privateKey = \"\u003c\u003c\u003cYOUR PRIVATE KEY\u003e\u003e\u003e\",\n    sandbox = true\n)\n\nGlobalScope.launch {\n    try {\n        val auth = RevenueMonsterAuth(config).getAccessToken()\n        val sdk = RevenueMonsterSDK(auth)\n\n        val result = sdk.payment.getTransactions()\n        println(result)\n    }catch (e: RMException){\n        println(e.message)\n        println(e.errorCode)\n        println(e.errorMessage)\n    }catch (e: Throwable){\n        e.printStackTrace()\n    }\n}\n```\n\n## Custom Request (Sample)\n\nIf there's some new Feature / Open API, is not updated only we suggest to use this method, we handled most of the data processing \u0026 security check part. What you need to do only pass the request parameters and url.\n\n### Get\n```kotlin\nval sdk = RevenueMonsterSDK(auth)\nval response = sdk.custom(url = \"/v3/store/1692604052727021311\", HttpMethod.Get)\nval json = Json {\n   ignoreUnknownKeys = true\n}\nval store = json.decodeFromString\u003cItem\u003cStore\u003e\u003e(response.bodyAsText())\n\n```\n\n### Post\n\n```kotlin\n@Serializable\ndata class LoyaltyPointRequest(\n    val point: Int,\n    val type: String,\n    val countryCode: String,\n    val phoneNumber: String\n)\n\n@Serializable\ndata class RMResponse(\n    val code: String\n)\n```\n\n\n```kotlin\n\nval data = LoyaltyPointRequest(\n   point = 100,\n   type = \"PHONENUMBER\",\n   countryCode = \"60\",\n   phoneNumber = \"123456789\"\n)\n\ntry{\n\n   val jsonElement = Json.encodeToJsonElement(data)\n   val sdk = RevenueMonsterSDK(auth)\n   val response = sdk.custom(\"/v3/loyalty/reward\", HttpMethod.Post, jsonElement)\n   val result = Json.decodeFromString\u003cRMResponse\u003e(response.bodyAsText())\n\n}catch (e: RMException){\n   println(e.message)\n   println(e.errorCode)\n   println(e.errorMessage)\n}catch (e: Throwable){\n   e.printStackTrace()\n}\n\n\n\n```\n\n## Version 2.1.1 onward\n\nStarting from version 2.1.1 onward, users will have the ability to manually set the timeout or socket timeout. \u003c/br\u003e\nBy default, the request timeout will be set to 95 seconds (95000L), and the socket timeout will be set to 60 seconds (60000L).\n\n```kotlin\nsdk.setTimeout(\n   timeout = 120000L,\n   socketTimeout = 120000L\n)\n```\n\n## 📄 License\n\n[MIT](https://github.com/RevenueMonster/rm-kotlin-sdk/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevenuemonster%2Frm-kotlin-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevenuemonster%2Frm-kotlin-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevenuemonster%2Frm-kotlin-sdk/lists"}