Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.twitter</groupId>
<artifactId>twitter-api-java-sdk</artifactId>
<version>1.1.2</version>
<version>1.1.3</version>
</dependency>
```

Expand All @@ -53,7 +53,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
implementation "com.twitter:twitter-api-java-sdk:1.1.2"
implementation "com.twitter:twitter-api-java-sdk:1.1.3"
```

### Others
Expand All @@ -66,7 +66,7 @@ mvn clean package

Then manually install the following JARs:

- `target/twitter-api-java-sdk-1.1.2.jar`
- `target/twitter-api-java-sdk-1.1.3.jar`
- `target/lib/*.jar`

## Twitter Credentials
Expand Down
1 change: 1 addition & 0 deletions docs/RulesResponseMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sent** | **String** | |
**summary** | [**RulesRequestSummary**](RulesRequestSummary.md) | | [optional]
**resultCount** | **Integer** | The number of rules results returned in this response | [optional]



2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependency>
<groupId>com.twitter</groupId>
<artifactId>twitter-api-java-sdk</artifactId>
<version>1.1.2</version>
<version>1.1.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>twitter-api-java-sdk</artifactId>
<packaging>jar</packaging>
<name>twitter-api-java-sdk</name>
<version>1.1.2</version>
<version>1.1.3</version>
<url>https://github.com/twitterdev/twitter-api-java-sdk</url>
<description>Twitter API v2 available endpoints</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twitter/clientlib/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("twitter-api-java-sdk/1.1.2");
setUserAgent("twitter-api-java-sdk/1.1.3");

authentications = new HashMap<String, Authentication>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public class RulesResponseMetadata {
@SerializedName(SERIALIZED_NAME_SUMMARY)
private RulesRequestSummary summary;

public static final String SERIALIZED_NAME_RESULT_COUNT = "result_count";
@SerializedName(SERIALIZED_NAME_RESULT_COUNT)
private Integer resultCount;

public RulesResponseMetadata() {
}

Expand Down Expand Up @@ -115,6 +119,29 @@ public void setSummary(RulesRequestSummary summary) {
}


public RulesResponseMetadata resultCount(Integer resultCount) {

this.resultCount = resultCount;
return this;
}

/**
* The number of rules results returned in this response
* @return resultCount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The number of rules results returned in this response")

public Integer getResultCount() {
return resultCount;
}


public void setResultCount(Integer resultCount) {
this.resultCount = resultCount;
}


@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -125,12 +152,13 @@ public boolean equals(Object o) {
}
RulesResponseMetadata rulesResponseMetadata = (RulesResponseMetadata) o;
return Objects.equals(this.sent, rulesResponseMetadata.sent) &&
Objects.equals(this.summary, rulesResponseMetadata.summary);
Objects.equals(this.summary, rulesResponseMetadata.summary) &&
Objects.equals(this.resultCount, rulesResponseMetadata.resultCount);
}

@Override
public int hashCode() {
return Objects.hash(sent, summary);
return Objects.hash(sent, summary, resultCount);
}

@Override
Expand All @@ -139,6 +167,7 @@ public String toString() {
sb.append("class RulesResponseMetadata {\n");
sb.append(" sent: ").append(toIndentedString(sent)).append("\n");
sb.append(" summary: ").append(toIndentedString(summary)).append("\n");
sb.append(" resultCount: ").append(toIndentedString(resultCount)).append("\n");
sb.append("}");
return sb.toString();
}
Expand All @@ -163,6 +192,7 @@ private String toIndentedString(Object o) {
openapiFields = new HashSet<String>();
openapiFields.add("sent");
openapiFields.add("summary");
openapiFields.add("result_count");

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private AddOrDeleteRulesResponse deleteRule(String ruleStrValue) throws ApiExcep
}


/* @Test
@Test
public void getRulesAllTest() throws ApiException {
GetRulesResponse result = apiInstance.tweets().getRules(null, null, null);
assertNotNull(result.getData());
Expand All @@ -90,7 +90,7 @@ public void getRulesAllTest() throws ApiException {
assertNotNull(result.getMeta());
assertNotNull(result.getMeta().getSent());
assertTrue(result.getMeta().getResultCount() > 0);
} */
}

@Test
public void addOrDeleteRulesAddTest() throws ApiException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,12 @@ public void summaryTest() {
// TODO: test summary
}

/**
* Test the property 'resultCount'
*/
@Test
public void resultCountTest() {
// TODO: test resultCount
}

}