First working draft
[x] implement dev tests
[x] implement POST /sessions/ for reloading pyRevit
[x] implement port configurations
[x] refactor server for better
[x] Find proper port number
[ ] Remote script run
[x] add make_response
from flask import Flask, make_response
app = Flask(__name__)
@app.route("/api/v2/test_response")
def users():
headers = {"Content-Type": "application/json"}
return make_response('Test worked!',
200,
headers=headers)
url_forfrom flask import Flask, redirect, url_for
app = Flask(__name__)
@app.route("/login")
def login():
return redirect(url_for('dashboard')
request.args Contains the query-string parameters of a request that hit our route. If we're building an endpoint that accepts a url parameter, for example, we can get this from the request as request.args.get('url’)callbackUrl (if request data has calbackUrl)
uiapp run in api contextAccept: text return a webpage with error results?!doc and uidoc to arguments