Skip to content

Commit 1b645ce

Browse files
code coverage
1 parent 274a01d commit 1b645ce

Some content is hidden

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

44 files changed

+2260
-1864
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public interface Parametron {
4141
* input and returns a
4242
* generic type T.
4343
*
44-
* @param <T> the type of the parameter
44+
* @param <T> the type of the parameter
4545
* @param params The "params" parameter is a HashMap that maps String keys to
4646
* Object values. It is
4747
* annotated with @NotNull, indicating that it cannot be null.
@@ -52,7 +52,7 @@ public interface Parametron {
5252
/**
5353
* The function adds headers to a HashMap.
5454
*
55-
* @param <T> the type of the parameter
55+
* @param <T> the type of the parameter
5656
* @param headers A HashMap containing key-value pairs of headers, where the key
5757
* is a String
5858
* representing the header name and the value is a String

src/main/java/com/contentstack/cms/marketplace/apps/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public App addHeader(@NotNull String key, @NotNull String value) {
117117
*/
118118
@SuppressWarnings("unchecked")
119119
@Override
120-
public App addParams(@NotNull HashMap params) {
120+
public App addParams(@NotNull HashMap params) {
121121
this.params.putAll(params);
122122
return this;
123123
}

src/main/java/com/contentstack/cms/marketplace/apps/AppService.java

Lines changed: 63 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -9,75 +9,68 @@
99

1010
public interface AppService {
1111

12-
13-
@POST("manifests/{uid}/install")
14-
Call<ResponseBody> createInstallation(
15-
@HeaderMap Map<String, String> headers,
16-
@Path("uid") String uid,
17-
@Body JSONObject body,
18-
@QueryMap Map<String, Object> param
19-
);
20-
21-
@PUT("manifests/{id}/reinstall")
22-
Call<ResponseBody> updateVersion(
23-
@HeaderMap Map<String, String> headers,
24-
@Path("id") String id,
25-
@Body JSONObject body,
26-
@QueryMap Map<String, Object> queryParams);
27-
28-
29-
@GET("manifests/{uid}/authorizations")
30-
Call<ResponseBody> findAppAuthorizations(
31-
@HeaderMap Map<String, String> headers,
32-
@Path("uid") String uid, @QueryMap Map<String, Object> queryParams);
33-
34-
@DELETE("manifests/{uid}/authorizations/{uid}")
35-
Call<ResponseBody> deleteAuthorization(
36-
@HeaderMap Map<String, String> headers,
37-
@Path("uid") String uid,
38-
@Path("uid") String orgId);
39-
40-
41-
@GET("manifests/{uid}/installations")
42-
Call<ResponseBody> listAppInstallations(
43-
@HeaderMap Map<String, String> headers,
44-
@Path("uid") String uid,
45-
@QueryMap Map<String, Object> queryParameters);
46-
47-
48-
@GET("manifests")
49-
Call<ResponseBody> listApps(
50-
@HeaderMap Map<String, String> headers,
51-
@QueryMap Map<String, Object> queryParameters);
52-
53-
@POST("manifests")
54-
Call<ResponseBody> createApp(
55-
@HeaderMap Map<String, String> headers,
56-
@QueryMap Map<String, Object> queryParameters,
57-
@Body JSONObject body);
58-
59-
@GET("manifests/{uid}")
60-
Call<ResponseBody> fetchApp(
61-
@HeaderMap Map<String, String> headers,
62-
@Path("uid") String uid,
63-
@QueryMap Map<String, Object> queryParameters);
64-
65-
66-
@PUT("manifests/{uid}")
67-
Call<ResponseBody> updateApp(
68-
@HeaderMap Map<String, String> headers,
69-
@Path("uid") String uid,
70-
@Body JSONObject body);
71-
72-
@DELETE("manifests/{uid}")
73-
Call<ResponseBody> delete(
74-
@HeaderMap Map<String, String> headers,
75-
@Path("uid") String uid);
76-
77-
78-
@GET("manifests/{uid}/requests")
79-
Call<ResponseBody> listAppRequests(
80-
@HeaderMap Map<String, String> headers,
81-
@Path("uid") String uid, @QueryMap Map<String, Object> params);
12+
@POST("manifests/{uid}/install")
13+
Call<ResponseBody> createInstallation(
14+
@HeaderMap Map<String, String> headers,
15+
@Path("uid") String uid,
16+
@Body JSONObject body,
17+
@QueryMap Map<String, Object> param);
18+
19+
@PUT("manifests/{id}/reinstall")
20+
Call<ResponseBody> updateVersion(
21+
@HeaderMap Map<String, String> headers,
22+
@Path("id") String id,
23+
@Body JSONObject body,
24+
@QueryMap Map<String, Object> queryParams);
25+
26+
@GET("manifests/{uid}/authorizations")
27+
Call<ResponseBody> findAppAuthorizations(
28+
@HeaderMap Map<String, String> headers,
29+
@Path("uid") String uid, @QueryMap Map<String, Object> queryParams);
30+
31+
@DELETE("manifests/{uid}/authorizations/{uid}")
32+
Call<ResponseBody> deleteAuthorization(
33+
@HeaderMap Map<String, String> headers,
34+
@Path("uid") String uid,
35+
@Path("uid") String orgId);
36+
37+
@GET("manifests/{uid}/installations")
38+
Call<ResponseBody> listAppInstallations(
39+
@HeaderMap Map<String, String> headers,
40+
@Path("uid") String uid,
41+
@QueryMap Map<String, Object> queryParameters);
42+
43+
@GET("manifests")
44+
Call<ResponseBody> listApps(
45+
@HeaderMap Map<String, String> headers,
46+
@QueryMap Map<String, Object> queryParameters);
47+
48+
@POST("manifests")
49+
Call<ResponseBody> createApp(
50+
@HeaderMap Map<String, String> headers,
51+
@QueryMap Map<String, Object> queryParameters,
52+
@Body JSONObject body);
53+
54+
@GET("manifests/{uid}")
55+
Call<ResponseBody> fetchApp(
56+
@HeaderMap Map<String, String> headers,
57+
@Path("uid") String uid,
58+
@QueryMap Map<String, Object> queryParameters);
59+
60+
@PUT("manifests/{uid}")
61+
Call<ResponseBody> updateApp(
62+
@HeaderMap Map<String, String> headers,
63+
@Path("uid") String uid,
64+
@Body JSONObject body);
65+
66+
@DELETE("manifests/{uid}")
67+
Call<ResponseBody> delete(
68+
@HeaderMap Map<String, String> headers,
69+
@Path("uid") String uid);
70+
71+
@GET("manifests/{uid}/requests")
72+
Call<ResponseBody> listAppRequests(
73+
@HeaderMap Map<String, String> headers,
74+
@Path("uid") String uid, @QueryMap Map<String, Object> params);
8275

8376
}

src/main/java/com/contentstack/cms/marketplace/apps/hosting/Hosting.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ Call<ResponseBody> fetchHosting() {
5050
/**
5151
* Create signed upload url call.
5252
* The function returns a signed upload URL by making a request to a service
53-
* with the provided
54-
* headers and app ID.
53+
* with the provided headers and app ID.
5554
*
5655
* @return The method is returning a Call object with a generic type of
5756
* ResponseBody.

src/main/java/com/contentstack/cms/marketplace/apps/oauth/OauthService.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,19 @@
99

1010
public interface OauthService {
1111

12-
@GET("manifests/{uid}/oauth")
13-
Call<ResponseBody> getOauthConfiguration(
14-
@HeaderMap Map<String, String> headers,
15-
@Path("uid") String uid
16-
);
12+
@GET("manifests/{uid}/oauth")
13+
Call<ResponseBody> getOauthConfiguration(
14+
@HeaderMap Map<String, String> headers,
15+
@Path("uid") String uid);
1716

18-
@GET("manifests/oauth/scopes")
19-
Call<ResponseBody> findScopes(
20-
@HeaderMap Map<String, String> headers
21-
);
17+
@GET("manifests/oauth/scopes")
18+
Call<ResponseBody> findScopes(
19+
@HeaderMap Map<String, String> headers);
2220

23-
@PUT("manifests/{uid}/oauth")
24-
Call<ResponseBody> updateOauthConfiguration(
25-
@HeaderMap Map<String, String> headers,
26-
@Path("uid") String uid,
27-
@Body JSONObject body
28-
);
21+
@PUT("manifests/{uid}/oauth")
22+
Call<ResponseBody> updateOauthConfiguration(
23+
@HeaderMap Map<String, String> headers,
24+
@Path("uid") String uid,
25+
@Body JSONObject body);
2926

3027
}

src/main/java/com/contentstack/cms/marketplace/auths/AuthService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88

99
import java.util.Map;
1010

11-
1211
public interface AuthService {
1312

1413
@GET("authorized-apps")
1514
Call<ResponseBody> findAuthorizedApps(@HeaderMap Map<String, String> headers,
16-
@QueryMap Map<String, Object> params );
15+
@QueryMap Map<String, Object> params);
1716
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/**
2-
* Useful to access contentstack's app components
2+
* Useful to access contentstack's app auth component
33
*/
44
package com.contentstack.cms.marketplace.auths;

0 commit comments

Comments
 (0)