Skip to main content

Twitter X-Client-Transaction-Id generator written in python.

Project description

X-Client-Transaction-ID

Twitter X-Client-Transaction-Id generator written in python.

Discord

Reference :

Installation

Install XClientTransaction with pip

pip install XClientTransaction

Usage/Examples

python quickstart.py

OR

from x_client_transaction import ClientTransaction

response = None # get twitter home page response (check quickstart.py)

# Example 1
# replace the url and http method as per your use case
url = "https://x.com/i/api/1.1/jot/client_event.json"
method = "POST"
path = urlparse(url=url).path
# path will be /i/api/1.1/jot/client_event.json in this case

# Example 2
user_by_screen_name_url = "https://x.com/i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName"
user_by_screen_name_http_method = "GET"
user_by_screen_name_path = urlparse(url=url).path
# path will be /i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName in this case


ct = ClientTransaction(response)
transaction_id = ct.generate_transaction_id(method=method, path=path)
transaction_id_for_user_by_screen_name_endpoint = ct.generate_transaction_id(
    method=user_by_screen_name_http_method, path=user_by_screen_name_path)

print(transaction_id)
print(transaction_id_for_user_by_screen_name_endpoint)

Authors

Feedback

If you have any feedback, please reach out to us at hello@sarabjitdhiman.com or contact me on Social Media @iSarabjitDhiman

Support

For support, email hello@sarabjitdhiman.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xclienttransaction-0.0.6.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xclienttransaction-0.0.6-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file xclienttransaction-0.0.6.tar.gz.

File metadata

  • Download URL: xclienttransaction-0.0.6.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for xclienttransaction-0.0.6.tar.gz
Algorithm Hash digest
SHA256 dd113e4bcfe9dfd7b1e49501e7f8455a962d3a5db807a7d76d6ea1ca76707934
MD5 22097ac74bffc4d168388c2edd7a7a5b
BLAKE2b-256 9b87378e9023340252f95d75b1e1950abf45b814cf60f37494573df988ead762

See more details on using hashes here.

File details

Details for the file xclienttransaction-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for xclienttransaction-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d98b15e012285a4292d3826f6b5e5058bc2f2cc29d12bdccabfee7723a0cf1f2
MD5 b161e5dd23debf4592eeabaddc3fba0b
BLAKE2b-256 22bcbde05bdc6b12463cecda3bc9bba40a1abe1056e33a43293f915200d77be0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page