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
## Bugs | |
1. After installing gin dependencies on my computer, I ran into this bug when trying to run the main.go file: | |
```main.go:6:3: no required module provides package github.com/gin-gonic/contrib/static: go.mod file not found in current directory or any parent directory``` |
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
from flask import Flask, render_template | |
import requests, json | |
app = Flask(__name__) | |
@app.route("/api-explorer", methods=['GET', 'POST']) | |
def makeRequest(): | |
response = requests.post('https://api-ssl.bitly.com/v4/bitlinks', json={"long_url":"https://dev.bitly.com/v4/#operation/getBitlinksByGroup"},headers={'Authorization': 'Bearer <ACCESS_TOKEN>'}) | |
print("My new bitlink: " + json.loads(response.text)["link"]) |