hojongs / naver-maps-kt

Naver Maps API SDK for Kotlin/JVM, Java, Android written by Kotlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Naver Maps Kt

Naver Maps API SDK for Kotlin/JVM, Java, Android written by Kotlin

Getting Started

val config = NaverClientConfig(
    System.getenv("NAVER_MAPS_CLIENT_ID"),
    System.getenv("NAVER_MAPS_CLIENT_SECRET"),
)
val client = NaverHttpClientKtor(config)
val naverMapsService = NaverMapsService(client)

val geocode = client.geocode(GeocodeRequest("분당구 불정로 6"))
val reverseGcResponse = client.reverseGeocode(
    ReverseGCRequest(
        "129.1133567",
        "35.2982640",
        output = ReverseGCRequest.Output.JSON,
    )
)

How to install package

val githubToken: String = System.getenv("GITHUB_TOKEN")

repositories {
    maven {
        name = "GitHubPackages"
        setUrl("https://maven.pkg.github.com/hojongs/naver-maps-kt")
        credentials {
            username = "hojongs" // your GitHub username
            password = githubToken // your Personal Access Token with enough permissions
        }
    }
}

dependencies {
    implementation("com.hojongs:naver-maps-kt-core:0.2")
    implementation("com.hojongs:naver-maps-kt-http-client-ktor:0.2")
}

For more information about installing package from Github Package Registry, please refer https://docs.github.com/en/packages/learn-github-packages/installing-a-package

Caution

If 403 Forbidden error occurs, please check the API is enabled in your console.

TODO

  • Features
    • Implement more REST APIs
      • Static Map
      • Directions
    • Add exception classes
  • Build environment
    • Add GitHub Action for CI/CD
    • Test Coverage with Jacoco
    • Refactoring Gradle build script

Dependencies

Reference

This repository follows:

About

Naver Maps API SDK for Kotlin/JVM, Java, Android written by Kotlin

License:MIT License


Languages

Language:Kotlin 100.0%