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 {
139139}
140140configurations { archives }
141141dependencies {
142+ androidTestImplementation ' org.junit.jupiter:junit-jupiter:5.8.1'
142143 def multidex = " 2.0.1"
143144 def volley = " 1.2.1"
144145 def junit = " 4.13.2"
145146 configurations. configureEach { resolutionStrategy. force ' com.android.support:support-annotations:23.1.0' }
146147 implementation fileTree(include : [' *.jar' ], dir : ' libs' )
147148 implementation " com.android.volley:volley:$volley "
148149 implementation " junit:junit:$junit "
150+
149151 // For AGP 7.4+
150152 coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.0.4'
151153 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 {
5252 protected String limit = null ;
5353 protected String localeCode ;
5454 private SyncResultCallBack syncCallBack ;
55+ protected APIService service ;
5556
5657
5758 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