Power Automate: Copy/Paste List Item Comments - httprequest

I’m immensely grateful for some help I received on Reddit, which helped me achieve partial success. I finally got a Comment’s text to copy from one list-item to another. It’s a huge step forward for me!
However, where I’m now stuck is that the end product attributes me as the commenter, and it sets the date of the comment as the date the copy/paste occurred.
I need help preserving not merely the text of the comment, but also the original commenter, and the original date the comment was made.
My Flow steps are:
⁠Send HTTP GET request
⁠2. Parse JSON
⁠3. Create new item
⁠4. Send HTTP POST request
The link below will take you to all the code. You can see the data from the original GET request. Then you can see what the second HTTP POST request is seeing as it's input. And then what it's finally outputting.
https://imgur.com/nSIKHTE
What do you think? Surely there is a way to preserve the text, commenter and date, yes? What am I doing wrong?

Related

Coinbase Webhooks: is there a list of all data available?

I am looking into the webhook notifications and I am struggling to find documentation...
I would need to find the different payload for the "data" in the notification response...
the documentation only have one example: https://developers.coinbase.com/api/v2#show-a-notification
it is almost impossible to built an app if I need to try and see every type of notification by myself... (trial and error approach :( )
any extra resource? any help here?
thank you all
On this page, there is a link that says
See full list of notifications and corresponding payload information
But guess what, it links to the pages in your OP.
Even CB's newest documentation doesn't outline the payload until you run a sample to get the result displayed in the docs page. Here is a simple example, just click Try It to see the payload. It's not a bad thing until you need to see the payload of a signed request, then it's a PITA...
I've never used their webhooks to know how the payload differs but considering their docs you may need to run each notification to see what to expect and save the result to refer to later.

How to get github edit history of issue and issue comments via api?

I only found api to get issue list, issue content, issue comments list and content, no issue content edit history, no issue comments edit history.
No, this cannot currently be done purely from the API.
However, if we reverse engineer the way GitHub loads past edits in the web interface, and do a bit of scraping, we can accomplish the same thing without the API. Unfortunately, this means that we don't have the reliability of an API - GitHub's web interface is liable to change at any time, breaking our code. But it's better than nothing!
So, first we need a log of all the edits for a comment. Let's do this with the comment https://github.com/seisvelas/crypsee/issues/1#issue-874033952 (from a test repo provided by the gentleman who set the bounty on this question). On order to get a log of this issue's comments, we will need to base64 encode the issue number with '05:' then the word 'Issue' at the beginning. Why '05:'? I have no idea. But it's always there and it won't work with out it. So we'll be base64 encoding the string "05:Issue874033952", which gives us MDU6SXNzdWU4NzQwMzM5NTI=
Great, now we insert MDU6SXNzdWU4NzQwMzM5NTI= into this URL scheme: https://github.com/_render_node/{BASE64 ENCODING HERE}/comments/comment_edit_history_log, resulting in a link to https://github.com/_render_node/MDU6SXNzdWU4NzQwMzM5NTI=/comments/comment_edit_history_log
Following that link, we see an edit history, but not the contents of the edits themselves:
However, this gives us the information we need! If we look at the HTML, we see that all edits prior to the current edit are defined as buttons with a link to that edit:
<button
type="button"
class="btn-link dropdown-item p-2"
role="menuitem"
data-edit-history-url="/user_content_edits/MDE1OlVzZXJDb250ZW50RWRpdElzc3VlRWRpdDo1MzIxODcxNzE="
>
The URL pointed to by the data-edit-history-url is the same URL loaded via the browser's networking tab when clicking to view a past edit in the web interface!
Unfortunately, if you attempt to view that page on it's own, you get a 404. It is intended to be viewed only from the web interface. But that's no problem, just go to the web interface, view one of the edits, and copy the headers it sends along. In my case I'm using Chromium, so I just find the request to the edit in my networking tab, right click and hit 'copy as Fetch request (nodejs)' and viola, with those headers I'm good to go!
For example, for the comment we've been using this whole time, I make that request and get back a bunch of HTML. The content of the original edit is near the end:
<ins><p class="rich-diff-level-zero">before edit</p></ins>
There it is! I could write a script to automate this, but then I'd be doing everything for you :3 Suffice it to say that with a day's work of cleverly organized scraping, this is roughly what you must to in order to view these revisions. If someone does make such a tool, the OSINT community will surely be immensely grateful!
To see the features of github api, it is better to read the following link
The best source to get the answer:
https://docs.github.com/en/rest/reference/issues
Check the issues you mentioned, ie issue comments, edit history issue, etc. in the link above
As far as I saw it is possible to receive issue comments but I did not see a section for edit history issue
I also suggest you see the following links for the edit history issue:
https://github.com/isaacs/github/issues/954

Getting data out of SAP information box with vba

I'm automating a process with VBA, and I'm using SAP Scripting to do so.
The process is basically go to VA01, input the Orders Data and save the order.
But there is a variant in saving the order that is cracking up my head.
The SAP displays a popup message with relevant informations about the order, and I need that information and can't figure out how to get the Text out of the infobox that is displaying when you save the order.
Infos are: Blocked on price, No limit etc... And when it displays that message, I need to save it on a TXT file (i've already got a code for that), I just need a help in manage how to get that text out of the infobox.
If you had an access to the messages you can use MESSAGE - INTO (check info about it)
if i got your task incorrect pls write here. Good luck
I reproduce here the answer of the OP (#zanniboni):
"Hey, thanks for your help. I managed to do what I wanted with this code session.FindById("wnd[1]/usr/txtMESSTXT1").Text".

Missing enrollment terms in Canvas LMS API

I am currently doing some work with the Canvas LMS REST API and have run into an issue when trying to retrieve a list of all enrollment terms defined in the system. When viewing the terms in the online system, I can see all the terms that have been created, from the first ones up to the furthest defined semester. However, when I try to get a list of terms using
GET /api/v1/accounts/:account_id/terms
I only receive a list of 10 terms, while the rest are missing. Does anyone know what could be causing this?
Additionally, is there a difference between a Term and an EnrollmentTerm object? I only see API calls for EnrollmentTerm objects, while a Term seems to be a subset of the data contained in an EnrollmentTerm that only gets passed within a Course. Could someone explain if there is an important difference here, and what I may be missing?
Lastly, could anyone point me towards some information about error codes that are returned from an API call? For example, when I use
POST /api/v1/accounts/:account_id/terms
with some associated parameters, I get a 400 bad request response. When the parameters are incorrectly named, I get a 500 response instead. Any guidance on this matter would be very helpful.
Let me know if there is anything I can do to help clarify things. Thanks for your help!
I got into contact with Canvas developers and found out that this was caused by how they paginate their API responses. Their default cap appears to be at 10 per response, but this can be extended up to 100 by adding ?per_page=100 at the end of the query like so:
POST /api/v1/accounts/:account_id/terms?per_page=100
Additional pages can be retrieved using the URLs returned in the Link header of the response. More info on that can be found here.
An example Link header would be:
<https://<canvas>/api/v1/accounts/:account_id/terms?page=1&per_page=10>; rel="current",
<https://<canvas>/api/v1/accounts/:account_id/terms?page=2&per_page=10>; rel="next",
<https://<canvas>/api/v1/accounts/:account_id/terms?page=1&per_page=10>; rel="first",
<https://<canvas>/api/v1/accounts/:account_id/terms?page=10&per_page=10>; rel="last"
The URLs in the Link header are only included when they are relevant, so the first page will not return a "prev" link and the last page will not return a "next" link, for example.

Sending Data to JS Form from iOS App

The Red Cross has a locator page where you can submit a zip code by means of a form and that runs through a JSP to return contact information for your local Red Cross office.
From an iOS app, I have the user's zip code and would like to run this process and get that contact information back... or at least the appropriate URL to link to. I was hoping I could find some way to pass the zip code by URL but it doesn't look like it's going to be that easy.
Could anyone offer some direction as to how to go about this? I've done some simple things with forms before but I'm not quite sure where to start with this one.
According to the <form> action parameter, that's the URL you have to post your data to:
http://www.redcross.org//portal/site/en/template.MAXIMIZE/ziplocator/;jsessionid=MWwKPvjSWmvz8p4XrRtNLVL0VCTM7fcwfnFnKHpwRhJTnwLMMDcv!-1938881463!-1334769155?javax.portlet.tpst=2bd907ea326f7e9e934afa36c23f78a0_ws_MX&javax.portlet.prp_2bd907ea326f7e9e934afa36c23f78a0_viewID=result&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken&vgnextoid=6d65e821cbdf9110VgnVCM1000002bf3870aRCRD
The field name is zipcode. The AFNetworking documentation is quite okay explaining how to send a POST request. I would also recommend the nsscreencasts series, he has an episode on AFNetworking as well.
I hope this helps. :)
You can use NSURLConnection to execute a post request and return the result, you may have to do some parsing of the result though depending on the format it is returned in.
Here is an example:
http://forums.macrumors.com/showthread.php?t=689884
NSURLConnection documentation:
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsurlconnection_Class/Reference/Reference.html