[twitter] update GraphQL endpoints

pull/1352/head
Mike Fährmann 4 years ago
parent e1a12761d7
commit 5542a11c46
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -578,7 +578,7 @@ class TwitterAPI():
return self._pagination(endpoint, params) return self._pagination(endpoint, params)
def list_members(self, list_id): def list_members(self, list_id):
endpoint = "/graphql/3pV4YlpljXUTFAa1jVNWQw/ListMembers" endpoint = "/graphql/tA7h9hy4U0Yc9COfIOh3qQ/ListMembers"
variables = { variables = {
"listId": list_id, "listId": list_id,
"count" : 20, "count" : 20,
@ -588,7 +588,7 @@ class TwitterAPI():
return self._pagination_members(endpoint, variables) return self._pagination_members(endpoint, variables)
def list_by_rest_id(self, list_id): def list_by_rest_id(self, list_id):
endpoint = "/graphql/EhaI2uiCBJI97e28GN8WjQ/ListByRestId" endpoint = "/graphql/18MAHTcDU-TdJSjWWmoH7w/ListByRestId"
params = {"variables": '{"listId":"' + list_id + '"' params = {"variables": '{"listId":"' + list_id + '"'
',"withUserResult":false}'} ',"withUserResult":false}'}
try: try:
@ -597,7 +597,7 @@ class TwitterAPI():
raise exception.NotFoundError("list") raise exception.NotFoundError("list")
def user_by_screen_name(self, screen_name): def user_by_screen_name(self, screen_name):
endpoint = "/graphql/ZRnOhhXPwue_JGILb9TNug/UserByScreenName" endpoint = "/graphql/hc-pka9A7gyS3xODIafnrQ/UserByScreenName"
params = {"variables": '{"screen_name":"' + screen_name + '"' params = {"variables": '{"screen_name":"' + screen_name + '"'
',"withHighlightedLabel":true}'} ',"withHighlightedLabel":true}'}
try: try:

Loading…
Cancel
Save