Skip to content

Commit

Permalink
Fix: Package names (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordond authored Mar 29, 2024
1 parent ef23025 commit e007982
Show file tree
Hide file tree
Showing 35 changed files with 326 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
public final class dev/jordond/compass/autocomplete/web/GoogleMapsAutocompleteKt {
public final class dev/jordond/compass/autocomplete/GoogleMapsAutocompleteKt {
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun GoogleMapsGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun GoogleMapsGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun GoogleMapsGeocoderAutocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
public final class dev/jordond/compass/autocomplete/web/GoogleMapsAutocompleteKt {
public final class dev/jordond/compass/autocomplete/GoogleMapsAutocompleteKt {
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun GoogleMapsGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun GoogleMapsGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun GoogleMapsGeocoderAutocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/GoogleMapsParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
@file:Suppress("FunctionName")

package dev.jordond.compass.autocomplete.web
package dev.jordond.compass.autocomplete

import dev.jordond.compass.Place
import dev.jordond.compass.autocomplete.Autocomplete
import dev.jordond.compass.autocomplete.AutocompleteOptions
import dev.jordond.compass.autocomplete.web.GoogleMapsGeocoderAutocompleteService
import dev.jordond.compass.geocoder.web.parameter.GoogleMapsParameters
import dev.jordond.compass.geocoder.web.parameter.GoogleMapsParametersBuilder
import dev.jordond.compass.geocoder.web.parameter.googleMapsParameters
Expand All @@ -14,6 +13,50 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.serialization.json.Json

/**
* Creates a new [Autocomplete] instance that uses the Google Maps Geocoding API.
*
* @param apiKey The Google Maps API key.
* @param options The autocomplete options.
* @param parameters The Google Maps geocoder parameters.
* @param json The JSON serializer.
* @param client The HTTP client to make the requests with.
* @param dispatcher The coroutine dispatcher.
* @return A new [Autocomplete] instance.
*/
public fun Autocomplete(
apiKey: String,
options: AutocompleteOptions = AutocompleteOptions(),
parameters: GoogleMapsParameters = GoogleMapsParameters(),
json: Json = HttpApiEndpoint.json(),
client: HttpClient = HttpApiEndpoint.httpClient(json),
dispatcher: CoroutineDispatcher = Dispatchers.Default,
): Autocomplete<Place> {
return GoogleMapsGeocoderAutocomplete(apiKey, options, parameters, json, client, dispatcher)
}

/**
* Creates a new [Autocomplete] instance that uses the Google Maps Geocoding API.
*
* @param apiKey The Google Maps API key.
* @param options The autocomplete options.
* @param json The JSON serializer.
* @param client The HTTP client to make the requests with.
* @param dispatcher The coroutine dispatcher.
* @param block The builder block to configure the Google Maps geocoder parameters.
* @return A new [Autocomplete] instance.
*/
public fun Autocomplete(
apiKey: String,
options: AutocompleteOptions = AutocompleteOptions(),
json: Json = HttpApiEndpoint.json(),
client: HttpClient = HttpApiEndpoint.httpClient(json),
dispatcher: CoroutineDispatcher = Dispatchers.Default,
block: GoogleMapsParametersBuilder.() -> Unit,
): Autocomplete<Place> {
return GoogleMapsGeocoderAutocomplete(apiKey, options, json, client, dispatcher, block)
}

/**
* Creates a new [Autocomplete] instance that uses the Google Maps Geocoding API.
*
Expand Down Expand Up @@ -82,8 +125,9 @@ public fun Autocomplete.Companion.googleMapsGeocoder(
json: Json = HttpApiEndpoint.json(),
client: HttpClient = HttpApiEndpoint.httpClient(json),
dispatcher: CoroutineDispatcher = Dispatchers.Default,
): Autocomplete<Place> =
GoogleMapsGeocoderAutocomplete(apiKey, options, parameters, json, client, dispatcher)
): Autocomplete<Place> {
return GoogleMapsGeocoderAutocomplete(apiKey, options, parameters, json, client, dispatcher)
}

/**
* Creates a new [Autocomplete] instance that uses the Google Maps Geocoding API.
Expand All @@ -103,5 +147,6 @@ public fun Autocomplete.Companion.googleMapsGeocoder(
client: HttpClient = HttpApiEndpoint.httpClient(json),
dispatcher: CoroutineDispatcher = Dispatchers.Default,
block: GoogleMapsParametersBuilder.() -> Unit,
): Autocomplete<Place> =
GoogleMapsGeocoderAutocomplete(apiKey, options, json, client, dispatcher, block)
): Autocomplete<Place> {
return GoogleMapsGeocoderAutocomplete(apiKey, options, json, client, dispatcher, block)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
public final class dev/jordond/compass/autocomplete/web/MapboxAutocompleteKt {
public final class dev/jordond/compass/autocomplete/MapboxAutocompleteKt {
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun MapboxGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun MapboxGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun MapboxGeocoderAutocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
public final class dev/jordond/compass/autocomplete/web/MapboxAutocompleteKt {
public final class dev/jordond/compass/autocomplete/MapboxAutocompleteKt {
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun Autocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun MapboxGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun MapboxGeocoderAutocomplete (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;Lkotlin/jvm/functions/Function1;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun MapboxGeocoderAutocomplete$default (Ljava/lang/String;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Ldev/jordond/compass/geocoder/web/parameter/MapboxParameters;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
@file:Suppress("FunctionName")

package dev.jordond.compass.autocomplete.web
package dev.jordond.compass.autocomplete

import dev.jordond.compass.Place
import dev.jordond.compass.autocomplete.Autocomplete
import dev.jordond.compass.autocomplete.AutocompleteOptions
import dev.jordond.compass.autocomplete.web.MapboxGeocoderAutocompleteService
import dev.jordond.compass.geocoder.web.parameter.MapboxParameters
import dev.jordond.compass.geocoder.web.parameter.MapboxParametersBuilder
import dev.jordond.compass.geocoder.web.parameter.mapboxParameters
Expand All @@ -14,6 +13,50 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.serialization.json.Json

/**
* Creates a new [Autocomplete] instance that uses the Mapbox Geocoding API.
*
* @param apiKey The Mapbox API key.
* @param options The autocomplete options.
* @param parameters The Mapbox geocoder parameters.
* @param json The JSON serializer.
* @param client The HTTP client to make the requests with.
* @param dispatcher The coroutine dispatcher.
* @return A new [Autocomplete] instance.
*/
public fun Autocomplete(
apiKey: String,
options: AutocompleteOptions = AutocompleteOptions(),
parameters: MapboxParameters = MapboxParameters(),
json: Json = HttpApiEndpoint.json(),
client: HttpClient = HttpApiEndpoint.httpClient(json),
dispatcher: CoroutineDispatcher = Dispatchers.Default,
): Autocomplete<Place> {
return MapboxGeocoderAutocomplete(apiKey, options, parameters, json, client, dispatcher)
}

/**
* Creates a new [Autocomplete] instance that uses the Mapbox Geocoding API.
*
* @param apiKey The Mapbox API key.
* @param options The autocomplete options.
* @param json The JSON serializer.
* @param client The HTTP client to make the requests with.
* @param dispatcher The coroutine dispatcher.
* @param block The builder block to configure the Mapbox geocoder parameters.
* @return A new [Autocomplete] instance.
*/
public fun Autocomplete(
apiKey: String,
options: AutocompleteOptions = AutocompleteOptions(),
json: Json = HttpApiEndpoint.json(),
client: HttpClient = HttpApiEndpoint.httpClient(json),
dispatcher: CoroutineDispatcher = Dispatchers.Default,
block: MapboxParametersBuilder.() -> Unit,
): Autocomplete<Place> {
return MapboxGeocoderAutocomplete(apiKey, options, json, client, dispatcher, block)
}

/**
* Creates a new [Autocomplete] instance that uses the Mapbox Geocoding API.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public final class dev/jordond/compass/autocomplete/mobile/AutocompleteKt {
public final class dev/jordond/compass/autocomplete/MobileAutocompleteKt {
public static final fun Autocomplete (Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun MobileAutocomplete (Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package dev.jordond.compass.autocomplete.mobile
package dev.jordond.compass.autocomplete

import dev.jordond.compass.Place
import dev.jordond.compass.autocomplete.Autocomplete
import dev.jordond.compass.autocomplete.AutocompleteOptions
import dev.jordond.compass.autocomplete.AutocompleteService
import dev.jordond.compass.autocomplete.mobile.mobile
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public final class dev/jordond/compass/autocomplete/web/HttpAutocompleteKt {
public final class dev/jordond/compass/autocomplete/HttpAutocompleteKt {
public static final fun Autocomplete (Ldev/jordond/compass/autocomplete/web/HttpAutocompleteService;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun Autocomplete (Ldev/jordond/compass/tools/web/HttpApiEndpoint;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ldev/jordond/compass/autocomplete/web/HttpAutocompleteService;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
public final class dev/jordond/compass/autocomplete/web/HttpAutocompleteKt {
public final class dev/jordond/compass/autocomplete/HttpAutocompleteKt {
public static final fun Autocomplete (Ldev/jordond/compass/autocomplete/web/HttpAutocompleteService;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static final fun Autocomplete (Ldev/jordond/compass/tools/web/HttpApiEndpoint;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/serialization/json/Json;Lio/ktor/client/HttpClient;Lkotlinx/coroutines/CoroutineDispatcher;)Ldev/jordond/compass/autocomplete/Autocomplete;
public static synthetic fun Autocomplete$default (Ldev/jordond/compass/autocomplete/web/HttpAutocompleteService;Ldev/jordond/compass/autocomplete/AutocompleteOptions;Lkotlinx/coroutines/CoroutineDispatcher;ILjava/lang/Object;)Ldev/jordond/compass/autocomplete/Autocomplete;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.jordond.compass.autocomplete.web
package dev.jordond.compass.autocomplete

import dev.jordond.compass.autocomplete.Autocomplete
import dev.jordond.compass.autocomplete.AutocompleteOptions
import dev.jordond.compass.autocomplete.web.HttpAutocompleteService
import dev.jordond.compass.autocomplete.web.SearchEndpoint
import dev.jordond.compass.tools.web.HttpApiEndpoint
import io.ktor.client.HttpClient
import kotlinx.coroutines.CoroutineDispatcher
Expand Down
Loading

0 comments on commit e007982

Please sign in to comment.