updateInfoPleroma.py
def _get_pinned_tweet_id(self):
        """Retrieves the pinned tweet by the user

        :returns: ID of currently pinned tweet
        """
        url = self.twitter_base_url_v2 + '/users/by/username/' + self.twitter_username
        params = {"user.fields": "pinned_tweet_id", "expansions": "pinned_tweet_id", "tweet.fields": "entities"}
        response = requests.get(url, headers=self.header_twitter, params=params)
        if not response.ok:
            response.raise_for_status()
        try:
            data = json.loads(response.text)
            pinned_tweet = data['includes']['tweets'][0]
            pinned_tweet_id = pinned_tweet['id']
        except (JSONDecodeError, KeyError):
            pinned_tweet_id = None
            pass
        return pinned_tweet_id
Retrieves the pinned tweet by the user

        :returns: ID of currently pinned tweet
        
Retrieves the pinned tweet by the user
Retrieves the pinned tweet by the user
def _get_pinned_tweet_id(self):
        url = self.twitter_base_url_v2 + '/users/by/username/' + self.twitter_username
        params = {"user.fields": "pinned_tweet_id", "expansions": "pinned_tweet_id", "tweet.fields": "entities"}
        response = requests.get(url, headers=self.header_twitter, params=params)
        if not response.ok:
            response.raise_for_status()
        try:
            data = json.loads(response.text)
            pinned_tweet = data['includes']['tweets'][0]
            pinned_tweet_id = pinned_tweet['id']
        except (JSONDecodeError, KeyError):
            pinned_tweet_id = None
            pass
        return pinned_tweet_id
def _get_pinned_tweet_id ( self ) : url = self . twitter_base_url_v2 + '/users/by/username/' + self . twitter_username params = { "user.fields" : "pinned_tweet_id" , "expansions" : "pinned_tweet_id" , "tweet.fields" : "entities" } response = requests . get ( url , headers = self . header_twitter , params = params ) if not response . ok : response . raise_for_status ( ) try : data = json . loads ( response . text ) pinned_tweet = data [ 'includes' ] [ 'tweets' ] [ 0 ] pinned_tweet_id = pinned_tweet [ 'id' ] except ( JSONDecodeError , KeyError ) : pinned_tweet_id = None pass return pinned_tweet_id
Retrieves the pinned tweet by the user
Retrieves the pinned tweet by the user
"""Retrieves the pinned tweet by the user

        :returns: ID of currently pinned tweet
        """
ID of currently pinned tweet
ID of currently pinned tweet
self