Skip to content

Commit 1270763

Browse files
committed
Added putCustom call
1 parent 4060fac commit 1270763

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

pom.xml

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

55
<groupId>com.afrozaar.wordpress</groupId>
66
<artifactId>wp-api-v2-client-java</artifactId>
7-
<version>4.12.1-SNAPSHOT</version>
7+
<version>4.13.0-SNAPSHOT</version>
88

99
<packaging>jar</packaging>
1010

src/main/java/com/afrozaar/wordpress/wpapi/v2/Client.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,11 @@ public Object getCustom(String customPath, String context, Class clazz) throws N
849849
}
850850
}
851851

852+
@Override
853+
public void putCustom(String customPath) {
854+
doExchange1(customPath, HttpMethod.PUT, null, new Object[0], null, null).getBody();
855+
}
856+
852857
@Override
853858
public User updateUser(User user) {
854859
return doExchange1(Request.USER, HttpMethod.POST, User.class, forExpand(user.getId()), null, userMap.apply(user)).getBody();

src/main/java/com/afrozaar/wordpress/wpapi/v2/api/CustomCalls.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public interface CustomCalls {
1515

1616
Object getCustom(String customPath, String context, Class clazz) throws NotFoundException;
1717

18+
void putCustom(String customPath);
19+
1820
<T, B> ResponseEntity<T> doCustomExchange(String context, HttpMethod method, Class<T> typeRef, Object[] buildAndExpand,
1921
Map<String, Object> queryParams, B body, @Nullable MediaType mediaType);
2022
}

0 commit comments

Comments
 (0)