First of all, sorry if this is a duplicate, but I couldn't find any info after searching for a while
I want to code an Alexa skill from VSCode using Python, as I prefer it rather than coding on the browser. I tried following the steps on "offline tools"(image) but I've been struggling to get it working
Option A, extension:
When I open the Alexa Skill Toolkit(ASK) VSCode extension, sign in and try to import my existing project, it asks for some git credentials which I couldn't get after following this tutorial.
Manually making the petition from Python ends up with a 401 Response
(I don't know what the value of the Authorization header should
be)
Executing ask util git-credentials-helper didn't work either
Option B, CLI:
After installing NodeJS and ASK-CLI, i get a could not fetch origin error using
ask init --hosted-skill-id amzn1.ask.skill.myId
I probably just made a lot of dumb mistakes but I'm really confused rigth now, thanks in advance for the help
A "401" error code means you are unauthorized. I'm assuming you didn't try to put anything in that header because you didn't what what you should have put there. Here's a guide to get an access token for your authorization header: https://developer.amazon.com/en-US/docs/alexa/smapi/get-access-token-smapi.html
Related
Currently using the PythonAnywhere API to attempt to access a Python script I wrote that is hosted in a Virtual Environment in PythonAnywhere. Using the Bubble API Connector if that matters.
I figured out how to use the POST command in combination with "/api/v0/user/{username}/consoles/{id}/send_input/" to successfully send the text "python HelloWorld.py" to my PA console. However, I don't know how to get the API to actually have the console execute that command / text. Is there some text that represents hitting the 'Enter' button or something of that nature?
Sorry if this is a dumb question or has an obvious solution but I am pretty new to this.
Thanks in advance.
Tried new line tag "/n" as well as combing the PA forums, but no luck finding this specific topic.
Expecting my text to end up in the console (which is happening) and for it to Execute (not happening).
I'm developing a VSCode Extension.
And I wanna call APIs with OAUTH.
Please tell me how to call or sites showing samples.
=============================
I guess my issue is same with below sled.
Is it possible to Auth to an OAuth 2.0 API from inside a vscode extension
But I couldn't get solutions from here.
I resolved by myself.
I installed and used 'request' seeing below.
https://stormpath.com/blog/talking-to-oauth2-services-with-nodejs
The apis I would use need requests by 'post'.
Novice to Codemirror.
I have codemirror running on my server I have it set to Python mode. Can someone please suggest how I go about executing the code and showing the result on the page where I have written the python code
Thanks
Without knowing much about your setup, here's a general idea:
Use the getValue() method to get the code from your CodeMirror instance.
Assuming the code is a run-able Python script, you can either
(1) send the code to your back end with AJAX or a POST request and run it there. Or (2) you could run the Python script in the browser with a library like one discussed here.
If you ran it on the back end, you can send the result of running the code back as text or JSON with your preferred protocol. If you ran it on the browser, you should probably follow the guidelines for the specific library you used.
I want to deploy this example on glitch. I've added package.js and index.js to my glitch project and built successfully.
However, the code is missing a section to listen for HTTPS requests. In most node.js/express webapps, there is code to indicate which paths trigger which functions, but this is missing from the example. Can you explain to me how it should work and why that part is missing from this example?
It's not clear what do you mean by "the code is missing a section to listen" as the only main feature of index.js is to listen to requests and return information.
I suggest you check index.js and make sure that you getting requests to your end point on glitch.
Also, it would be helpful if you can share your glitch project over here at SO so we could see what you are doing.
Btw, you might want to double check that you have all the packages
I also created this simple example on Glitch - It's returning the current bitcoin price. Feel free to remix it and use the code there for your own action.
Good luck!
The part that "listens to requests" is
// The Entry point to all our actions
const actionMap = new Map();
actionMap.set(ACTION_PRICE, priceHandler);
actionMap.set(ACTION_TOTAL, totalHandler);
actionMap.set(ACTION_BLOCK, blockCountHandler);
actionMap.set(ACTION_MARKET, marketCaptHandler);
actionMap.set(ACTION_INTERVAL, intervalHandler);
assistant.handleRequest(actionMap);
where each ACTION is an action(in an intent) in Dialogflow and the handler is the corresponding function in your code.
I'd recommend you take a look at
https://codelabs.developers.google.com/codelabs/assistant-codelab/index.html?index=..%2F..%2Findex#0
If you want a good example of an assistant app, though this uses firebase instead of glitch.
I am trying to use this API to manage my automation test cases in Jira-Zephyr.
I am trying to get all the test cycle from my project, So as per the ZAPI technical doc I used
http://localhost:8080/jira/rest/zapi/latest/cycle?projectId=10002&versionId=10100
But it is not working, It says that it is a dead link.
I googled for search all the issue from project, So I got the below one
http://localhost:8080/rest/api/2/search?jql=project=10002
and it is working fine for me.
So as per this link I changed the above link
It is also not working.
How I can Find out all the test cycle present in the project?
this works for me with a local install of Jira + zapi, zephry add-ons
http://localhost:8080/rest/zapi/latest/cycle?projectId={{projectId}}&versionId={{versionId}}
try like this, def clientTestID = new RESTClient("https://XXXXXXXXXX.net/rest/zapi/latest/zql/executeSearch?maxRecords=9999&zqlQuery=cycleId=XXXXX")
This will work for sure if headers are properly defined