- Fetch data from the Artic API
- Fully documented.
- Complete Artic HTTP API integration. All fields, endpoints and parameters are supported.
- Follows Artic Api's structure.
- Powered by KTor.
- Kotlin Multiplatform support.
- Current platforms:
- JVM (works on Android)
- JS
- Linux
- Windows Native
- Current platforms:
- Unit tested.
Artic API Client is available on Maven Central. To add it to your project, include the dependency below.
implementation("com:peteraraujo.articapi:articapi-client:1.0.1")
// If using toml libs:
implementation(libs.articapi.client)
implementation 'com:peteraraujo.articapi:articapi-client:1.0.1'
// If using toml libs:
implementation(libs.articapi.client)
[versions]
articapiclient = "1.0.1"
[libraries]
articapi-client = { module = "com:peteraraujo.articapi:articapi-client", version.ref = "articapiclient" }
Check complete versioning and dependencies information on the project's GitHub Wiki.
The following chart shows the versions of Artic Api Client dependencies.
Artic API Client | Kotlin | KTor |
---|---|---|
1.0.1 | 2.0.0 | 2.3.11 |
There is a service per resource. For example, Artwork service:
val artworkService = ArtworkService()
Each field has its own endpoints.
Services are "resource specific", so each has certain functions depending on the endpoints available to it.
Note: service functions are suspend
.
For example, when using ArtworkService
, you'll have access to artwork-specific endpoints:
val artworkService = ArtworkService()
val getByIdResult = artworkService.getById(id = 3)
val getArtworks = artworkService.getItems(limit = 2)
val searchArtworks = artworkService.search(search = "Paris")
val getArtworkManifest = artworkService.getArtworkManifest(id = 3)
Check complete documentation on the project's GitHub Wiki.
If you encounter any issues or have found an error in this project, please file an issue. I appreciate your feedback and will do my best to address the problem promptly. Also, contributions are welcome to this project. If you're interested in contributing, please check out the Code of Conduct for more details on how to get started and the expected standards from all contributors.
- Add support on other platforms, like Apple's platforms.
- The Artic (api.artic.edu) team for providing an amazing server API.
If you have any questions or suggestions, feel free to contact me.