This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# you need to install these libraries, firebase.py is included in the repo | |
import firebase | |
import requests | |
import json | |
################################################################################## | |
# Initialize this with your own firebase, url for example - "room-service-abc123"# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from firebase/EventSource-Examples/python/chat.py by Shariq Hashme | |
from sseclient import SSEClient | |
import requests | |
from queue import Queue | |
import json | |
import threading | |
import socket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shorturl(): | |
import requests | |
import json | |
link = input("Enter url: ") | |
query_params = {'access_token': 'your key goes here, use generic key only', | |
'longUrl': link} | |
endpoint = 'https://api-ssl.bitly.com/v3/shorten' |