ventilaar
/
twitter_zuil
Archived
1
Fork 0

idk man i should realy start working on this project

This commit is contained in:
ventilaar 2020-09-29 22:42:35 +02:00
parent 13ede44b19
commit d006c1ce6a
3 changed files with 57 additions and 1 deletions

View File

@ -1,3 +1,22 @@
# twitter_zuil
school project
school project
api keys
### twitter:
- API key: NOKBXKUVfzXdG0fgkI0eDWF00
- API secret key: 3OFsRYQYFo2ZW5F7fZQ9Po6HHL4twVFPZAoy7aUum7cN0LZVZ1
- Bearer token: AAAAAAAAAAAAAAAAAAAAAJKZIAEAAAAAgzwsNgOr%2BU2a6AW2sH4f6fOLKTw%3DaLqp3wXYtINxGxcRoc2CiFuiiyHR1wnK09yPvGMxt0lVFHmshX
- Access token: 1308331480553267202-HE8MpxG7fGpAgHsbZaYdo5uHCurxDf
- Access token secret: TlEnSvUJefvrqP2wwNDFHTm5CdZiFz9YfQLTjkHoCqm9A
### openweathermap
- API key: 694725038b660e3c28d651840f384287
https://developer.twitter.com/en/docs/twitter-api
https://openweathermap.org/current
### 3rd party libraries(dependencies)
- TwitterAPI (by Geduldig)

View File

@ -0,0 +1,19 @@
import psycopg2
pghost = 'localhost'
pgdatabase = 'test'
pguser = 'test'
pgpassword = 'testing'
class customer_input():
def __init__(self):
conn = psycopg2.connect(
host=pghost,
database=pgdatabase,
user=pguser,
password=pgpassword
)
cur = self.conn.cursor()

View File

@ -0,0 +1,18 @@
from TwitterAPI import TwitterAPI
twitter_consumerKey = 'NOKBXKUVfzXdG0fgkI0eDWF00'
twitter_consumerSecret = '3OFsRYQYFo2ZW5F7fZQ9Po6HHL4twVFPZAoy7aUum7cN0LZVZ1'
twitter_accessKey = '1308331480553267202-HE8MpxG7fGpAgHsbZaYdo5uHCurxDf'
twitter_accessSecret = 'TlEnSvUJefvrqP2wwNDFHTm5CdZiFz9YfQLTjkHoCqm9A'
#twitter_API = TwitterAPI(twitter_consumerKey, twitter_consumerSecret, twitter_accessKey, twitter_accessSecret)
#r = twitter_API.request('statuses/update', {'status':'Another tweet'})
#print(r.status_code)
#print(r.json())
test = {'created_at': 'Tue Sep 29 20:39:57 +0000 2020', 'id': 1311043058117550087, 'id_str': '1311043058117550087', 'text': 'Another tweet', 'truncated': False, 'entities': {'hashtags': [], 'symbols': [], 'user_mentions': [], 'urls': []}, 'source': '', 'in_reply_to_status_id': None, 'in_reply_to_status_id_str': None, 'in_reply_to_user_id': None, 'in_reply_to_user_id_str': None, 'in_reply_to_screen_name': None, 'user': {'id': 1308331480553267202, 'id_str': '1308331480553267202', 'name': 'nszuiltest33332', 'screen_name': 'nszuiltest33332', 'location': '', 'description': 'this is a testing account for a school project because I MUST use twitter and no other services that also offer an API', 'url': None, 'entities': {'description': {'urls': []}}, 'protected': True, 'followers_count': 0, 'friends_count': 0, 'listed_count': 0, 'created_at': 'Tue Sep 22 09:05:14 +0000 2020', 'favourites_count': 0, 'utc_offset': None, 'time_zone': None, 'geo_enabled': False, 'verified': False, 'statuses_count': 3, 'lang': None, 'contributors_enabled': False, 'is_translator': False, 'is_translation_enabled': False, 'profile_background_color': 'F5F8FA', 'profile_background_image_url': None, 'profile_background_image_url_https': None, 'profile_background_tile': False, 'profile_image_url': 'http://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png', 'profile_image_url_https': 'https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png', 'profile_link_color': '1DA1F2', 'profile_sidebar_border_color': 'C0DEED', 'profile_sidebar_fill_color': 'DDEEF6', 'profile_text_color': '333333', 'profile_use_background_image': True, 'has_extended_profile': True, 'default_profile': True, 'default_profile_image': True, 'following': False, 'follow_request_sent': False, 'notifications': False, 'translator_type': 'none'}, 'geo': None, 'coordinates': None, 'place': None, 'contributors': None, 'is_quote_status': False, 'retweet_count': 0, 'favorite_count': 0, 'favorited': False, 'retweeted': False, 'lang': 'en'}
print(test['id'])