Skip to content

Commit 0448383

Browse files
Merge pull request #29 from contentstack/querying_with_null
Querying with null
2 parents 93905fc + 93bd3fa commit 0448383

File tree

3 files changed

+26
-19
lines changed

3 files changed

+26
-19
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
# CHANGELOG
12

2-
## CHANGELOG
3+
## Version 1.5.7
4+
###### Date: 20-Feb-2021
5+
Document updated
6+
7+
#23 Fixed Issue: Querying content with `null` field
8+
• Query: query content by specifying fields as null
39

410
## Version 1.5.6
511
###### Date: 27-Jan-2021

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ To use the Contentstack Java SDK to your existing project, perform the steps giv
2020
<dependency>
2121
<groupId>com.contentstack.sdk</groupId>
2222
<artifactId>java</artifactId>
23-
<version>1.5.6</version>
23+
<version>1.5.7</version>
2424
</dependency>
2525
```
2626

2727
2. **Gradle**
2828
```java
29-
implementation 'com.contentstack.sdk:java:1.5.6'
29+
implementation 'com.contentstack.sdk:java:1.5.7'
3030
```
3131

3232
### Key Concepts for using Contentstack
@@ -59,7 +59,7 @@ A publishing environment corresponds to one or more deployment servers or a cont
5959

6060
To initialize the SDK, specify application API key, access token, and environment name of the stack as shown in the snippet given below:
6161
```java
62-
Stack stack = Contentstack.stack( "apiKey", "accessToken", "environment_name");
62+
Stack stack = Contentstack.stack( "APIKey", "accessToken", "environment_name");
6363
```
6464
To get the API credentials mentioned above, log in to your Contentstack account and then in your top panel navigation, go to Settings &gt; Stack to view the API Key and Access Token.
6565

@@ -73,13 +73,13 @@ To retrieve a single entry from a content type use the code snippet given below:
7373
ContentType contentType = stack.contentType("content_type_uid");
7474
Entry blogEntry = contentType.entry("entry_uid");
7575
blogEntry.fetch(new EntryResultCallBack() {
76-
@Override
77-
public void onCompletion(ResponseType responseType, Error error) {
78-
if (error == null) {
79-
[Success block]
80-
} else {
81-
[Error block]
82-
}}
76+
@Override
77+
public void onCompletion(ResponseType responseType, Error error) {
78+
if (error == null) {
79+
//Success block
80+
} else {
81+
//Error block
82+
}}
8383
});
8484
```
8585
##### Get Multiple Entries
@@ -90,13 +90,14 @@ To retrieve multiple entries of a particular content type, use the code snippet
9090
//stack is an instance of Stack class
9191
Query blogQuery = stack.contentType("content_type_uid").query();
9292
blogQuery.find(new QueryResultsCallBack() {
93-
@Override
94-
publicvoidonCompletion(ResponseType responseType, QueryResult queryResult, Error error) {
95-
if(error == null){
96-
[Success block]
97-
}else{
98-
[Error block]
99-
}}});
93+
@Override
94+
public void onCompletion(ResponseType responseType, QueryResult queryResult, Error error) {
95+
if(error == null){
96+
//Success block
97+
}else{
98+
//Error block
99+
}}
100+
});
100101
```
101102

102103

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<modelVersion>4.0.0</modelVersion>
77
<groupId>com.contentstack.sdk</groupId>
88
<artifactId>java</artifactId>
9-
<version>1.5.6</version>
9+
<version>1.5.7</version>
1010
<packaging>jar</packaging>
1111
<name>contentstack-java</name>
1212
<description>Java SDK for Contentstack Content Delivery API, Contentstack is a headless CMS with an API-first approach

0 commit comments

Comments
 (0)