Skip to content

Commit 93905fc

Browse files
shaileshmishrashaileshmishra
authored andcommitted
.env support added.
.idea removed
1 parent a987efb commit 93905fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You will need JDK installed on your machine. You can install it from [here](http
1616
To use the Contentstack Java SDK to your existing project, perform the steps given below:
1717

1818
1. **Maven**
19-
```
19+
```java
2020
<dependency>
2121
<groupId>com.contentstack.sdk</groupId>
2222
<artifactId>java</artifactId>
@@ -25,7 +25,7 @@ To use the Contentstack Java SDK to your existing project, perform the steps giv
2525
```
2626

2727
2. **Gradle**
28-
```
28+
```java
2929
implementation 'com.contentstack.sdk:java:1.5.6'
3030
```
3131

@@ -58,7 +58,7 @@ A publishing environment corresponds to one or more deployment servers or a cont
5858
#### Initializing your SDK
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:
61-
```
61+
```java
6262
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.
@@ -69,7 +69,7 @@ To get the API credentials mentioned above, log in to your Contentstack account
6969

7070
To retrieve a single entry from a content type use the code snippet given below:
7171

72-
```
72+
```java
7373
ContentType contentType = stack.contentType("content_type_uid");
7474
Entry blogEntry = contentType.entry("entry_uid");
7575
blogEntry.fetch(new EntryResultCallBack() {
@@ -86,7 +86,7 @@ public void onCompletion(ResponseType responseType, Error error) {
8686

8787
To retrieve multiple entries of a particular content type, use the code snippet given below:
8888

89-
```
89+
```java
9090
//stack is an instance of Stack class
9191
Query blogQuery = stack.contentType("content_type_uid").query();
9292
blogQuery.find(new QueryResultsCallBack() {
@@ -116,7 +116,7 @@ For example, if you want to crop an image (with width as 300 and height as 400),
116116

117117
You can use the Image Delivery API functions in this SDK as well. Here are a few examples of its usage in the SDK.
118118

119-
```
119+
```java
120120
//set the image quality to 100
121121
LinkedHashMap imageParams = new LinkedHashMap();
122122
imageParams.put("quality", 100);

0 commit comments

Comments
 (0)