Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit 30be9a8

Browse files
committed
Improve devRant method names, version 1.2! 🚀
1 parent cd89e03 commit 30be9a8

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ JavaRant is available on Maven, simply add this dependency to your `pom.xml` fil
88
<dependency>
99
<groupId>com.scorpiac.javarant</groupId>
1010
<artifactId>javarant</artifactId>
11-
<version>1.1</version>
11+
<version>1.2</version>
1212
</dependency>
1313
```
1414

@@ -25,13 +25,13 @@ DevRant devRant = new DevRant();
2525
It can then be used to get rants and collabs from the feed or by searching.
2626

2727
```
28-
List<Rant> rants = devRant.rants(Sort.ALGO, 10, 0);
28+
List<Rant> rants = devRant.getRants(Sort.ALGO, 10, 0);
2929
List<Rant> wtf = devRant.search("wtf");
30-
List<Rant> weekly = devRant.weekly();
30+
List<Rant> weekly = devRant.getWeekly();
3131
32-
List<Collab> collabs = devRant.collabs();
32+
List<Collab> collabs = devRant.getCollabs();
3333
34-
Rant random = devRant.surprise();
34+
Rant random = devRant.getSurprise();
3535
```
3636

3737
It can also be used to get specific items based on an id (or username).

pom.xml

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

77
<groupId>com.scorpiac.javarant</groupId>
88
<artifactId>javarant</artifactId>
9-
<version>1.2-SNAPSHOT</version>
9+
<version>1.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>JavaRant</name>

src/main/java/com/scorpiac/javarant/DevRant.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public boolean isLoggedIn() {
9898
* @param skip How many rants to skip.
9999
* @return An array of rants.
100100
*/
101-
public List<Rant> rants(Sort sort, int limit, int skip) {
101+
public List<Rant> getRants(Sort sort, int limit, int skip) {
102102
JsonObject json = get(API_RANTS,
103103
new BasicNameValuePair("sort", sort.toString()),
104104
new BasicNameValuePair("limit", String.valueOf(limit)),
@@ -133,7 +133,7 @@ public List<Rant> search(String term) {
133133
*
134134
* @return A random rant.
135135
*/
136-
public Rant surprise() {
136+
public Rant getSurprise() {
137137
JsonObject json = get(API_SURPRISE);
138138

139139
// Check for success.
@@ -148,7 +148,7 @@ public Rant surprise() {
148148
*
149149
* @return The weekly rants.
150150
*/
151-
public List<Rant> weekly() {
151+
public List<Rant> getWeekly() {
152152
JsonObject json = get(API_WEEKLY);
153153

154154
// Check for success.
@@ -163,7 +163,7 @@ public List<Rant> weekly() {
163163
*
164164
* @return The collab rants.
165165
*/
166-
public List<Collab> collabs() {
166+
public List<Collab> getCollabs() {
167167
JsonObject json = get(API_COLLABS);
168168

169169
// Check for success.

0 commit comments

Comments
 (0)