[ https://issues.apache.org/jira/browse/STREAMS-533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215583#comment-16215583 ]
ASF GitHub Bot commented on STREAMS-533: ---------------------------------------- steveblackmon closed pull request #393: STREAMS-533: Fix JavaDoc links in streams-provider-twitter URL: https://github.com/apache/streams/pull/393 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/streams-contrib/streams-provider-twitter/pom.xml b/streams-contrib/streams-provider-twitter/pom.xml index 304dddee8..503da218b 100644 --- a/streams-contrib/streams-provider-twitter/pom.xml +++ b/streams-contrib/streams-provider-twitter/pom.xml @@ -25,10 +25,12 @@ <modelVersion>4.0.0</modelVersion> <artifactId>streams-provider-twitter</artifactId> + <name>streams-provider-twitter</name> + + <description>Twitter Provider</description> <properties> <skipITs>true</skipITs> - <testDataBaseURl>http://streams.peoplepattern.com.s3.amazonaws.com/test-data/</testDataBaseURl> </properties> <dependencies> diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Account.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Account.java index dfe0c4e83..960992717 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Account.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Account.java @@ -20,6 +20,7 @@ import org.apache.streams.twitter.pojo.User; +import org.apache.juneau.remoteable.Body; import org.apache.juneau.remoteable.RemoteMethod; import org.apache.juneau.remoteable.Remoteable; @@ -34,8 +35,8 @@ /** * Returns settings (including current trend, geo and sleep time information) for the authenticating user. * - * @return AccountSettingsResponse - * @see <a href=https://dev.twitter.com/rest/reference/get/account/settings">https://dev.twitter.com/rest/reference/get/account/settings</a> + * @return {@link org.apache.streams.twitter.api.AccountSettings} + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-settings">https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-settings</a> * */ @RemoteMethod(httpMethod = "GET", path = "/settings.json") @@ -44,11 +45,31 @@ /** * Returns user credentials for the authenticating user. * - * @return User - * @see <a href=https://dev.twitter.com/rest/reference/get/account/verify_credentials">https://dev.twitter.com/rest/reference/get/account/verify_credentials</a> + * @return {@link org.apache.streams.twitter.pojo.User} + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials">https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials</a> * */ @RemoteMethod(httpMethod = "GET", path = "/verify_credentials.json") public User verifyCredentials(); + /** + * Sets some values that users are able to set under the “Account” tab of their settings page. Only the parameters specified will be updated. + * + * @return {@link org.apache.streams.twitter.pojo.User} + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile">https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile</a> + * + */ + @RemoteMethod(httpMethod = "POST", path = "/update_profile.json") + public User updateProfile(@Body UpdateProfileRequest parameters); + + /** + * Updates the authenticating user’s settings. + * + * @return {@link org.apache.streams.twitter.api.AccountSettings} + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-settings">https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-settings</a> + * + */ + @RemoteMethod(httpMethod = "POST", path = "/update_settings.json") + public AccountSettings updateSettings(@Body UpdateProfileRequest parameters); + } diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/AccountActivity.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/AccountActivity.java index fe13db099..114a8a607 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/AccountActivity.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/AccountActivity.java @@ -32,7 +32,7 @@ /** * Interface for /account_activity methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/overview">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/overview</a> */ @Remoteable(path = "https://api.twitter.com/1.1/account_activity") public interface AccountActivity { @@ -43,7 +43,7 @@ * We mark a URL as invalid if it fails the daily validation check. In order to re-enable the URL, call the update endpoint. * * @return List\<Webhook\> - * @see <a href=https://https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks">https://https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/get-webhook-config">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/get-webhook-config</a> * */ @RemoteMethod(httpMethod = "GET", path = "/webhooks.json") @@ -55,7 +55,7 @@ * Only one webhook URL can be registered to an application. * * @return Webhook - * @see <a href=https://dev.twitter.com/webhooks/reference/post/account_activity/webhooks">https://dev.twitter.com/webhooks/reference/post/account_activity/webhooks</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/new-webhook-config">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/new-webhook-config</a> * */ @RemoteMethod(httpMethod = "POST", path = "/webhooks.json") @@ -65,7 +65,7 @@ * Removes the webhook from the provided application’s configuration. The webhook ID can be accessed by making a call to GET /1.1/account_activity/webhooks. * * @return Boolean - * @see <a href=https://dev.twitter.com/webhooks/reference/del/account_activity/webhooks">https://dev.twitter.com/webhooks/reference/del/account_activity/webhooks</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/delete-webhook-config">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/delete-webhook-config</a> * */ @RemoteMethod(httpMethod = "DELETE", path = "/webhooks/{webhookId}.json") @@ -76,7 +76,7 @@ * * @param webhookId Webhook ID. Defined in resource path. * @return Boolean - * @see <a href=https://dev.twitter.com/webhooks/reference/put/account_activity/webhooks">https://dev.twitter.com/webhooks/reference/put/account_activity/webhooks</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/validate-webhook-config">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/validate-webhook-config</a> * */ @RemoteMethod(httpMethod = "PUT", path = "/webhooks/{webhookId}.json") @@ -87,7 +87,7 @@ * * @param webhookId Webhook ID. Defined in resource path. * @return Boolean - * @see <a href=https://dev.twitter.com/webhooks/reference/put/account_activity/webhooks">https://dev.twitter.com/webhooks/reference/put/account_activity/webhooks</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/get-subscription">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/get-subscription</a> * */ @RemoteMethod(httpMethod = "GET", path = "/webhooks/{webhookId}/subscriptions.json") @@ -100,7 +100,7 @@ public Boolean getWebhookSubscription(@Path("webhookId") Long webhookId) * * @param webhookId Webhook ID. Defined in resource path. * @return Boolean - * @see <a href=https://dev.twitter.com/webhooks/reference/post/account_activity/webhooks/subscriptions">https://dev.twitter.com/webhooks/reference/post/account_activity/webhooks/subscriptions</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/new-subscription">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/new-subscription</a> * */ @RemoteMethod(httpMethod = "POST", path = "/webhooks/{webhookId}/subscriptions.json") @@ -113,7 +113,7 @@ public Boolean registerWebhookSubscriptions(@Path("webhookId") Long webhookId) * * @param webhookId Webhook ID. Defined in resource path. * @return Boolean - * @see <a href=https://dev.twitter.com/webhooks/reference/del/account_activity/webhooks/subscriptions">https://dev.twitter.com/webhooks/reference/del/account_activity/webhooks/subscriptions</a> + * @see <a href=https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/delete-subscription">https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/delete-subscription</a> * */ @RemoteMethod(httpMethod = "DELETE", path = "/webhooks/{webhookId}/subscriptions.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/DirectMessages.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/DirectMessages.java index 502750b4e..e8bff80fa 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/DirectMessages.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/DirectMessages.java @@ -18,6 +18,7 @@ package org.apache.streams.twitter.api; +import org.apache.streams.twitter.pojo.DirectMessage; import org.apache.streams.twitter.pojo.DirectMessageEvent; import org.apache.streams.twitter.pojo.User; import org.apache.streams.twitter.pojo.WelcomeMessage; @@ -29,6 +30,8 @@ import org.apache.juneau.remoteable.Remoteable; import org.apache.juneau.remoteable.RequestBean; +import java.util.List; + /** * Interface for /direct_messages methods. * @@ -40,8 +43,9 @@ /** * Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order. * + * @param parameters {@link org.apache.streams.twitter.api.EventsListRequest} * @return {@link org.apache.streams.twitter.api.EventsListResponse} - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/events/list">https://dev.twitter.com/rest/reference/get/direct_messages/events/list</a> + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events</a> * */ @RemoteMethod(httpMethod = "GET", path = "/events/list.json") @@ -51,20 +55,75 @@ * Returns a single Direct Message event by the given id. * * @return {@link org.apache.streams.twitter.api.EventShowResponse} - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/events/show">https://dev.twitter.com/rest/reference/get/direct_messages/events/show</a> + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-event">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-event</a> * */ @RemoteMethod(httpMethod = "GET", path = "/events/show.json") public EventShowResponse showEvent(@Query("id") Long id); /** - * Publishes a new message_create event resulting in a Direct Message sent to a specified user from the authenticating user. Returns an event in the requested format if successful. + * Destroys the direct message specified in the required ID parameter. The authenticating user must be the recipient of the specified direct message. * + * @param event {@link org.apache.streams.twitter.api.MessageCreateRequest} * @return {@link org.apache.streams.twitter.pojo.DirectMessageEvent} - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/events/new">https://dev.twitter.com/rest/reference/get/direct_messages/events/new</a> + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event</a> * */ @RemoteMethod(httpMethod = "POST", path = "/events/new.json") public DirectMessageEvent newEvent(@Body MessageCreateRequest event); + /** + * Publishes a new message_create event resulting in a Direct Message sent to a specified user from the authenticating user. Returns an event in the requested format if successful. + * + * @param id The ID of the direct message to delete. + * @return {@link org.apache.streams.twitter.pojo.DirectMessage} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event</a> + * + */ + @RemoteMethod(httpMethod = "POST", path = "/destroy.json") + public DirectMessage destroy(@Query("id") Long id); + + /** + * The ID of the direct message. + * + * @param id The ID of the direct message to delete. + * @return {@link org.apache.streams.twitter.pojo.DirectMessage} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/show.json") + public DirectMessage show(@Query("id") Long id); + + /** + * Returns the 20 most recent direct messages sent to the authenticating user. Includes detailed information about the sender and recipient user. You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint. + * + * @param parameters {@link org.apache.streams.twitter.api.DirectMessagesListRequest} + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.DirectMessage}] + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-messages">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-messages</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = ".json") + public List<DirectMessage> list(@QueryIfNE DirectMessagesListRequest parameters); + + /** + * Returns the 20 most recent direct messages sent to the authenticating user. Includes detailed information about the sender and recipient user. You can request up to 200 direct messages per call, and only the most recent 200 DMs will be available using this endpoint. + * + * @param parameters {@link org.apache.streams.twitter.api.DirectMessagesSentRequest} + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.DirectMessage}] + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/sent.json") + public List<DirectMessage> sent(@QueryIfNE DirectMessagesSentRequest parameters); + + /** + * Destroys the direct message specified in the required ID parameter. The authenticating user must be the recipient of the specified direct message. + * + * @param parameters {@link org.apache.streams.twitter.api.DirectMessageNewRequest} + * @return {@link org.apache.streams.twitter.pojo.DirectMessage} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event</a> + * + */ + @RemoteMethod(httpMethod = "POST", path = "/new.json") + public DirectMessage newDM(@Body DirectMessageNewRequest parameters); } diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Followers.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Followers.java index 8c2698bfb..900d87887 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Followers.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Followers.java @@ -29,7 +29,7 @@ /** * Interface for /followers methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference</a> */ @Remoteable(path = "https://api.twitter.com/1.1/followers") public interface Followers { @@ -39,7 +39,7 @@ * * @param parameters {@link org.apache.streams.twitter.api.FollowersIdsRequest} * @return FollowersIdsResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/followers/ids">https://dev.twitter.com/rest/reference/get/followers/ids</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-ids">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-ids</a> * */ @RemoteMethod(httpMethod = "GET", path = "/ids.json") @@ -50,7 +50,7 @@ * * @param parameters {@link org.apache.streams.twitter.api.FollowersListRequest} * @return FollowersListResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/followers/list">https://dev.twitter.com/rest/reference/get/followers/list</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-list">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-list</a> * */ @RemoteMethod(httpMethod = "GET", path = "/list.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friends.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friends.java index 7f75603ea..3c0d1f9e8 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friends.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friends.java @@ -29,7 +29,7 @@ /** * Interface for /friends methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference</a> */ @Remoteable(path = "https://api.twitter.com/1.1/friends") public interface Friends { @@ -39,7 +39,7 @@ * * @param parameters {@link org.apache.streams.twitter.api.FriendsIdsRequest} * @return FriendsIdsResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/friends/ids">https://dev.twitter.com/rest/reference/get/friends/ids</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids</a> * */ @RemoteMethod(httpMethod = "GET", path = "/ids.json") @@ -50,7 +50,7 @@ * * @param parameters {@link org.apache.streams.twitter.api.FriendsListRequest} * @return FriendsListResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/friends/list">https://dev.twitter.com/rest/reference/get/friends/list</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list</a> * */ @RemoteMethod(httpMethod = "GET", path = "/list.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friendships.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friendships.java index 288db98db..54bbe4cc7 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friendships.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Friendships.java @@ -30,7 +30,7 @@ /** * Interface for /friendships methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/overview">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/overview</a> */ @Remoteable(path = "https://api.twitter.com/1.1/friendships") public interface Friendships { @@ -38,9 +38,9 @@ /** * Allows the authenticating users to follow the user specified in the ID parameter. * - * @param parameters {@link FollowersIdsRequest} - * @return FollowersIdsResponse - * @see <a href="https://dev.twitter.com/rest/reference/post/friendships/create">https://dev.twitter.com/rest/reference/post/friendships/create</a> + * @param parameters {@link org.apache.streams.twitter.api.FriendshipCreateRequest} + * @return {@link org.apache.streams.twitter.pojo.User} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create</a> * */ @RemoteMethod(httpMethod = "POST", path = "/create.json") @@ -49,32 +49,44 @@ /** * Allows the authenticating user to unfollow the user specified in the ID parameter. * - * @param parameters {@link User} - * @return User - * @see <a href="https://dev.twitter.com/rest/reference/post/friendships/destroy">https://dev.twitter.com/rest/reference/post/friendships/destroy</a> + * @param parameters {@link org.apache.streams.twitter.api.FriendshipDestroyRequest} + * @return {@link org.apache.streams.twitter.pojo.User} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy</a> * */ @RemoteMethod(httpMethod = "POST", path = "/destroy.json") public User destroy(@QueryIfNE("*") FriendshipDestroyRequest parameters); /** + * Returns a collection of numeric IDs for every user who has a pending request to follow the authenticating user. + * + * @param parameters {@link org.apache.streams.twitter.api.FriendshipsIncomingRequest} + * @return {@link org.apache.streams.twitter.api.FollowersListResponse} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/incoming.json") + public User incoming(@QueryIfNE("*") FriendshipsIncomingRequest parameters); + + /** * Returns the relationships of the authenticating user to the comma-separated list of up to 100 screen_names or user_ids provided. * Values for connections can be: following, following_requested, followed_by, none, blocking, muting. * - * @param parameters {@link FriendshipsLookupRequest} - * @return List<Friendship> - * @see <a href="https://dev.twitter.com/rest/reference/get/friendships/lookup">https://dev.twitter.com/rest/reference/get/friendships/lookup</a> + * @param parameters {@link org.apache.streams.twitter.api.FriendshipsLookupRequest} + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.Friendship}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup</a> * */ @RemoteMethod(httpMethod = "GET", path = "/lookup.json") public List<Friendship> lookup(@QueryIfNE("*") FriendshipsLookupRequest parameters); + /** * Returns a collection of numeric IDs for every protected user for whom the authenticating user has a pending follow request. * - * @param parameters {@link FriendshipsOutgoingRequest} - * @return FollowersListResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/friendships/outgoing">https://dev.twitter.com/rest/reference/get/friendships/outgoing</a> + * @param parameters {@link org.apache.streams.twitter.api.FriendshipsOutgoingRequest} + * @return {@link org.apache.streams.twitter.api.FollowersListResponse} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming</a> * */ @RemoteMethod(httpMethod = "GET", path = "/outgoing.json") @@ -83,20 +95,20 @@ /** * Returns detailed information about the relationship between two arbitrary users. * - * @param parameters {@link FriendshipShowRequest} - * @return FriendshipShowResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/friendships/show">https://dev.twitter.com/rest/reference/get/friendships/show</a> + * @param parameters {@link org.apache.streams.twitter.api.FriendshipShowRequest} + * @return {@link org.apache.streams.twitter.api.FriendshipShowResponse} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show</a> * */ @RemoteMethod(httpMethod = "GET", path = "/show.json") - public FriendshipShowResponse outgoing(@QueryIfNE("*") FriendshipShowRequest parameters); + public FriendshipShowResponse show(@QueryIfNE("*") FriendshipShowRequest parameters); /** * Allows one to enable or disable retweets and device notifications from the specified user. * - * @param parameters {@link FriendshipUpdateRequest} - * @return User - * @see <a href="https://dev.twitter.com/rest/reference/post/friendships/update">https://dev.twitter.com/rest/reference/post/friendships/update</a> + * @param parameters {@link org.apache.streams.twitter.api.FriendshipUpdateRequest} + * @return {@link org.apache.streams.twitter.pojo.User} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-update">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-update</a> * */ @RemoteMethod(httpMethod = "GET", path = "/update.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Geo.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Geo.java index 21f836105..d64be88d7 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Geo.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Geo.java @@ -31,7 +31,8 @@ /** * Interface for /geo methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/geo/place-information/overview">https://developer.twitter.com/en/docs/geo/place-information/overview</a> + * @see <a href="https://developer.twitter.com/en/docs/geo/places-near-location/overview">https://developer.twitter.com/en/docs/geo/places-near-location/overview</a> */ @Remoteable(path = "https://api.twitter.com/1.1/geo") public interface Geo { @@ -41,7 +42,7 @@ * * @param place_id A place in the world. These IDs can be retrieved from geo/reverse_geocode. * @return {@link org.apache.streams.twitter.pojo.Place} - * @see <a href="https://dev.twitter.com/rest/reference/get/geo/id">https://dev.twitter.com/rest/reference/get/geo/id</a> + * @see <a href="https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id">https://developer.twitter.com/en/docs/geo/place-information/api-reference/get-geo-id-place_id</a> * */ @RemoteMethod(httpMethod = "GET", path = "/id/{place_id}.json") @@ -52,7 +53,7 @@ * * @param parameters A place in the world. These IDs can be retrieved from geo/reverse_geocode. * @return {@link org.apache.streams.twitter.api.GeoSearchResponse} - * @see <a href="https://dev.twitter.com/rest/reference/get/geo/search">https://dev.twitter.com/rest/reference/get/geo/search</a> + * @see <a href="https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search">https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search</a> * */ @RemoteMethod(httpMethod = "GET", path = "/search.json") @@ -63,7 +64,7 @@ * * @param parameters A place in the world. These IDs can be retrieved from geo/reverse_geocode. * @return {@link org.apache.streams.twitter.api.GeoSearchResponse} - * @see <a href="https://dev.twitter.com/rest/reference/get/geo/reverse_geocode">https://dev.twitter.com/rest/reference/get/geo/reverse_geocode</a> + * @see <a href="https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-reverse_geocode">https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-reverse_geocode</a> * */ @RemoteMethod(httpMethod = "GET", path = "/reverse_geocode.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Media.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Media.java index 4460a21d4..e79b6b590 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Media.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Media.java @@ -21,7 +21,7 @@ * * @param parameters {@link org.apache.streams.twitter.api.MediaStatusRequest} * @return {@link org.apache.streams.twitter.api.MediaStatusResponse) - * @see <a href="https://dev.twitter.com/rest/reference/get/media/upload-status">https://dev.twitter.com/rest/reference/get/media/upload-status</a> + * @see <a href="https://developer.twitter.com/en/docs/media/upload-media/api-reference/get-media-upload-status">https://developer.twitter.com/en/docs/media/upload-media/api-reference/get-media-upload-status</a> * */ @RemoteMethod(httpMethod = "GET", path = "/upload") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Statuses.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Statuses.java index 65f3882f7..ce66546bf 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Statuses.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Statuses.java @@ -33,7 +33,8 @@ /** * Interface for /statuses methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/tweets/post-and-engage/overview">https://developer.twitter.com/en/docs/tweets/post-and-engage/overview</a> + * @see <a href="https://developer.twitter.com/en/docs/tweets/timelines/overview">https://developer.twitter.com/en/docs/tweets/timelines/overview</a> */ @Remoteable(path = "https://api.twitter.com/1.1/statuses") public interface Statuses { @@ -42,8 +43,8 @@ * Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters. * * @param parameters {@link org.apache.streams.twitter.api.StatusesHomeTimelineRequest} - * @return List<Tweet> - * @see <a href="https://dev.twitter.com/rest/reference/get/statuses/home_timeline">https://dev.twitter.com/rest/reference/get/statuses/home_timeline</a> + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.Tweet}] + * @see <a href="https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline">https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-home_timeline</a> * */ @RemoteMethod(httpMethod = "GET", path = "/home_timeline.json") @@ -53,8 +54,8 @@ * Returns fully-hydrated Tweet objects for up to 100 Tweets per request, as specified by comma-separated values passed to the id parameter. * * @param parameters {@link org.apache.streams.twitter.api.StatusesLookupRequest} - * @return List<Tweet> - * @see <a href="https://dev.twitter.com/rest/reference/get/statuses/lookup">https://dev.twitter.com/rest/reference/get/statuses/lookup</a> + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.Tweet}] + * @see <a href="https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup">https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup</a> * */ @RemoteMethod(httpMethod = "GET", path = "/lookup.json") @@ -67,9 +68,9 @@ * * This method can only return up to 800 tweets. * - * @param parameters {@link org.apache.streams.twitter.api.StatusesUserTimelineRequest} - * @return List<Tweet> - * @see <a href="https://dev.twitter.com/rest/reference/get/statuses/mentions_timeline">https://dev.twitter.com/rest/reference/get/statuses/mentions_timeline</a> + * @param parameters {@link org.apache.streams.twitter.api.StatusesMentionsTimelineRequest} + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.Tweet}] + * @see <a href="https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-mentions_timeline">https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-mentions_timeline</a> * */ @RemoteMethod(httpMethod = "GET", path = "/mentions_timeline.json") @@ -79,8 +80,8 @@ * Returns a single Tweet, specified by the id parameter. The Tweet’s author will also be embedded within the Tweet. * * @param parameters {@link org.apache.streams.twitter.api.StatusesShowRequest} - * @return Tweet - * @see <a href="https://dev.twitter.com/rest/reference/get/statuses/show/id">https://dev.twitter.com/rest/reference/get/statuses/show/id</a> + * @return {@link org.apache.streams.twitter.pojo.Tweet} + * @see <a href="https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-show-id">https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-show-id</a> * */ @RemoteMethod(httpMethod = "GET", path = "/show/{id}") @@ -90,8 +91,8 @@ * Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters. * * @param parameters {@link org.apache.streams.twitter.api.StatusesUserTimelineRequest} - * @return List<Tweet> - * @see <a href="https://dev.twitter.com/rest/reference/get/statuses/user_timeline">https://dev.twitter.com/rest/reference/get/statuses/user_timeline</a> + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.Tweet}] + * @see <a href="https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline">https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline</a> * */ @RemoteMethod(httpMethod = "GET", path = "/user_timeline.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/SuggestedUsers.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/SuggestedUsers.java new file mode 100644 index 000000000..d1b88a172 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/SuggestedUsers.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.streams.twitter.api; + +import org.apache.streams.twitter.pojo.User; + +import org.apache.juneau.remoteable.Path; +import org.apache.juneau.remoteable.QueryIfNE; +import org.apache.juneau.remoteable.RemoteMethod; +import org.apache.juneau.remoteable.Remoteable; + +import java.util.List; + +/** + * Interface for /users methods. + * + * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + */ +@Remoteable(path = "https://api.twitter.com/1.1/users/suggestions") +public interface SuggestedUsers { + + /** + * Access to Twitter’s suggested user list. This returns the list of suggested user categories. + * + * @param lang Restricts the suggested categories to the requested language. The language must be specified by the appropriate two letter ISO 639-1 representation. + * @return {@link java.util.List}[{@link SuggestedUserCategory}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = ".json") + public List<SuggestedUserCategory> categories(@QueryIfNE("lang") String lang); + + /** + * Access the users in a given category of the Twitter suggested user list. + * + * It is recommended that applications cache this data for no more than one hour. + * + * @return {@link SuggestedUserCategory} + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions-slug">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions-slug</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/suggestions/{slug}.json") + public SuggestedUserCategory suggestions(@Path("slug") String slug, @QueryIfNE("lang") String lang); + + /** + * Access the users in a given category of the Twitter suggested user list and return their most recent status if they are not a protected user. + * + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.User}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions-slug">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions-slug</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/suggestions/{slug}/members.json") + public List<User> members(@Path("slug") String slug); + +} diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java index dae6fa8d8..48c570403 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java @@ -22,6 +22,7 @@ import org.apache.streams.twitter.TwitterConfiguration; import org.apache.streams.twitter.converter.TwitterDateTimeFormat; import org.apache.streams.twitter.converter.TwitterJodaDateSwap; +import org.apache.streams.twitter.pojo.DirectMessage; import org.apache.streams.twitter.pojo.DirectMessageEvent; import org.apache.streams.twitter.pojo.Tweet; import org.apache.streams.twitter.pojo.User; @@ -30,6 +31,7 @@ import org.apache.streams.twitter.provider.TwitterProviderUtil; import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.lang.NotImplementedException; import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpResponseInterceptor; import org.apache.http.client.config.RequestConfig; @@ -59,7 +61,7 @@ /** * Implementation of all twitter interfaces using juneau. */ -public class Twitter implements Account, AccountActivity, DirectMessages, Favorites, Followers, Friends, Statuses, Users, WelcomeMessages, WelcomeMessageRules { +public class Twitter implements Account, AccountActivity, DirectMessages, Favorites, Followers, Friends, Statuses, SuggestedUsers, Users, WelcomeMessages, WelcomeMessageRules { private static final Logger LOGGER = LoggerFactory.getLogger(Twitter.class); @@ -206,6 +208,16 @@ public FollowersListResponse list(FollowersListRequest parameters) { } @Override + public List<User> search(UsersSearchRequest parameters) { + throw new NotImplementedException(); + } + + @Override + public List<SuggestedUserCategory> suggestedUserCategories(String lang) { + return null; + } + + @Override public User show(UsersShowRequest parameters) { Users restUsers = restClient.getRemoteableProxy(Users.class, TwitterProviderUtil.baseUrl(configuration)+"/users"); User result = restUsers.show(parameters); @@ -234,6 +246,16 @@ public User verifyCredentials() { } @Override + public User updateProfile(UpdateProfileRequest parameters) { + throw new NotImplementedException(); + } + + @Override + public AccountSettings updateSettings(UpdateProfileRequest parameters) { + throw new NotImplementedException(); + } + + @Override public WelcomeMessagesListResponse listWelcomeMessages(WelcomeMessagesListRequest parameters) { WelcomeMessages proxy = restClient.getRemoteableProxy(WelcomeMessages.class, TwitterProviderUtil.baseUrl(configuration)+"/direct_messages/welcome_messages"); return proxy.listWelcomeMessages(parameters); @@ -392,4 +414,44 @@ public DirectMessageEvent newEvent(MessageCreateRequest event) { DirectMessages proxy = restClient.getRemoteableProxy(DirectMessages.class, TwitterProviderUtil.baseUrl(configuration)+"/direct_messages"); return proxy.newEvent(event); } + + @Override + public DirectMessage destroy(Long id) { + throw new NotImplementedException(); + } + + @Override + public DirectMessage show(Long id) { + throw new NotImplementedException(); + } + + @Override + public List<DirectMessage> list(DirectMessagesListRequest parameters) { + throw new NotImplementedException(); + } + + @Override + public List<DirectMessage> sent(DirectMessagesSentRequest parameters) { + throw new NotImplementedException(); + } + + @Override + public DirectMessage newDM(DirectMessageNewRequest parameters) { + throw new NotImplementedException(); + } + + @Override + public List<SuggestedUserCategory> categories(String lang) { + throw new NotImplementedException(); + } + + @Override + public SuggestedUserCategory suggestions(String slug, String lang) { + throw new NotImplementedException(); + } + + @Override + public List<User> members(String slug) { + throw new NotImplementedException(); + } } diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Users.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Users.java index a7b1a8f11..2393cd547 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Users.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Users.java @@ -41,22 +41,46 @@ * Returns fully-hydrated user objects for up to 100 users per request, as specified by comma-separated values passed to the user_id and/or screen_name parameters. * * @param parameters {@link org.apache.streams.twitter.api.UsersLookupRequest} - * @return List<User> - * @see <a href="https://dev.twitter.com/rest/reference/get/users/lookup">https://dev.twitter.com/rest/reference/get/users/lookup</a> + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.User}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup</a> * */ @RemoteMethod(httpMethod = "GET", path = "/lookup.json") public List<User> lookup( @QueryIfNE UsersLookupRequest parameters); /** - * Returns a variety of information about the user specified by the required user_id or screen_name parameter. The author’s most recent Tweet will be returned inline when possible. + * Provides a simple, relevance-based search interface to public user accounts on Twitter. Try querying by topical interest, full name, company name, location, or other criteria. Exact match searches are not supported. * - * @param parameters {@link org.apache.streams.twitter.api.UsersShowRequest} - * @return List<User> - * @see <a href="https://dev.twitter.com/rest/reference/get/users/show">https://dev.twitter.com/rest/reference/get/users/show</a> + * Only the first 1,000 matching results are available. + * + * @param parameters {@link org.apache.streams.twitter.api.UsersSearchRequest} + * @return {@link java.util.List}[{@link org.apache.streams.twitter.pojo.User}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/search.json") + public List<User> search( @QueryIfNE UsersSearchRequest parameters); + + /** + * Access to Twitter’s suggested user list. This returns the list of suggested user categories. + * + * @param lang Restricts the suggested categories to the requested language. The language must be specified by the appropriate two letter ISO 639-1 representation. + * @return {@link java.util.List}[{@link org.apache.streams.twitter.api.SuggestedUserCategory}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions</a> + * + */ + @RemoteMethod(httpMethod = "GET", path = "/suggestions.json") + public List<SuggestedUserCategory> suggestedUserCategories( @QueryIfNE("lang") String lang); + + /** + * Access to Twitter’s suggested user list. This returns the list of suggested user categories. + * + * @param lang Restricts the suggested categories to the requested language. The language must be specified by the appropriate two letter ISO 639-1 representation. + * @return {@link java.util.List}[{@link org.apache.streams.twitter.api.SuggestedUserCategory}] + * @see <a href="https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions">https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions</a> * */ - @RemoteMethod(httpMethod = "GET", path = "/show.json") + @RemoteMethod(httpMethod = "GET", path = "/suggestions/{slug}") public User show( @QueryIfNE UsersShowRequest parameters); } diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessageRules.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessageRules.java index fa149442f..91f1a10df 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessageRules.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessageRules.java @@ -20,8 +20,8 @@ /** * Returns a list of Welcome Message Rules. * - * @return WelcomeMessageRulesListResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/rules/list">https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/rules/list</a> + * @return {@link org.apache.streams.twitter.api.WelcomeMessageRulesListResponse} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-message-rules">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-message-rules</a> * */ @RemoteMethod(httpMethod = "GET", path = "/list.json") @@ -30,8 +30,8 @@ /** * Returns a Welcome Message Rule by the given id. * - * @return WelcomeMessage - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/events/list">https://dev.twitter.com/rest/reference/get/direct_messages/events/list</a> + * @return {@link org.apache.streams.twitter.pojo.WelcomeMessageRule} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/get-welcome-message-rule">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/get-welcome-message-rule</a> * */ @RemoteMethod(httpMethod = "GET", path = "/show.json") @@ -44,8 +44,8 @@ * * Additional rule configurations are forthcoming. For the initial beta release, the most recently created Rule will always take precedence, and the assigned Welcome Message will be displayed in the conversation. * - * @return WelcomeMessage - * @see <a href="https://dev.twitter.com/rest/reference/post/direct_messages/welcome_messages/rules/new">https://dev.twitter.com/rest/reference/post/direct_messages/welcome_messages/rules/new</a> + * @return {@link org.apache.streams.twitter.pojo.WelcomeMessageRule} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message-rule">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message-rule</a> * */ @RemoteMethod(httpMethod = "POST", path = "/new.json") @@ -54,7 +54,7 @@ /** * Deletes a Welcome Message Rule by the given id. * - * @see <a href="https://dev.twitter.com/rest/reference/del/direct_messages/welcome_messages/rules/destroy">https://dev.twitter.com/rest/reference/del/direct_messages/welcome_messages/rules/destroy</a> + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/delete-welcome-message-rule">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/delete-welcome-message-rule</a> * */ @RemoteMethod(httpMethod = "DELETE", path = "/destroy.json") diff --git a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessages.java b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessages.java index db4f252f2..440de8ac0 100644 --- a/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessages.java +++ b/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/WelcomeMessages.java @@ -12,7 +12,7 @@ /** * Interface for /direct_messages/welcome_messages methods. * - * @see <a href="https://dev.twitter.com/rest/reference">https://dev.twitter.com/rest/reference</a> + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference</a> */ @Remoteable(path = "https://api.twitter.com/1.1/direct_messages/welcome_messages") public interface WelcomeMessages { @@ -20,8 +20,8 @@ /** * Returns a list of Welcome Messages. * - * @return WelcomeMessageListResponse - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/list">https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/list</a> + * @return {@link org.apache.streams.twitter.api.WelcomeMessagesListResponse} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-messages">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-messages</a> * */ @RemoteMethod(httpMethod = "GET", path = "/list.json") @@ -30,8 +30,8 @@ /** * Returns a Welcome Message by the given id. * - * @return WelcomeMessage - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/events/list">https://dev.twitter.com/rest/reference/get/direct_messages/events/list</a> + * @return {@link org.apache.streams.twitter.pojo.WelcomeMessage} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/get-welcome-message">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/get-welcome-message</a> * */ @RemoteMethod(httpMethod = "GET", path = "/show.json") @@ -40,8 +40,8 @@ /** * Creates a new Welcome Message that will be stored and sent in the future from the authenticating user in defined circumstances. Returns the message template in the requested format if successful. Supports publishing with the same elements as Direct Messages (e.g. Quick Replies, media attachments). * - * @return WelcomeMessage - * @see <a href="https://dev.twitter.com/rest/reference/get/direct_messages/events/list">https://dev.twitter.com/rest/reference/get/direct_messages/events/list</a> + * @return {@link org.apache.streams.twitter.pojo.WelcomeMessage} + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message</a> * */ @RemoteMethod(httpMethod = "POST", path = "/new.json") @@ -50,8 +50,7 @@ /** * Deletes a Welcome Message by the given id. * - * @see <a href="https://dev.twitter.com/rest/reference/del/direct_messages/welcome_messages/destroy">https://dev.twitter.com/rest/reference/del/direct_messages/welcome_messages/destroy</a> - * + * @see <a href="https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/delete-welcome-message">https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/delete-welcome-message</a> */ @RemoteMethod(httpMethod = "DELETE", path = "/destroy.json") public void destroyWelcomeMessage(@Query("id") Long id); diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/AccountSettingsResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/AccountSettingsResponse.json index 40b574789..4ef967f9c 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/AccountSettingsResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/AccountSettingsResponse.json @@ -4,11 +4,11 @@ "http://www.apache.org/licenses/LICENSE-2.0" ], "id": "#", - "javaType": "org.apache.streams.twitter.api.AccountSessionsResponse", + "javaType": "org.apache.streams.twitter.api.AccountSettingsResponse", "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-settings", "properties": { "always_use_https": { "type": "boolean" diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessageNewRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessageNewRequest.json new file mode 100644 index 000000000..0319dfa7f --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessageNewRequest.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType": "org.apache.streams.twitter.api.DirectMessageNewRequest", + "javaInterfaces": [ + "java.io.Serializable" + ], + "description": "https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-message", + "properties": { + "user_id": { + "description": "The ID of the user who should receive the direct message. Helpful for disambiguating when a valid user ID is also a valid screen name.", + "type": "integer", + "required": false + }, + "screen_name": { + "description": "The screen name of the user who should receive the direct message. Helpful for disambiguating when a valid screen name is also a user ID.", + "type": "string", + "required": false + }, + "text": { + "description": "The text of your direct message.", + "type": "integer", + "required": false + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessagesListRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessagesListRequest.json new file mode 100644 index 000000000..e5d2357c3 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessagesListRequest.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType": "org.apache.streams.twitter.api.DirectMessagesListRequest", + "javaInterfaces": [ + "java.io.Serializable" + ], + "description": "https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-messages", + "properties": { + "count": { + "description": "Max number of events to be returned. 20 default. 50 max.", + "type": "integer", + "required": false + }, + "since_id": { + "description": "Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.", + "type": "integer", + "required": false + }, + "max_id": { + "description": "Returns results with an ID less than (that is, older than) or equal to the specified ID.", + "type": "integer", + "required": false + }, + "include_entities": { + "description": "The entities node will not be included when set to false.", + "required": false, + "type": "boolean" + }, + "skip_status": { + "description": "When set to either true , t or 1 statuses will not be included in the returned user objects.", + "required": false, + "type": "boolean" + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessagesSentRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessagesSentRequest.json new file mode 100644 index 000000000..a8f0dee57 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/DirectMessagesSentRequest.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType": "org.apache.streams.twitter.api.DirectMessagesSentRequest", + "javaInterfaces": [ + "java.io.Serializable" + ], + "description": "https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message", + "properties": { + "count": { + "description": "Specifies the number of records to retrieve. Must be less than or equal to 200.", + "type": "integer", + "required": false + }, + "since_id": { + "description": "Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.", + "type": "integer", + "required": false + }, + "max_id": { + "description": "Returns results with an ID less than (that is, older than) or equal to the specified ID.", + "type": "integer", + "required": false + }, + "page": { + "description": "Specifies the page of results to retrieve.", + "type": "integer", + "required": false + }, + "include_entities": { + "description": "The entities node will not be included when set to false.", + "required": false, + "type": "boolean" + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventShowResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventShowResponse.json index 95fc31b0f..954af0f54 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventShowResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventShowResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/overview", "properties": { "event": { "type": { diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListRequest.json index f8b368ac1..4938794da 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/overview", "properties": { "count": { "description": "Max number of events to be returned. 20 default. 50 max.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListResponse.json index 66c456407..28ad45d75 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/EventsListResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/overview", "properties": { "events": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsRequest.json index 2b9868960..970d8065f 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FollowersIdsRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/followers/ids", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-ids", "extends": { "$ref": "FollowingIdsRequest.json" }, "properties": {} } \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsResponse.json index 03dd83ce4..7c32784e4 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersIdsResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/followers/ids", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-ids", "properties": { "ids": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListRequest.json index c5885799f..e85a62836 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FollowersListRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/followers/list", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-list", "extends": { "$ref": "FollowingListRequest.json" }, "properties": {} } \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListResponse.json index e8e46a1cf..314d15760 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FollowersListResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/followers/list", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-followers-list", "properties": { "users": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsRequest.json index fda54f867..9c62367ed 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendsIdsRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/friends/ids", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids", "extends": { "$ref": "FollowingIdsRequest.json" }, "properties": {} } \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsResponse.json index fc468419a..4b72550f9 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsIdsResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/friends/ids", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-ids", "properties": { "ids": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListRequest.json index 75bba94ff..2c0147c5f 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendsListRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/friends/list", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list", "extends": { "$ref": "FollowingListRequest.json" }, "properties": {} } \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListResponse.json index ac357aa30..fe03d4844 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendsListResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/friends/list", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friends-list", "properties": { "users": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipCreateRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipCreateRequest.json index 8e9d7297f..2b04e9fec 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipCreateRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipCreateRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendshipCreateRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://https://dev.twitter.com/rest/reference/post/friendships/create", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create", "properties": { "follow": { "description": "Enable notifications for the target user.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipDestroyRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipDestroyRequest.json index cda5b2008..e3d4b741f 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipDestroyRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipDestroyRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendshipDestroyRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://https://dev.twitter.com/rest/reference/post/friendships/destroy", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy", "properties": { "screen_name": { "description": "The screen name of the user for whom to befriend.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowRequest.json index e26402ccd..19ec1d57f 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendshipShowResponse", "javaInterfaces": ["java.io.Serializable"], - "description": "https://https://dev.twitter.com/rest/reference/get/friendships/show", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show", "properties": { "relationship": { "$ref": "../pojo/Relationship.json" diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowResponse.json index 966fe2c30..dc007521a 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipShowResponse.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendshipShowRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://https://dev.twitter.com/rest/reference/get/friendships/show", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show", "properties": { "source_id": { "description": "The user_id of the subject user.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipUpdateRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipUpdateRequest.json index 6525a7ece..91d5baa65 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipUpdateRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipUpdateRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendshipUpdateRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://https://dev.twitter.com/rest/reference/post/friendships/update", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/post-friendships-update", "properties": { "device": { "description": "Enable/disable device notifications from the target user.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsIncomingRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsIncomingRequest.json new file mode 100644 index 000000000..44b8a8b68 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsIncomingRequest.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "type": "object", + "javaType" : "org.apache.streams.twitter.api.FriendshipsIncomingRequest", + "javaInterfaces": ["java.io.Serializable"], + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-incoming", + "properties": { + "cursor": { + "description": "Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first page.", + "required": false, + "type": "integer" + }, + "stringify_ids": { + "description": "Many programming environments will not consume our Tweet ids due to their size. Provide this option to have ids returned as strings instead.", + "required": false, + "type": "boolean" + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsLookupRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsLookupRequest.json index f7d9ed7c9..0f01c2dc1 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsLookupRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsLookupRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/friendships/lookup", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup", "properties": { "user_id": { "description": "A comma separated list of user IDs, up to 100 are allowed in a single request. You are strongly encouraged to use a POST for larger requests.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsOutgoingRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsOutgoingRequest.json index 2adf1650a..d8c90cd4a 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsOutgoingRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/FriendshipsOutgoingRequest.json @@ -7,7 +7,7 @@ "type": "object", "javaType" : "org.apache.streams.twitter.api.FriendshipsOutgoingRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://https://dev.twitter.com/rest/reference/get/friendships/outgoing", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-friendships-outgoing", "properties": { "cursor": { "description": "Causes the list of connections to be broken into pages of no more than 5000 IDs at a time. The number of IDs returned is not guaranteed to be 5000 as suspended users are filtered out after connections are queried. If no cursor is provided, a value of -1 will be assumed, which is the first page.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchRequest.json index 60003277a..16afda1f4 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchRequest.json @@ -6,7 +6,7 @@ "id": "#", "javaType" : "org.apache.streams.twitter.api.GeoSearchRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/users/show/id", + "description": "https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search", "properties": { "lat": { "description": "The latitude to search around. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn’t a corresponding long parameter.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchResponse.json index 33acc9862..f8162620f 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/GeoSearchResponse.json @@ -6,7 +6,7 @@ "id": "#", "javaType" : "org.apache.streams.twitter.api.GeoSearchResponse", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/users/show/id", + "description": "https://developer.twitter.com/en/docs/geo/places-near-location/api-reference/get-geo-search", "properties": { "query": { "type": "object", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/MessageCreateRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/MessageCreateRequest.json index 4b23a970d..0d236bc68 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/MessageCreateRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/MessageCreateRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/post/direct_messages/events/new", + "description": "https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event", "properties": { "event": { "type": { diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesLookupRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesLookupRequest.json index 4306b6b73..763ea42aa 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesLookupRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesLookupRequest.json @@ -6,7 +6,7 @@ "id": "#", "javaType" : "org.apache.streams.twitter.api.StatusesLookupRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/statuses/lookup", + "description": "https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup", "properties": { "id": { "description": "A comma separated list of Tweet IDs, up to 100 are allowed in a single request.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesShowRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesShowRequest.json index 45278d90a..8fc51880d 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesShowRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/StatusesShowRequest.json @@ -9,7 +9,7 @@ "java.io.Serializable", "org.apache.streams.twitter.api.Statuses.StatusesShowRequestAnnotations" ], - "description": "https://dev.twitter.com/rest/reference/get/statuses/show/id", + "description": "https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-show-id", "properties": { "id": { "description": "The numerical ID of the desired Tweet.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/SuggestedUserCategory.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/SuggestedUserCategory.json new file mode 100644 index 000000000..b8f380eb0 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/SuggestedUserCategory.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType": "org.apache.streams.twitter.api.SuggestedUserCategory", + "javaInterfaces": [ + "java.io.Serializable" + ], + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-suggestions", + "properties": { + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "users": { + "type": "array", + "items": { + "type": { + "$ref": "../pojo/User.json" + } + } + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UpdateAccountSettingsRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UpdateAccountSettingsRequest.json new file mode 100644 index 000000000..dcfae4715 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UpdateAccountSettingsRequest.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType": "org.apache.streams.twitter.api.UpdateAccountSettingsRequest", + "javaInterfaces": [ + "java.io.Serializable" + ], + "description": "https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-settings", + "properties": { + "sleep_time_enabled": { + "description": "When set to true , t or 1 , will enable sleep time for the user. Sleep time is the time when push or SMS notifications should not be sent to the user.", + "type": "boolean" + }, + "start_sleep_time": { + "description": "The hour that sleep time should begin if it is enabled. The value for this parameter should be provided in ISO8601 format (i.e. 00-23). The time is considered to be in the same timezone as the user’s time_zone setting.", + "type": "integer" + }, + "end_sleep_time": { + "description": "The hour that sleep time should end if it is enabled. The value for this parameter should be provided in ISO8601 format (i.e. 00-23). The time is considered to be in the same timezone as the user’s time_zone setting.", + "type": "boolean" + }, + "time_zone": { + "description": "The timezone dates and times should be displayed in for the user. The timezone must be one of the Rails TimeZone names.", + "type": "string" + }, + "trend_location_woeid": { + "description": "The Yahoo! Where On Earth ID to use as the user’s default trend location. Global information is available by using 1 as the WOEID.", + "type": "string" + }, + "lang": { + "description": "The language which Twitter should render in for this user. The language must be specified by the appropriate two letter ISO 639-1 representation.", + "type": "string" + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UpdateProfileRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UpdateProfileRequest.json new file mode 100644 index 000000000..e8656de77 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UpdateProfileRequest.json @@ -0,0 +1,49 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType" : "org.apache.streams.twitter.api.UpdateProfileRequest", + "javaInterfaces": [ + "java.io.Serializable" + ], + "description": "https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile", + "properties": { + "name": { + "description": "Full name associated with the profile. Maximum of 20 characters.", + "required": false, + "type": "string" + }, + "url": { + "description": "URL associated with the profile. Will be prepended with \"http://\" if not present. Maximum of 100 characters.", + "required": false, + "type": "string" + }, + "location": { + "description": "The city or country describing where the user of the account is located. The contents are not normalized or geocoded in any way. Maximum of 30 characters.", + "required": false, + "type": "string" + }, + "description": { + "description": "A description of the user owning the account. Maximum of 160 characters.", + "required": false, + "type": "string" + }, + "profile_link_color": { + "description": "Sets a hex value that controls the color scheme of links used on the authenticating user’s profile page on twitter.com. This must be a valid hexadecimal value, and may be either three or six characters (ex: F00 or FF0000).", + "required": false, + "type": "string" + }, + "include_entities": { + "description": "The entities node will not be included when set to false.", + "required": false, + "type": "string" + }, + "skip_status": { + "description": "When set to either true , t or 1 statuses will not be included in the returned user objects.", + "required": false, + "type": "string" + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersLookupRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersLookupRequest.json index 3f37ae504..5d81ce1b0 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersLookupRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersLookupRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/users/lookup", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup", "properties": { "user_id": { "description": "A comma separated list of user IDs, up to 100 are allowed in a single request. You are strongly encouraged to use a POST for larger requests.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersSearchRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersSearchRequest.json new file mode 100644 index 000000000..a7fb6c6eb --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersSearchRequest.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "javaType" : "org.apache.streams.twitter.api.UsersSearchRequest", + "javaInterfaces": ["java.io.Serializable"], + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search", + "properties": { + "q": { + "description": "The search query to run against people search.", + "required": true, + "type": "string" + }, + "page": { + "description": "Specifies the page of results to retrieve.", + "required": false, + "type": "integer" + }, + "count": { + "description": "The number of potential user results to retrieve per page. This value has a maximum of 20.", + "required": false, + "type": "integer" + }, + "include_entities": { + "description": "The entities node will not be included in embedded Tweet objects when set to false.", + "required": false, + "type": "integer" + } + } +} \ No newline at end of file diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersShowRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersShowRequest.json index c7d04ce8c..7a384d963 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersShowRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/UsersShowRequest.json @@ -6,7 +6,7 @@ "id": "#", "javaType" : "org.apache.streams.twitter.api.UsersShowRequest", "javaInterfaces": ["java.io.Serializable"], - "description": "https://dev.twitter.com/rest/reference/get/users/show/id", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-show", "properties": { "user_id": { "description": "The ID of the user for whom to return results. Either an id or screen_name is required for this method.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/Webhook.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/Webhook.json index 4fe270526..16efe5545 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/Webhook.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/Webhook.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/webhooks/reference/get/account_activity/webhooks", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/get-webhook-config", "properties": { "id": { "type": "string" diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRequest.json index 7eadf7630..b674cb975 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/post/direct_messages/welcome_messages/new", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message", "properties": { "welcome_message": { "type": "object", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewResponse.json index 70620593d..d440deb94 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/post/direct_messages/welcome_messages/new", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message", "properties": { "welcome_message": { "$ref": "../pojo/WelcomeMessage.json" diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleRequest.json index c54ed7ea4..e1cf5cc81 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/post/direct_messages/welcome_messages/rules/new", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message-rule", "properties": { "welcome_message_rule": { "type": "object", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleResponse.json index 82921f4e7..e20598fea 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageNewRuleResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/post/direct_messages/welcome_messages/rules/new", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/new-welcome-message-rule", "properties": { "welcome_message_rule": { "type": "object", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListRequest.json index 0a585c71c..eaee4698d 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/list", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-messages", "properties": { "count": { "description": "Max number of events to be returned. 20 default. 50 max.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListResponse.json index ec89ccbf4..fd0d1defd 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessageRulesListResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/list", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-message-rules", "properties": { "welcome_message_rules": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListRequest.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListRequest.json index 1a501ee3c..2933cac16 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListRequest.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListRequest.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/list", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-messages", "properties": { "count": { "description": "Max number of events to be returned. 20 default. 50 max.", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListResponse.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListResponse.json index f42b65369..de29aae6f 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListResponse.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/api/WelcomeMessagesListResponse.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/direct_messages/welcome_messages/list", + "description": "https://developer.twitter.com/en/docs/direct-messages/welcome-messages/api-reference/list-welcome-messages", "properties": { "welcome_messages": { "type": "array", diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/AccountSettings.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/AccountSettings.json index 1f47385d5..0a9bf9e41 100644 --- a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/AccountSettings.json +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/AccountSettings.json @@ -8,7 +8,7 @@ "javaInterfaces": [ "java.io.Serializable" ], - "description": "https://dev.twitter.com/rest/reference/get/account/settings", + "description": "https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/get-account-settings", "properties": { "always_use_https": { "type": "boolean" diff --git a/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/DirectMessage.json b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/DirectMessage.json new file mode 100644 index 000000000..066099a66 --- /dev/null +++ b/streams-contrib/streams-provider-twitter/src/main/jsonschema/org/apache/streams/twitter/pojo/DirectMessage.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json-schema.org/draft-03/schema", + "$license": [ + "http://www.apache.org/licenses/LICENSE-2.0" + ], + "id": "#", + "type": "object", + "javaType" : "org.apache.streams.twitter.pojo.DirectMessage", + "javaInterfaces": ["java.io.Serializable"], + "description": "", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + }, + "entities": { + "$ref": "./tweet.json#properties/entities" + }, + "recipient": { + "type": "./User.json" + }, + "recipient_id": { + "type": "integer" + }, + "recipient_screen_name": { + "type": "string" + }, + "sender": { + "type": "./User.json" + }, + "sender_id": { + "type": "integer" + }, + "sender_screen_name": { + "type": "string" + }, + "text": { + "type": "string" + } + } +} \ No newline at end of file ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Fix JavaDoc links in streams-provider-twitter > --------------------------------------------- > > Key: STREAMS-533 > URL: https://issues.apache.org/jira/browse/STREAMS-533 > Project: Streams > Issue Type: Task > Reporter: Steve Blackmon > Assignee: Steve Blackmon > Original Estimate: 4h > Remaining Estimate: 4h > > On 9/26/17 Twitter pushed a new API reference website. As a result most of > the links in the java docs are now dead. The new reference is hosted at > https://developer.twitter.com/en/docs/api-reference-index - virtually every > endpoint has a new URL so they'll have to be researched and updated by hand. -- This message was sent by Atlassian JIRA (v6.4.14#64029)