-
-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto detect api type
- Loading branch information
Showing
69 changed files
with
870 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
twidere.component.common/src/main/java/org/mariotaku/twidere/api/statusnet/StatusNet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.mariotaku.twidere.api.statusnet; | ||
|
||
import org.mariotaku.twidere.api.statusnet.api.GroupResources; | ||
import org.mariotaku.twidere.api.statusnet.api.SearchResources; | ||
import org.mariotaku.twidere.api.statusnet.api.StatusNetResources; | ||
import org.mariotaku.twidere.api.statusnet.api.UserResources; | ||
|
||
/** | ||
* Created by mariotaku on 16/3/4. | ||
*/ | ||
public interface StatusNet extends StatusNetResources, GroupResources, SearchResources, UserResources { | ||
} |
31 changes: 29 additions & 2 deletions
31
...omponent.common/src/main/java/org/mariotaku/twidere/api/statusnet/api/GroupResources.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,45 @@ | ||
package org.mariotaku.twidere.api.statusnet.api; | ||
|
||
import org.mariotaku.restfu.annotation.method.GET; | ||
import org.mariotaku.restfu.annotation.param.Path; | ||
import org.mariotaku.restfu.annotation.param.Query; | ||
import org.mariotaku.twidere.api.statusnet.model.Group; | ||
import org.mariotaku.twidere.api.twitter.TwitterException; | ||
import org.mariotaku.twidere.api.twitter.model.Paging; | ||
import org.mariotaku.twidere.api.twitter.model.ResponseList; | ||
import org.mariotaku.twidere.api.twitter.model.Status; | ||
import org.mariotaku.twidere.api.twitter.model.User; | ||
|
||
/** | ||
* Created by mariotaku on 16/3/4. | ||
*/ | ||
public interface GroupResources { | ||
|
||
ResponseList<Status> getUserListStatuses(@Query("group_id") long groupId, @Query Paging paging) throws TwitterException; | ||
@GET("/statusnet/groups/timeline/{group_id}.json") | ||
ResponseList<Status> getGroupStatuses(@Path("group_id") long groupId, @Query Paging paging) throws TwitterException; | ||
|
||
ResponseList<Status> getGroupStatuses(@Query("id") String name, @Query Paging paging) throws TwitterException; | ||
@GET("/statusnet/groups/timeline/{group_name}.json") | ||
ResponseList<Status> getGroupStatuses(@Path("group_name") String name, @Query Paging paging) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/show.json") | ||
Group showGroup(@Query("group_id") long groupId) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/show.json") | ||
Group showGroup(@Query("group_name") String groupName) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/membership.json") | ||
ResponseList<User> getGroupMembers(@Query("group_id") long groupId) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/membership.json") | ||
ResponseList<User> getGroupMembers(@Query("group_name") String groupName) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/list.json") | ||
ResponseList<Group> getGroups(@Query("screen_name") String screenName) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/list.json") | ||
ResponseList<Group> getGroups(@Query("id") long userId) throws TwitterException; | ||
|
||
@GET("/statusnet/groups/list_all.json") | ||
ResponseList<Group> getAllGroups(@Query Paging paging) throws TwitterException; | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
...mponent.common/src/main/java/org/mariotaku/twidere/api/statusnet/api/SearchResources.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.mariotaku.twidere.api.statusnet.api; | ||
|
||
import org.mariotaku.restfu.annotation.method.GET; | ||
import org.mariotaku.restfu.annotation.param.Query; | ||
import org.mariotaku.twidere.api.twitter.TwitterException; | ||
import org.mariotaku.twidere.api.twitter.model.Paging; | ||
import org.mariotaku.twidere.api.twitter.model.ResponseList; | ||
import org.mariotaku.twidere.api.twitter.model.Status; | ||
|
||
/** | ||
* Created by mariotaku on 16/3/4. | ||
*/ | ||
public interface SearchResources { | ||
|
||
@GET("/search.json") | ||
ResponseList<Status> searchStatuses(@Query("q") String query, @Query Paging paging) throws TwitterException; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...component.common/src/main/java/org/mariotaku/twidere/api/statusnet/api/UserResources.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.mariotaku.twidere.api.statusnet.api; | ||
|
||
import org.mariotaku.restfu.annotation.method.GET; | ||
import org.mariotaku.restfu.annotation.param.Query; | ||
import org.mariotaku.twidere.api.twitter.TwitterException; | ||
import org.mariotaku.twidere.api.twitter.model.PageableResponseList; | ||
import org.mariotaku.twidere.api.twitter.model.Paging; | ||
import org.mariotaku.twidere.api.twitter.model.User; | ||
|
||
/** | ||
* Created by mariotaku on 16/3/4. | ||
*/ | ||
public interface UserResources { | ||
|
||
@GET("/statuses/friends.json") | ||
PageableResponseList<User> getStatusesFriendsList(@Query("user_id") long userId, @Query Paging paging) throws TwitterException; | ||
|
||
@GET("/statuses/friends.json") | ||
PageableResponseList<User> getStatusesFriendsList(@Query("screen_name") String screenName, @Query Paging paging) throws TwitterException; | ||
|
||
@GET("/statuses/followers.json") | ||
PageableResponseList<User> getStatusesFollowersList(@Query("user_id") long userId, @Query Paging paging) throws TwitterException; | ||
|
||
@GET("/statuses/followers.json") | ||
PageableResponseList<User> getStatusesFollowersList(@Query("screen_name") String screenName, @Query Paging paging) throws TwitterException; | ||
|
||
} |
118 changes: 118 additions & 0 deletions
118
twidere.component.common/src/main/java/org/mariotaku/twidere/api/statusnet/model/Group.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
package org.mariotaku.twidere.api.statusnet.model; | ||
|
||
import com.bluelinelabs.logansquare.annotation.JsonField; | ||
import com.bluelinelabs.logansquare.annotation.JsonObject; | ||
|
||
import org.mariotaku.twidere.api.twitter.util.TwitterDateConverter; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* Created by mariotaku on 16/3/4. | ||
*/ | ||
@JsonObject | ||
public class Group { | ||
|
||
@JsonField(name = "modified", typeConverter = TwitterDateConverter.class) | ||
Date modified; | ||
@JsonField(name = "nickname") | ||
String nickname; | ||
@JsonField(name = "admin_count") | ||
int adminCount; | ||
@JsonField(name = "created", typeConverter = TwitterDateConverter.class) | ||
Date created; | ||
@JsonField(name = "id") | ||
long id; | ||
@JsonField(name = "homepage") | ||
String homepage; | ||
@JsonField(name = "fullname") | ||
String fullname; | ||
@JsonField(name = "homepage_logo") | ||
String homepageLogo; | ||
@JsonField(name = "mini_logo") | ||
String miniLogo; | ||
@JsonField(name = "url") | ||
String url; | ||
@JsonField(name = "member_count") | ||
int memberCount; | ||
@JsonField(name = "blocked") | ||
boolean blocked; | ||
@JsonField(name = "stream_logo") | ||
String streamLogo; | ||
@JsonField(name = "member") | ||
boolean member; | ||
@JsonField(name = "description") | ||
String description; | ||
@JsonField(name = "original_logo") | ||
String originalLogo; | ||
@JsonField(name = "location") | ||
String location; | ||
|
||
public Date getModified() { | ||
return modified; | ||
} | ||
|
||
public String getNickname() { | ||
return nickname; | ||
} | ||
|
||
public int getAdminCount() { | ||
return adminCount; | ||
} | ||
|
||
public Date getCreated() { | ||
return created; | ||
} | ||
|
||
public long getId() { | ||
return id; | ||
} | ||
|
||
public String getHomepage() { | ||
return homepage; | ||
} | ||
|
||
public String getFullname() { | ||
return fullname; | ||
} | ||
|
||
public String getHomepageLogo() { | ||
return homepageLogo; | ||
} | ||
|
||
public String getMiniLogo() { | ||
return miniLogo; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public int getMemberCount() { | ||
return memberCount; | ||
} | ||
|
||
public boolean isBlocked() { | ||
return blocked; | ||
} | ||
|
||
public String getStreamLogo() { | ||
return streamLogo; | ||
} | ||
|
||
public boolean isMember() { | ||
return member; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public String getOriginalLogo() { | ||
return originalLogo; | ||
} | ||
|
||
public String getLocation() { | ||
return location; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
twidere.component.common/src/main/java/org/mariotaku/twidere/api/twitter/TwitterPrivate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.mariotaku.twidere.api.twitter; | ||
|
||
import org.mariotaku.twidere.api.twitter.api.PrivateActivityResources; | ||
import org.mariotaku.twidere.api.twitter.api.PrivateDirectMessagesResources; | ||
import org.mariotaku.twidere.api.twitter.api.PrivateFriendsFollowersResources; | ||
import org.mariotaku.twidere.api.twitter.api.PrivateScheduleResources; | ||
import org.mariotaku.twidere.api.twitter.api.PrivateTimelinesResources; | ||
import org.mariotaku.twidere.api.twitter.api.PrivateTweetResources; | ||
|
||
/** | ||
* Created by mariotaku on 16/3/4. | ||
*/ | ||
public interface TwitterPrivate extends PrivateActivityResources, PrivateTweetResources, | ||
PrivateTimelinesResources, PrivateFriendsFollowersResources, PrivateDirectMessagesResources, | ||
PrivateScheduleResources { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.