Skip to content

Commit e478bf8

Browse files
Merge branch 'master' into development
2 parents 88654d3 + 1ba2954 commit e478bf8

File tree

5 files changed

+1208
-7
lines changed

5 files changed

+1208
-7
lines changed

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Authors
22
- [Contentstack](https://www.contentstack.com/)
3+
- [Shailesh-Mishra](shailesh.mishra@contentstack.com)

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
## CHANGELOG
33

4-
54
## Version 1.4.0
65
###### Date: 26-July-2019
76
- [Entry] - Added support for includeReferenceContentTypeUid support in Entry.
@@ -76,6 +75,7 @@ Asset- added method 'addParam'
7675
## Version 1.1.0
7776
###### Date: 10-Nov-2017
7877
- New Features:
78+
7979
```
8080
Stack- added method 'ImageTransform'
8181
Query- added method 'includeContentType'
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
1.4.0
1+
2+
1.4.0
3+

src/test/java/com/contentstack/test/NewsMain.java

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,49 @@
22
import com.contentstack.sdk.*;
33
import com.contentstack.sdk.Error;
44

5+
import java.util.List;
6+
57

68
public class NewsMain {
79

810
private static String TAG = NewsMain.class.getSimpleName();
911
public static void main(String[] args) throws Exception {
1012

11-
Stack stack = Contentstack.stack("blt920bb7e90248f607", "blt0c4300391e033d4a59eb2857", "production");
12-
ContentType contentType = stack.contentType("news");
13-
contentType.fetch(new ContentTypesCallback() {
13+
Stack stack = Contentstack.stack("bltdd99f24e8a94d536", "blt22ef89e3652f3a44", "dev");
14+
Query query_banner = stack.contentType("banner_codes").query();
15+
query_banner.addParam("code", "snipsnapfy14");
16+
query_banner.language(Language.ENGLISH_UNITED_STATES);
17+
query_banner.find(new QueryResultsCallBack() {
1418
@Override
15-
public void onCompletion(ContentTypesModel contentTypesModel, Error error) {
16-
Stack.log(TAG, contentTypesModel.getResponse().toString());
19+
public void onCompletion(ResponseType responseType, QueryResult queryresult, Error error) {
20+
if (error==null){
21+
List<Entry> entryList = queryresult.getResultObjects();
22+
entryList.forEach(entry -> {
23+
Stack.log("query_banner", entry.toJSON().toString());
24+
});
25+
}
1726
}
1827
});
1928

29+
30+
31+
Query query_header = stack.contentType("header").query();
32+
query_header.addParam("code", "snipsnapfy14");
33+
query_header.language(Language.ENGLISH_UNITED_STATES);
34+
query_header.find(new QueryResultsCallBack() {
35+
@Override
36+
public void onCompletion(ResponseType responseType, QueryResult queryresult, Error error) {
37+
if (error==null){
38+
List<Entry> entryList = queryresult.getResultObjects();
39+
entryList.forEach(entry -> {
40+
Stack.log("query_banner", entry.toJSON().toString());
41+
});
42+
}
43+
}
44+
});
45+
46+
47+
2048
}
2149

2250
}

src/test/java/resources/test report v1.3.3.txt

Lines changed: 1170 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)