Skip to content

Commit

Permalink
feat: update example projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Oct 5, 2022
1 parent d49051f commit a9acff7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 154 deletions.
93 changes: 16 additions & 77 deletions ktorfit-lib/api/android/ktorfit-lib.api
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ public abstract interface class de/jensklingenberg/ktorfit/Callback {
}

public final class de/jensklingenberg/ktorfit/Ktorfit {
public fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;)V
public synthetic fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;Ljava/util/Set;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;Ljava/util/Set;Ljava/util/Set;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getBaseUrl ()Ljava/lang/String;
public final fun getHttpClient ()Lio/ktor/client/HttpClient;
public final fun getRequestConverters ()Ljava/util/Set;
public final fun getSuspendResponseConverters ()Ljava/util/Set;
}

public final class de/jensklingenberg/ktorfit/Ktorfit$Builder {
Expand All @@ -34,7 +33,7 @@ public final class de/jensklingenberg/ktorfit/Ktorfit$Builder {
public final fun httpClient (Lio/ktor/client/engine/HttpClientEngineFactory;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun httpClient (Lio/ktor/client/engine/HttpClientEngineFactory;Lkotlin/jvm/functions/Function1;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun httpClient (Lkotlin/jvm/functions/Function1;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun requestConverter ([Lde/jensklingenberg/ktorfit/converter/RequestConverter;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun responseConverter ([Lde/jensklingenberg/ktorfit/converter/request/CoreResponseConverter;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
}

public final class de/jensklingenberg/ktorfit/KtorfitKt {
Expand All @@ -46,85 +45,29 @@ public final class de/jensklingenberg/ktorfit/TypeInfoExtKt {
public static final fun upperBoundType (Lio/ktor/util/reflect/TypeInfo;)Lio/ktor/util/reflect/TypeInfo;
}

public abstract interface class de/jensklingenberg/ktorfit/converter/CoreResponseConverter {
public abstract fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;)Z
public abstract interface class de/jensklingenberg/ktorfit/converter/SuspendResponseConverter : de/jensklingenberg/ktorfit/converter/request/CoreResponseConverter {
public abstract fun wrapSuspendResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public abstract class de/jensklingenberg/ktorfit/converter/KtorfitPlugin : io/ktor/client/plugins/HttpClientPlugin {
public final class de/jensklingenberg/ktorfit/converter/builtin/CallResponseConverter : de/jensklingenberg/ktorfit/converter/SuspendResponseConverter, de/jensklingenberg/ktorfit/converter/request/ResponseConverter {
public fun <init> ()V
public abstract fun convert (Lio/ktor/util/reflect/TypeInfo;Ljava/lang/Object;Lio/ktor/client/statement/HttpResponse;)Lkotlin/Pair;
public abstract fun getClass ()Lkotlin/reflect/KClass;
public fun getKey ()Lio/ktor/util/AttributeKey;
public abstract fun getKey ()Ljava/lang/String;
public fun install (Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;Lio/ktor/client/HttpClient;)V
public synthetic fun install (Ljava/lang/Object;Lio/ktor/client/HttpClient;)V
public fun prepare (Lkotlin/jvm/functions/Function1;)Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;
public synthetic fun prepare (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public fun returnWhenException (Ljava/lang/Exception;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler {
public fun <init> (Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;)V
public synthetic fun <init> (Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lkotlin/jvm/functions/Function1;
public final fun component2 ()Lkotlin/reflect/KClass;
public final fun copy (Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;)Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;
public static synthetic fun copy$default (Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;ILjava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;
public fun equals (Ljava/lang/Object;)Z
public final fun getClazz ()Lkotlin/reflect/KClass;
public final fun getOnError ()Lkotlin/jvm/functions/Function1;
public fun hashCode ()I
public final fun setOnError (Lkotlin/jvm/functions/Function1;)V
public fun toString ()Ljava/lang/String;
}

public abstract interface class de/jensklingenberg/ktorfit/converter/RequestConverter : de/jensklingenberg/ktorfit/converter/CoreResponseConverter {
public abstract fun convertRequest (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/CallPlugin : de/jensklingenberg/ktorfit/converter/KtorfitPlugin {
public fun <init> ()V
public fun convert (Lio/ktor/util/reflect/TypeInfo;Ljava/lang/Object;Lio/ktor/client/statement/HttpResponse;)Lkotlin/Pair;
public fun getClass ()Lkotlin/reflect/KClass;
public fun getKey ()Ljava/lang/String;
public fun returnWhenException (Ljava/lang/Exception;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/FlowRequestConverter : de/jensklingenberg/ktorfit/converter/RequestConverter {
public fun <init> ()V
public fun convertRequest (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;)Z
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z
public fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
public fun wrapSuspendResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/KtorfitCallRequestConverter : de/jensklingenberg/ktorfit/converter/RequestConverter {
public final class de/jensklingenberg/ktorfit/converter/builtin/FlowResponseConverter : de/jensklingenberg/ktorfit/converter/request/ResponseConverter {
public fun <init> ()V
public fun convertRequest (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;)Z
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z
public fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
}

public abstract class de/jensklingenberg/ktorfit/converter/builtin/Response {
public static final field Companion Lde/jensklingenberg/ktorfit/converter/builtin/Response$Companion;
public abstract interface class de/jensklingenberg/ktorfit/converter/request/CoreResponseConverter {
public abstract fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z
}

public final class de/jensklingenberg/ktorfit/converter/builtin/Response$Companion {
public final fun error (Ljava/lang/Throwable;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Error;
public final fun success (Ljava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/Response$Error : de/jensklingenberg/ktorfit/converter/builtin/Response {
public fun <init> (Ljava/lang/Throwable;)V
public final fun getEx ()Ljava/lang/Throwable;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/Response$Success : de/jensklingenberg/ktorfit/converter/builtin/Response {
public fun <init> (Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public final fun copy (Ljava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;
public static synthetic fun copy$default (Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;Ljava/lang/Object;ILjava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;
public fun equals (Ljava/lang/Object;)Z
public final fun getData ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public abstract interface class de/jensklingenberg/ktorfit/converter/request/ResponseConverter : de/jensklingenberg/ktorfit/converter/request/CoreResponseConverter {
public abstract fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/internal/FieldData {
Expand Down Expand Up @@ -166,10 +109,6 @@ public final class de/jensklingenberg/ktorfit/internal/KtorfitClient {
public final fun requestBuilder (Lio/ktor/client/request/HttpRequestBuilder;Lde/jensklingenberg/ktorfit/internal/RequestData;)V
}

public final class de/jensklingenberg/ktorfit/internal/KtorfitClientKt {
public static final fun getKtorfitErrorHandlers (Lio/ktor/client/HttpClient;)Ljava/util/List;
}

public final class de/jensklingenberg/ktorfit/internal/PathData {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Z)V
public final fun component1 ()Ljava/lang/String;
Expand Down
93 changes: 16 additions & 77 deletions ktorfit-lib/api/jvm/ktorfit-lib.api
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ public abstract interface class de/jensklingenberg/ktorfit/Callback {
}

public final class de/jensklingenberg/ktorfit/Ktorfit {
public fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;)V
public synthetic fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;Ljava/util/Set;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;Lio/ktor/client/HttpClient;Ljava/util/Set;Ljava/util/Set;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun getBaseUrl ()Ljava/lang/String;
public final fun getHttpClient ()Lio/ktor/client/HttpClient;
public final fun getRequestConverters ()Ljava/util/Set;
public final fun getSuspendResponseConverters ()Ljava/util/Set;
}

public final class de/jensklingenberg/ktorfit/Ktorfit$Builder {
Expand All @@ -27,7 +26,7 @@ public final class de/jensklingenberg/ktorfit/Ktorfit$Builder {
public final fun httpClient (Lio/ktor/client/engine/HttpClientEngineFactory;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun httpClient (Lio/ktor/client/engine/HttpClientEngineFactory;Lkotlin/jvm/functions/Function1;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun httpClient (Lkotlin/jvm/functions/Function1;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun requestConverter ([Lde/jensklingenberg/ktorfit/converter/RequestConverter;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
public final fun responseConverter ([Lde/jensklingenberg/ktorfit/converter/request/CoreResponseConverter;)Lde/jensklingenberg/ktorfit/Ktorfit$Builder;
}

public final class de/jensklingenberg/ktorfit/KtorfitKt {
Expand All @@ -39,85 +38,29 @@ public final class de/jensklingenberg/ktorfit/TypeInfoExtKt {
public static final fun upperBoundType (Lio/ktor/util/reflect/TypeInfo;)Lio/ktor/util/reflect/TypeInfo;
}

public abstract interface class de/jensklingenberg/ktorfit/converter/CoreResponseConverter {
public abstract fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;)Z
public abstract interface class de/jensklingenberg/ktorfit/converter/SuspendResponseConverter : de/jensklingenberg/ktorfit/converter/request/CoreResponseConverter {
public abstract fun wrapSuspendResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public abstract class de/jensklingenberg/ktorfit/converter/KtorfitPlugin : io/ktor/client/plugins/HttpClientPlugin {
public final class de/jensklingenberg/ktorfit/converter/builtin/CallResponseConverter : de/jensklingenberg/ktorfit/converter/SuspendResponseConverter, de/jensklingenberg/ktorfit/converter/request/ResponseConverter {
public fun <init> ()V
public abstract fun convert (Lio/ktor/util/reflect/TypeInfo;Ljava/lang/Object;Lio/ktor/client/statement/HttpResponse;)Lkotlin/Pair;
public abstract fun getClass ()Lkotlin/reflect/KClass;
public fun getKey ()Lio/ktor/util/AttributeKey;
public abstract fun getKey ()Ljava/lang/String;
public fun install (Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;Lio/ktor/client/HttpClient;)V
public synthetic fun install (Ljava/lang/Object;Lio/ktor/client/HttpClient;)V
public fun prepare (Lkotlin/jvm/functions/Function1;)Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;
public synthetic fun prepare (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
public fun returnWhenException (Ljava/lang/Exception;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler {
public fun <init> (Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;)V
public synthetic fun <init> (Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lkotlin/jvm/functions/Function1;
public final fun component2 ()Lkotlin/reflect/KClass;
public final fun copy (Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;)Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;
public static synthetic fun copy$default (Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;Lkotlin/jvm/functions/Function1;Lkotlin/reflect/KClass;ILjava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/KtorfitPluginErrorHandler;
public fun equals (Ljava/lang/Object;)Z
public final fun getClazz ()Lkotlin/reflect/KClass;
public final fun getOnError ()Lkotlin/jvm/functions/Function1;
public fun hashCode ()I
public final fun setOnError (Lkotlin/jvm/functions/Function1;)V
public fun toString ()Ljava/lang/String;
}

public abstract interface class de/jensklingenberg/ktorfit/converter/RequestConverter : de/jensklingenberg/ktorfit/converter/CoreResponseConverter {
public abstract fun convertRequest (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/CallPlugin : de/jensklingenberg/ktorfit/converter/KtorfitPlugin {
public fun <init> ()V
public fun convert (Lio/ktor/util/reflect/TypeInfo;Ljava/lang/Object;Lio/ktor/client/statement/HttpResponse;)Lkotlin/Pair;
public fun getClass ()Lkotlin/reflect/KClass;
public fun getKey ()Ljava/lang/String;
public fun returnWhenException (Ljava/lang/Exception;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/FlowRequestConverter : de/jensklingenberg/ktorfit/converter/RequestConverter {
public fun <init> ()V
public fun convertRequest (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;)Z
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z
public fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
public fun wrapSuspendResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/KtorfitCallRequestConverter : de/jensklingenberg/ktorfit/converter/RequestConverter {
public final class de/jensklingenberg/ktorfit/converter/builtin/FlowResponseConverter : de/jensklingenberg/ktorfit/converter/request/ResponseConverter {
public fun <init> ()V
public fun convertRequest (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;)Z
public fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z
public fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
}

public abstract class de/jensklingenberg/ktorfit/converter/builtin/Response {
public static final field Companion Lde/jensklingenberg/ktorfit/converter/builtin/Response$Companion;
public abstract interface class de/jensklingenberg/ktorfit/converter/request/CoreResponseConverter {
public abstract fun supportedType (Lde/jensklingenberg/ktorfit/internal/TypeData;Z)Z
}

public final class de/jensklingenberg/ktorfit/converter/builtin/Response$Companion {
public final fun error (Ljava/lang/Throwable;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Error;
public final fun success (Ljava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/Response$Error : de/jensklingenberg/ktorfit/converter/builtin/Response {
public fun <init> (Ljava/lang/Throwable;)V
public final fun getEx ()Ljava/lang/Throwable;
}

public final class de/jensklingenberg/ktorfit/converter/builtin/Response$Success : de/jensklingenberg/ktorfit/converter/builtin/Response {
public fun <init> (Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public final fun copy (Ljava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;
public static synthetic fun copy$default (Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;Ljava/lang/Object;ILjava/lang/Object;)Lde/jensklingenberg/ktorfit/converter/builtin/Response$Success;
public fun equals (Ljava/lang/Object;)Z
public final fun getData ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public abstract interface class de/jensklingenberg/ktorfit/converter/request/ResponseConverter : de/jensklingenberg/ktorfit/converter/request/CoreResponseConverter {
public abstract fun wrapResponse (Lde/jensklingenberg/ktorfit/internal/TypeData;Lkotlin/jvm/functions/Function1;Lde/jensklingenberg/ktorfit/Ktorfit;)Ljava/lang/Object;
}

public final class de/jensklingenberg/ktorfit/internal/FieldData {
Expand Down Expand Up @@ -159,10 +102,6 @@ public final class de/jensklingenberg/ktorfit/internal/KtorfitClient {
public final fun requestBuilder (Lio/ktor/client/request/HttpRequestBuilder;Lde/jensklingenberg/ktorfit/internal/RequestData;)V
}

public final class de/jensklingenberg/ktorfit/internal/KtorfitClientKt {
public static final fun getKtorfitErrorHandlers (Lio/ktor/client/HttpClient;)Ljava/util/List;
}

public final class de/jensklingenberg/ktorfit/internal/PathData {
public fun <init> (Ljava/lang/String;Ljava/lang/String;Z)V
public final fun component1 ()Ljava/lang/String;
Expand Down

0 comments on commit a9acff7

Please sign in to comment.