Skip to content

Commit 2042a34

Browse files
committed
#62 removed the unsupported api 'PUT /v2/tags/:name'
1 parent 399b8d4 commit 2042a34

File tree

5 files changed

+8
-44
lines changed

5 files changed

+8
-44
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DigitalOcean API Client
2-
[![Build Status](https://travis-ci.org/jeevatkm/digitalocean-api-java.svg?branch=master)](https://travis-ci.org/jeevatkm/digitalocean-api-java) [![Version](https://img.shields.io/badge/version-2.9-blue.svg)](https://github.com/jeevatkm/digitalocean-api-java/releases/latest) [![License](https://img.shields.io/github/license/jeevatkm/digitalocean-api-java.svg)](LICENSE)
2+
[![Build Status](https://travis-ci.org/jeevatkm/digitalocean-api-java.svg?branch=master)](https://travis-ci.org/jeevatkm/digitalocean-api-java) [![Version](https://img.shields.io/badge/version-2.10-blue.svg)](https://github.com/jeevatkm/digitalocean-api-java/releases/latest) [![License](https://img.shields.io/github/license/jeevatkm/digitalocean-api-java.svg)](LICENSE)
33

4-
***v2.9 released and tagged on Mar 31, 2017***
4+
***v2.10 released and tagged on May 02, 2017***
55

66
Simple & Lightweight API client library for Enterprise Application or Utilities Integration around [DigitalOcean RESTful APIs][1]. You can use this library with project based (JVM hosted languages) on Java, Groovy, Scala, Clojure, etc.
77

@@ -18,22 +18,22 @@ For handy use, DigitalOcean API Client library project dependency definition pro
1818
<dependency>
1919
<groupId>com.myjeeva.digitalocean</groupId>
2020
<artifactId>digitalocean-api-client</artifactId>
21-
<version>2.9</version>
21+
<version>2.10</version>
2222
</dependency>
2323
```
2424
**Gradle/Grails dependency**
2525
```shell
26-
compile 'com.myjeeva.digitalocean:digitalocean-api-client:2.9'
26+
compile 'com.myjeeva.digitalocean:digitalocean-api-client:2.10'
2727
```
2828
**Groovy Grape**
2929
```groovy
3030
@Grapes(
31-
@Grab(group='com.myjeeva.digitalocean', module='digitalocean-api-client', version='2.9')
31+
@Grab(group='com.myjeeva.digitalocean', module='digitalocean-api-client', version='2.10')
3232
)
3333
```
3434
**Scala SBT**
3535
```shell
36-
libraryDependencies += "com.myjeeva.digitalocean" % "digitalocean-api-client" % "2.9"
36+
libraryDependencies += "com.myjeeva.digitalocean" % "digitalocean-api-client" % "2.10"
3737
```
3838

3939
**Note:** For Android projects, kindly include the `httpclient-android` library explicitly in your project dependencies.
@@ -330,7 +330,7 @@ DigitalOcean API Client - [MIT License][6].
330330

331331

332332
[1]: https://developers.digitalocean.com
333-
[2]: http://docs.myjeeva.com/javadoc/digitalocean-api-client/2.9/
333+
[2]: http://docs.myjeeva.com/javadoc/digitalocean-api-client/2.10/
334334
[3]: https://github.com/jeevatkm/digitalocean-api-java/issues
335335
[4]: https://oss.sonatype.org/content/repositories/snapshots/com/myjeeva/digitalocean/digitalocean-api-client/
336336
[5]: http://myjeeva.com
@@ -344,4 +344,4 @@ DigitalOcean API Client - [MIT License][6].
344344
[13]: https://raw.githubusercontent.com/darcyliu/google-styleguide/master/eclipse-java-google-style.xml
345345
[14]: https://developers.digitalocean.com/documentation/changelog/api-v2/add-status-to-account/
346346
[15]: https://developers.digitalocean.com/documentation/changelog/api-v2/deprecate-final-snaphots/
347-
[16]: http://search.maven.org/remotecontent?filepath=com/myjeeva/digitalocean/digitalocean-api-client/2.9/digitalocean-api-client-2.9.jar
347+
[16]: http://search.maven.org/remotecontent?filepath=com/myjeeva/digitalocean/digitalocean-api-client/2.10/digitalocean-api-client-2.10.jar

src/main/java/com/myjeeva/digitalocean/DigitalOcean.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,21 +1242,6 @@ Tags getAvailableTags(Integer pageNo, Integer perPage)
12421242
*/
12431243
Tag getTag(String name) throws DigitalOceanException, RequestUnsuccessfulException;
12441244

1245-
/**
1246-
* Method updates the existing Tag on DigitalOcean account.
1247-
*
1248-
* @param currentName existing Tag Name
1249-
* @param newName new Tag Name
1250-
* @return {@link Tag}
1251-
* @throws DigitalOceanException if request had interruption [
1252-
* <code>HTTP status code &gt;= 400 &amp;&amp; &lt; 510</code>]
1253-
* @throws RequestUnsuccessfulException if any RESTful request unsuccessful from wrapper method
1254-
*
1255-
* @since v2.5
1256-
*/
1257-
Tag updateTag(String currentName, String newName)
1258-
throws DigitalOceanException, RequestUnsuccessfulException;
1259-
12601245
/**
12611246
* Method deletes the existing Tag from DigitalOcean account.
12621247
*

src/main/java/com/myjeeva/digitalocean/common/ApiAction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public enum ApiAction {
159159
AVAILABLE_TAGS("/tags", "tags", RequestMethod.GET, Tags.class),
160160
CREATE_TAG("/tags", "tag", RequestMethod.POST, Tag.class),
161161
GET_TAG("/tags/%s", "tag", RequestMethod.GET, Tag.class),
162-
UPDATE_TAG("/tags/%s", "tag", RequestMethod.PUT, Tag.class),
163162
DELETE_TAG("/tags/%s", "response", RequestMethod.DELETE, Delete.class),
164163
TAG_RESOURCE("/tags/%s/resources", "response", RequestMethod.POST, Response.class),
165164
UNTAG_RESOURCE("/tags/%s/resources", "response", RequestMethod.DELETE, Response.class),

src/main/java/com/myjeeva/digitalocean/impl/DigitalOceanClient.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,16 +1036,6 @@ public Tag getTag(String name) throws DigitalOceanException, RequestUnsuccessful
10361036
return (Tag) perform(new ApiRequest(ApiAction.GET_TAG, params)).getData();
10371037
}
10381038

1039-
@Override
1040-
public Tag updateTag(String currentName, String newName)
1041-
throws DigitalOceanException, RequestUnsuccessfulException {
1042-
checkEmptyAndThrowError(currentName, "Missing required parameter - current tag name");
1043-
checkEmptyAndThrowError(newName, "Missing required parameter - new tag name");
1044-
1045-
Object[] params = {currentName};
1046-
return (Tag) perform(new ApiRequest(ApiAction.UPDATE_TAG, new Tag(newName), params)).getData();
1047-
}
1048-
10491039
@Override
10501040
public Delete deleteTag(String name) throws DigitalOceanException,
10511041
RequestUnsuccessfulException {

src/test/java/com/myjeeva/digitalocean/DigitalOceanIntegrationTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -985,16 +985,6 @@ public void testGetTag() throws DigitalOceanException, RequestUnsuccessfulExcept
985985
assertEquals("blog", tag.getName());
986986
}
987987

988-
@Test
989-
public void testUpdateTag() throws DigitalOceanException, RequestUnsuccessfulException {
990-
Tag tag = apiClient.updateTag("blog", "nice-blog");
991-
992-
LOG.info(tag.toString());
993-
994-
assertNotNull(tag);
995-
assertEquals("nice-blog", tag.getName());
996-
}
997-
998988
@Test
999989
public void testDeleteTag() throws DigitalOceanException, RequestUnsuccessfulException {
1000990
Delete result = apiClient.deleteTag("blr");

0 commit comments

Comments
 (0)