File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed
src/main/java/com/contentstack/sdk Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -139,13 +139,15 @@ android {
139
139
}
140
140
configurations { archives }
141
141
dependencies {
142
+ androidTestImplementation ' org.junit.jupiter:junit-jupiter:5.8.1'
142
143
def multidex = " 2.0.1"
143
144
def volley = " 1.2.1"
144
145
def junit = " 4.13.2"
145
146
configurations. configureEach { resolutionStrategy. force ' com.android.support:support-annotations:23.1.0' }
146
147
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
147
148
implementation " com.android.volley:volley:$volley "
148
149
implementation " junit:junit:$junit "
150
+
149
151
// For AGP 7.4+
150
152
coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.0.4'
151
153
testImplementation ' junit:junit:4.13.2'
Original file line number Diff line number Diff line change
1
+ package com .contentstack .sdk ;
2
+
3
+ import okhttp3 .ResponseBody ;
4
+ import retrofit2 .Call ;
5
+ import retrofit2 .http .GET ;
6
+ import retrofit2 .http .HeaderMap ;
7
+ import retrofit2 .http .Query ;
8
+ import retrofit2 .http .Url ;
9
+
10
+ import java .util .LinkedHashMap ;
11
+ import java .util .Map ;
12
+
13
+
14
+ public interface APIService {
15
+ @ GET
16
+ Call <ResponseBody > getRequest (
17
+ @ Url String url , @ HeaderMap LinkedHashMap <String , Object > headers );
18
+
19
+ @ GET ("v3/taxonomies/entries" )
20
+ Call <ResponseBody > getTaxonomy (
21
+ @ HeaderMap Map <String , Object > headers ,
22
+ @ Query ("query" ) String query );
23
+ }
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ public class Stack implements INotifyClass {
52
52
protected String limit = null ;
53
53
protected String localeCode ;
54
54
private SyncResultCallBack syncCallBack ;
55
+ protected APIService service ;
55
56
56
57
57
58
protected Stack () {
Original file line number Diff line number Diff line change
1
+ package com .contentstack .sdk ;
2
+
3
+
4
+ import org .json .JSONObject ;
5
+
6
+ public interface TaxonomyCallback {
7
+ /**
8
+ * This method is called wen API response gets received
9
+ * @param response the response of type JSON
10
+ * @param error the error of type @{@link Error}
11
+ */
12
+ void onResponse (JSONObject response , Error error );
13
+
14
+ }
You can’t perform that action at this time.
0 commit comments