Skip to content

mfonism/twAPIpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twAPIpy

twAPIpy /twʌpi pʌɪ/

A simple project for teaching how to make API calls with Python like a pro.

Usage

from twapipy import TwAPI

# your Twitter API keys as obtained from your Twitter developer account
API_KEY = "<insert>"
API_KEY_SECRET = "<insert>"

api = TwAPI(API_KEY, API_KEY_SECRET)

# make a get request to
# https://api.twitter.com/2/tweets/search/recent?query=python&max_results=100
# note that the endpoint you supply should not include 'https://api.twitter.com'
# also note that it should start with a slash
response = api.get(
    "/2/tweets/search/recent",
    params={"query": "python", "max_results": "100"}
)
response_data = response.json()["data"]
...

About

Twitter API in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages