Skip to content

Commit 173ba14

Browse files
API documentation
API documentation
1 parent 29027c5 commit 173ba14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2603
-2058
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To use Contentstack management sdk in our Maven project, we'll need to add the f
4242

4343
```java
4444
<dependency>
45-
<groupId>com.contentstack</groupId>
45+
<groupId>com.contentstack.sdk</groupId>
4646
<artifactId>cms</artifactId>
4747
<version>{version}</version>
4848
</dependency>

cms.iml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<orderEntry type="inheritedJdk" />
1313
<orderEntry type="sourceFolder" forTests="false" />
1414
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.9.0" level="project" />
15-
<orderEntry type="library" name="Maven: io.reactivex.rxjava3:rxjava:3.1.4" level="project" />
16-
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
15+
<orderEntry type="library" name="Maven: io.reactivex.rxjava3:rxjava:3.1.5" level="project" />
16+
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" />
1717
<orderEntry type="library" name="Maven: com.squareup.retrofit2:retrofit:2.9.0" level="project" />
1818
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.9" level="project" />
1919
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
2020
<orderEntry type="library" name="Maven: com.squareup.retrofit2:converter-gson:2.9.0" level="project" />
21-
<orderEntry type="library" name="Maven: com.squareup.okhttp3:logging-interceptor:4.9.3" level="project" />
22-
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10" level="project" />
23-
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10" level="project" />
21+
<orderEntry type="library" name="Maven: com.squareup.okhttp3:logging-interceptor:4.10.0" level="project" />
22+
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10" level="project" />
23+
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10" level="project" />
2424
<orderEntry type="library" scope="PROVIDED" name="Maven: org.jetbrains:annotations:23.0.0" level="project" />
2525
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" />
2626
<orderEntry type="library" scope="TEST" name="Maven: io.github.cdimascio:java-dotenv:5.2.2" level="project" />

pom.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<groupId>com.contentstack.sdk</groupId>
66
<artifactId>cms</artifactId>
77
<name>contentstack-management-java</name>
8-
<version>${sdk.version}</version>
9-
<description>Contentstack Java Management SDK for Content Management API,
10-
Contentstack is a headless CMS with an API-first approach
8+
<version>1.0.0-SNAPSHOT</version>
9+
<description>Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an
10+
API-first approach
1111
</description>
1212
<url>https://github.com/contentstack/contentstack-management-java/</url>
1313

@@ -79,10 +79,10 @@
7979
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
8080
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
8181
<dotenv-source.version>5.2.2</dotenv-source.version>
82-
<rxjava-source.version>3.1.4</rxjava-source.version>
82+
<rxjava-source.version>3.1.5</rxjava-source.version>
8383
<retrofit-source.version>2.9.0</retrofit-source.version>
8484
<converter-gson-version>2.9.0</converter-gson-version>
85-
<logging.version>4.9.3</logging.version>
85+
<logging.version>4.10.0</logging.version>
8686
<jococo-plugin.version>0.8.5</jococo-plugin.version>
8787
<lombok-source.version>1.18.24</lombok-source.version>
8888
<junit-jupiter.version>5.8.2</junit-jupiter.version>
@@ -215,6 +215,8 @@
215215
</execution>
216216
</executions>
217217
</plugin>
218+
219+
218220
<plugin>
219221
<groupId>org.apache.maven.plugins</groupId>
220222
<artifactId>maven-site-plugin</artifactId>

src/main/java/com/contentstack/cms/Contentstack.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class Contentstack {
6161
* Client client = new Client.Builder().build();
6262
* User userInstance = client.user();
6363
* </pre>
64-
* <p>
64+
* <br>
6565
*
6666
* @return User user
6767
*/
@@ -100,7 +100,7 @@ public User user() {
100100
* Contentstack client = new Contentstack.Builder().build();
101101
* Response login = client.login("emailId", "password");
102102
* </pre>
103-
* <p>
103+
* <br>
104104
*
105105
* @param emailId
106106
* the email id
@@ -147,7 +147,7 @@ public Response<LoginDetails> login(String emailId, String password) throws IOEx
147147
* Contentstack client = new Contentstack.Builder().build();
148148
* Response login = client.login("emailId", "password");
149149
* </pre>
150-
* <p>
150+
* <br>
151151
*
152152
* @param emailId
153153
* the email id
@@ -244,7 +244,7 @@ Response<ResponseBody> logoutWithAuthtoken(String authtoken) throws IOException
244244
public Organization organization() {
245245
if (this.authtoken == null)
246246
throw new IllegalStateException("Please Login to access user instance");
247-
return new Organization(this.instance);
247+
return new Organization(this.instance, this.authtoken);
248248
}
249249

250250
/**
@@ -396,9 +396,11 @@ public Builder() {
396396
/**
397397
* Sets proxy. (Setting proxy to the OkHttpClient) Proxy proxy = new Proxy(Proxy.Type.HTTP, new
398398
* InetSocketAddress(proxyHost, proxyPort));
399-
* <p>
400-
* Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("hostname", 433)); Contentstack contentstack =
401-
* new Contentstack.Builder().setProxy(proxy).build();
399+
* <br>
400+
* <pre>
401+
* Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("hostname", 433));
402+
* Contentstack contentstack = new Contentstack.Builder().setProxy(proxy).build();
403+
* </pre>
402404
*
403405
* @param proxy
404406
* the proxy

src/main/java/com/contentstack/cms/core/CSResponse.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ public class CSResponse {
1515
private static final String RESPONSE_NULL = "response == null";
1616
private final Response<ResponseBody> response;
1717

18-
//Request request;
19-
//ResponseBody response; // JSONResponse/ JSON/ String / model
20-
21-
2218
public CSResponse(Response<ResponseBody> response) {
2319
this.response = response;
2420
}

src/main/java/com/contentstack/cms/core/Util.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class Util {
4040
public static final String X_USER_AGENT = "X-User-Agent";
4141
public static final String USER_AGENT = "User-Agent";
4242
public static final String CONTENT_TYPE = "Content-Type";
43+
public static final String MULTIPART = "multipart/form-data";
4344
public static final String CONTENT_TYPE_VALUE = "application/json";
4445

4546

0 commit comments

Comments
 (0)