|
19 | 19 | use Psr\Http\Message\UriInterface; |
20 | 20 |
|
21 | 21 | /** |
22 | | - * @method \Psr\Http\Message\ResponseInterface accountRemoveProfileBanner() |
23 | | - * @method \Psr\Http\Message\ResponseInterface accountSettings() |
24 | | - * @method \Psr\Http\Message\ResponseInterface accountUpdateProfile(array $body = ['name', 'url', 'location', 'description', 'profile_link_color', 'include_entities', 'skip_status']) |
25 | | - * @method \Psr\Http\Message\ResponseInterface accountUpdateSettings(array $body = ['sleep_time_enabled', 'start_sleep_time', 'end_sleep_time', 'time_zone', 'trend_location_woeid', 'lang']) |
26 | | - * @method \Psr\Http\Message\ResponseInterface block(array $body = ['user_id', 'screen_name', 'include_entities', 'skip_status']) |
27 | | - * @method \Psr\Http\Message\ResponseInterface blocksIds(array $params = ['cursor', 'stringify_ids']) |
28 | | - * @method \Psr\Http\Message\ResponseInterface blocksList(array $params = ['cursor', 'include_entities', 'skip_status']) |
29 | | - * @method \Psr\Http\Message\ResponseInterface collectionsCreate(array $body = ['name', 'description', 'url', 'timeline_order']) |
30 | | - * @method \Psr\Http\Message\ResponseInterface collectionsDestroy(array $body = ['id']) |
31 | | - * @method \Psr\Http\Message\ResponseInterface collectionsEntries(array $params = ['id', 'count', 'max_position', 'min_position']) |
32 | | - * @method \Psr\Http\Message\ResponseInterface collectionsEntriesAdd(array $body = ['id', 'tweet_id', 'relative_to', 'above']) |
33 | | - * @method \Psr\Http\Message\ResponseInterface collectionsEntriesCurate(array $body = ['id', 'changes']) |
34 | | - * @method \Psr\Http\Message\ResponseInterface collectionsEntriesMove(array $body = ['id', 'tweet_id', 'relative_to', 'above']) |
35 | | - * @method \Psr\Http\Message\ResponseInterface collectionsEntriesRemove(array $body = ['id', 'tweet_id']) |
36 | | - * @method \Psr\Http\Message\ResponseInterface collectionsList(array $params = ['user_id', 'screen_name', 'tweet_id', 'cursor', 'count']) |
37 | | - * @method \Psr\Http\Message\ResponseInterface collectionsShow(array $params = ['id']) |
38 | | - * @method \Psr\Http\Message\ResponseInterface collectionsUpdate(array $body = ['id', 'name', 'description', 'url']) |
39 | | - * @method \Psr\Http\Message\ResponseInterface directMessages(array $params = ['since_id', 'max_id', 'count', 'trim_user', 'include_entities', 'skip_status']) |
40 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesDestroy(array $body = ['id', 'include_entities']) |
41 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesEventsDestroy(array $params = ['id']) |
42 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesEventsList(array $params = ['cursor']) |
43 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesEventsShow(array $params = ['id']) |
44 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesIndicateTyping(array $body = ['recipient_id']) |
45 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesMarkRead(array $body = ['last_read_event_id', 'recipient_id']) |
46 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesSent(array $params = ['since_id', 'max_id', 'count', 'page', 'trim_user', 'include_entities']) |
47 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesShow(array $params = ['id', 'trim_user', 'include_entities']) |
48 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesDestroy(array $params = ['id']) |
49 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesList(array $params = ['cursor']) |
50 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesNew(array $body = ['welcome_message']) |
51 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesRulesDestroy(array $params = ['id']) |
52 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesRulesList(array $params = ['cursor']) |
53 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesRulesNew(array $body = ['welcome_message_rule']) |
54 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesRulesShow(array $params = ['id']) |
55 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesShow(array $params = ['id']) |
56 | | - * @method \Psr\Http\Message\ResponseInterface directMessagesWelcomeMessagesUpdate(array $params = ['id']) |
57 | | - * @method \Psr\Http\Message\ResponseInterface favorite(array $body = ['id', 'include_entities']) |
58 | 22 | * @method \Psr\Http\Message\ResponseInterface favoritesList(array $params = ['user_id', 'screen_name', 'count', 'since_id', 'max_id', 'skip_status', 'include_entities']) |
59 | | - * @method \Psr\Http\Message\ResponseInterface follow(array $body = ['user_id', 'screen_name', 'follow']) |
60 | 23 | * @method \Psr\Http\Message\ResponseInterface followersIds(array $params = ['user_id', 'screen_name', 'stringify_ids', 'cursor', 'count']) |
61 | 24 | * @method \Psr\Http\Message\ResponseInterface followersList(array $params = ['user_id', 'screen_name', 'cursor', 'count', 'include_entities', 'skip_status']) |
62 | 25 | * @method \Psr\Http\Message\ResponseInterface friendsIds(array $params = ['user_id', 'screen_name', 'stringify_ids', 'cursor', 'count']) |
63 | 26 | * @method \Psr\Http\Message\ResponseInterface friendsList(array $params = ['user_id', 'screen_name', 'cursor', 'count', 'include_entities', 'skip_status']) |
64 | | - * @method \Psr\Http\Message\ResponseInterface friendshipsIncoming(array $params = ['cursor', 'stringify_ids']) |
65 | | - * @method \Psr\Http\Message\ResponseInterface friendshipsLookup(array $params = ['user_id', 'screen_name']) |
66 | | - * @method \Psr\Http\Message\ResponseInterface friendshipsNoRetweetsIds(array $params = ['stringify_ids']) |
67 | | - * @method \Psr\Http\Message\ResponseInterface friendshipsOutgoing(array $params = ['cursor', 'stringify_ids']) |
68 | 27 | * @method \Psr\Http\Message\ResponseInterface friendshipsShow(array $params = ['source_id', 'source_screen_name', 'target_id', 'target_screen_name']) |
69 | | - * @method \Psr\Http\Message\ResponseInterface friendshipsUpdate(array $body = ['user_id', 'screen_name', 'device', 'retweets']) |
70 | | - * @method \Psr\Http\Message\ResponseInterface geoPlace(string $place_id) |
71 | | - * @method \Psr\Http\Message\ResponseInterface geoReverseGeocode(array $params = ['lat', 'long', 'accuracy', 'granularity', 'max_results']) |
72 | | - * @method \Psr\Http\Message\ResponseInterface geoSearch(array $params = ['query', 'lat', 'long', 'ip', 'accuracy', 'granularity', 'max_results', 'contained_within']) |
73 | 28 | * @method \Psr\Http\Message\ResponseInterface helpConfiguration() |
74 | 29 | * @method \Psr\Http\Message\ResponseInterface helpLanguages() |
75 | 30 | * @method \Psr\Http\Message\ResponseInterface helpPrivacy() |
76 | 31 | * @method \Psr\Http\Message\ResponseInterface helpTos() |
77 | 32 | * @method \Psr\Http\Message\ResponseInterface homeTimeline(array $params = ['exclude_replies', 'trim_user', 'count', 'until', 'since_id', 'max_id', 'skip_status', 'include_entities']) |
78 | 33 | * @method \Psr\Http\Message\ResponseInterface lists(array $params = ['user_id', 'screen_name', 'reverse']) |
79 | | - * @method \Psr\Http\Message\ResponseInterface listsCreate(array $body = ['name', 'mode', 'description']) |
80 | | - * @method \Psr\Http\Message\ResponseInterface listsDestroy(array $body = ['list_id', 'slug', 'owner_screen_name', 'owner_id']) |
81 | 34 | * @method \Psr\Http\Message\ResponseInterface listsMembers(array $params = ['list_id', 'slug', 'owner_screen_name', 'owner_id', 'count', 'cursor', 'include_entities', 'skip_status']) |
82 | | - * @method \Psr\Http\Message\ResponseInterface listsMembersCreate(array $body = ['list_id', 'slug', 'user_id', 'screen_name', 'owner_screen_name', 'owner_id']) |
83 | | - * @method \Psr\Http\Message\ResponseInterface listsMembersCreateAll(array $body = ['list_id', 'slug', 'user_id', 'screen_name', 'owner_screen_name', 'owner_id']) |
84 | | - * @method \Psr\Http\Message\ResponseInterface listsMembersDestroy(array $body = ['list_id', 'slug', 'user_id', 'screen_name', 'owner_screen_name', 'owner_id']) |
85 | | - * @method \Psr\Http\Message\ResponseInterface listsMembersDestroyAll(array $body = ['list_id', 'slug', 'user_id', 'screen_name', 'owner_screen_name', 'owner_id']) |
86 | 35 | * @method \Psr\Http\Message\ResponseInterface listsMembersShow(array $params = ['list_id', 'slug', 'user_id', 'screen_name', 'owner_screen_name', 'owner_id', 'include_entities', 'skip_status']) |
87 | 36 | * @method \Psr\Http\Message\ResponseInterface listsMemberships(array $params = ['user_id', 'screen_name', 'count', 'cursor', 'filter_to_owned_lists']) |
88 | 37 | * @method \Psr\Http\Message\ResponseInterface listsOwnerships(array $params = ['user_id', 'screen_name', 'count', 'cursor']) |
89 | 38 | * @method \Psr\Http\Message\ResponseInterface listsShow(array $params = ['list_id', 'slug', 'owner_screen_name', 'owner_id']) |
90 | 39 | * @method \Psr\Http\Message\ResponseInterface listsStatuses(array $params = ['list_id', 'slug', 'owner_screen_name', 'owner_id', 'count', 'since_id', 'max_id', 'trim_user', 'include_rts', 'include_entities']) |
91 | 40 | * @method \Psr\Http\Message\ResponseInterface listsSubscribers(array $params = ['list_id', 'slug', 'owner_screen_name', 'owner_id', 'count', 'cursor', 'trim_user', 'skip_status', 'include_entities']) |
92 | | - * @method \Psr\Http\Message\ResponseInterface listsSubscribersCreate(array $body = ['list_id', 'slug', 'owner_screen_name', 'owner_id']) |
93 | | - * @method \Psr\Http\Message\ResponseInterface listsSubscribersDestroy(array $body = ['list_id', 'slug', 'owner_screen_name', 'owner_id']) |
94 | 41 | * @method \Psr\Http\Message\ResponseInterface listsSubscribersShow(array $params = ['owner_screen_name', 'owner_id', 'list_id', 'slug', 'user_id', 'screen_name', 'skip_status', 'include_entities']) |
95 | 42 | * @method \Psr\Http\Message\ResponseInterface listsSubscriptions(array $params = ['user_id', 'screen_name', 'count', 'cursor']) |
96 | | - * @method \Psr\Http\Message\ResponseInterface listsUpdate(array $body = ['list_id', 'slug', 'name', 'mode', 'description', 'owner_screen_name', 'owner_id']) |
97 | 43 | * @method \Psr\Http\Message\ResponseInterface mentionsTimeline(array $params = ['count', 'since_id', 'max_id', 'trim_user', 'skip_status', 'include_entities']) |
98 | | - * @method \Psr\Http\Message\ResponseInterface mute(array $body = ['user_id', 'screen_name', 'include_entities', 'skip_status']) |
99 | | - * @method \Psr\Http\Message\ResponseInterface mutesUsersIds(array $params = ['cursor', 'stringify_ids']) |
100 | | - * @method \Psr\Http\Message\ResponseInterface mutesUsersList(array $params = ['cursor', 'include_entities', 'skip_status']) |
101 | 44 | * @method \Psr\Http\Message\ResponseInterface rateLimitStatus(array $params = ['resources']) |
102 | | - * @method \Psr\Http\Message\ResponseInterface reportSpam(array $body = ['user_id', 'screen_name', 'perform_block']) |
103 | | - * @method \Psr\Http\Message\ResponseInterface retweet(string $id, array $body = ['trim_user']) |
104 | | - * @method \Psr\Http\Message\ResponseInterface savedSearchesCreate(array $body = ['query']) |
105 | | - * @method \Psr\Http\Message\ResponseInterface savedSearchesDestroy(string $id) |
106 | | - * @method \Psr\Http\Message\ResponseInterface savedSearchesList() |
107 | | - * @method \Psr\Http\Message\ResponseInterface savedSearchesShow(string $id) |
108 | 45 | * @method \Psr\Http\Message\ResponseInterface searchTweets(array $params = ['q', 'geocode', 'lang', 'locale', 'result_type', 'count', 'until', 'since_id', 'max_id', 'skip_status', 'include_entities']) |
109 | | - * @method \Psr\Http\Message\ResponseInterface statusesDestroyId(string $id, array $body = ['trim_user']) |
110 | 46 | * @method \Psr\Http\Message\ResponseInterface statusesLookup(array $params = ['id', 'trim_user', 'map', 'include_ext_alt_text', 'skip_status', 'include_entities']) |
111 | 47 | * @method \Psr\Http\Message\ResponseInterface statusesRetweetersIds(array $params = ['id', 'stringify_ids', 'cursor']) |
112 | 48 | * @method \Psr\Http\Message\ResponseInterface statusesRetweetsId(string $id, array $params = ['trim_user', 'include_my_retweet', 'include_entities', 'include_ext_alt_text']) |
113 | | - * @method \Psr\Http\Message\ResponseInterface statusesRetweetsOfMe(array $params = ['count', 'since_id', 'max_id', 'trim_user', 'skip_status', 'include_entities', 'include_user_entities']) |
114 | 49 | * @method \Psr\Http\Message\ResponseInterface statusesShowId(string $id, array $params = ['trim_user', 'include_my_retweet', 'include_entities', 'include_ext_alt_text']) |
115 | 50 | * @method \Psr\Http\Message\ResponseInterface trendsAvailable() |
116 | 51 | * @method \Psr\Http\Message\ResponseInterface trendsClosest(array $params = ['lat', 'long']) |
117 | 52 | * @method \Psr\Http\Message\ResponseInterface trendsPlace(array $params = ['id', 'exclude']) |
118 | | - * @method \Psr\Http\Message\ResponseInterface unblock(array $body = ['user_id', 'screen_name', 'include_entities', 'skip_status']) |
119 | | - * @method \Psr\Http\Message\ResponseInterface unfavorite(array $body = ['id', 'include_entities']) |
120 | | - * @method \Psr\Http\Message\ResponseInterface unfollow(array $body = ['user_id', 'screen_name']) |
121 | | - * @method \Psr\Http\Message\ResponseInterface unmute(array $body = ['user_id', 'screen_name', 'include_entities', 'skip_status']) |
122 | | - * @method \Psr\Http\Message\ResponseInterface unretweet(string $id, array $body = ['trim_user']) |
123 | 53 | * @method \Psr\Http\Message\ResponseInterface userTimeline(array $params = ['user_id', 'screen_name', 'since_id', 'count', 'max_id', 'trim_user', 'exclude_replies', 'include_rts', 'include_entities']) |
124 | 54 | * @method \Psr\Http\Message\ResponseInterface usersLookup(array $params = ['user_id', 'screen_name', 'include_entities', 'skip_status']) |
125 | | - * @method \Psr\Http\Message\ResponseInterface usersProfileBanner(array $params = ['user_id', 'screen_name']) |
126 | 55 | * @method \Psr\Http\Message\ResponseInterface usersSearch(array $params = ['q', 'page', 'count', 'include_entities', 'skip_status']) |
127 | 56 | * @method \Psr\Http\Message\ResponseInterface usersShow(array $params = ['user_id', 'screen_name', 'include_entities', 'skip_status']) |
128 | | - * @method \Psr\Http\Message\ResponseInterface usersSuggestions(array $params = ['lang']) |
129 | | - * @method \Psr\Http\Message\ResponseInterface usersSuggestionsSlug(string $slug, array $params = ['lang']) |
130 | | - * @method \Psr\Http\Message\ResponseInterface usersSuggestionsSlugMembers(string $slug, array $params = ['lang']) |
131 | | - * @method \Psr\Http\Message\ResponseInterface verifyCredentials(array $params = ['include_entities', 'skip_status']) |
132 | 57 | */ |
133 | 58 | class TwitterCC extends OAuth2Provider implements ClientCredentials{ |
134 | 59 |
|
135 | 60 | protected const AUTH_ERRMSG = 'TwitterCC only supports Client Credentials Grant, use the Twitter OAuth1 class for authentication instead.'; |
136 | 61 |
|
137 | | - protected ?string $apiURL = 'https://api.twitter.com/1.1'; |
| 62 | + protected ?string $apiURL = 'https://api.twitter.com'; |
138 | 63 | protected ?string $clientCredentialsTokenURL = 'https://api.twitter.com/oauth2/token'; |
139 | 64 | protected ?string $userRevokeURL = 'https://twitter.com/settings/applications'; |
140 | | - protected ?string $endpointMap = TwitterEndpoints::class; |
| 65 | + protected ?string $endpointMap = TwitterCCEndpoints::class; |
141 | 66 | protected ?string $apiDocs = 'https://developer.twitter.com/en/docs/basics/authentication/overview/application-only'; |
142 | 67 | protected ?string $applicationURL = 'https://developer.twitter.com/apps'; |
143 | 68 |
|
|
0 commit comments