Querying Microsoft devops azure commits to display on an "update" page - asp.net

I'm reworking our companies management website and would like to display any commits or updates on our devops azure page on an "update" page for admins to view.
What would be the easiest way to do this?
Thanks

You can also check out Azure devops Rest api to retrieve the git commits for a project.
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?api-version=5.1
You probably need write codes to extract and display the required properties(eg. commiter, author, url, etc.) of
commits from the results.
You can check the examples in this document to learn how to make azure devops service rest api calls.
You can also check out the .NET client library. For git Commits you can refer to GitHttpClientBase.GetCommitsAsync Method.
Hope above helps!

Related

Pricing for google translate api

one of our clients want to use google translate in its web application which is built in asp.net C#. First of all, is its free version or paid version?
I found one reference and we have already tried it.
https://www.w3schools.com/howto/howto_google_translate.asp
The only concern is can we use without Api key or license or we need to purchase. Our asp.net code will be published in IIS and multiple users are there to access this URL.
Yes, it is a free service.
You can use it without API key or license.
It translates your site on front-end, and totally different from having a page with multiple languages.
Check https://cloud.google.com/translate/docs/reference/rest if you need server side translating and more options.

Microsoft Dynamics 365 and ASP.NET Core Web API

I am working on an ASP.NET Core 5 Web API project, and I have some actions that need approval from a specific user to be implemented.
For example: the user wants to update the price of a product, but this action needs approval from his manager to be completed.
I was trying to find a workflow engine that works well with .NET and since the organization that I'm working for already has Dynamics 365 and it has its own workflow engine, I'm trying to use it with the project to handle actions that need a workflow.
Any help or suggestions?
Thank you
This seems like a good fit for flow approvals.
In short, create a table in dynamics to track your request and trigger a flow approval off the create of the record.
See: https://learn.microsoft.com/en-us/power-automate/modern-approvals
The example shows SharePoint being used to trigger an approval, but that can simply be replaced by dataverse (the engine the d365 is running on)
Edit : this vid has a walk though of its use https://m.youtube.com/watch?v=VHiDP13U_HM

Github Enterprise API - determine if a user is dormant?

Running Github Enterprise 2.18. Is there any way to determine via the API that a user is dormant? I don't see a specific call for it anywhere...
To answer your question....
Running Github Enterprise 2.18. Is there any way to determine via the
API that a user is dormant?
No, it's not possible using GitHub API (Enterprise or not).
GitHub has a strict privacy agreement for it's users. Since repositories can
be public as well as private, you're out of luck getting dormancy info via their API.
GitHub's own help page mentions it in their "Reports" section:
If you need to get information on the users, organizations, and
repositories in your GitHub Enterprise Server instance, you would
ordinarily fetch JSON data through the GitHub API. Unfortunately, the
API may not provide all of the data that you want and it requires a
bit of technical expertise to use. The site admin dashboard offers a
Reports section as an alternative, making it easy for you to download
CSV reports with most of the information that you are likely to need
for users, organizations, and repositories.
Specifically, you can download CSV reports that list
all users
all users who have been active within the last month
all users who have been inactive for one month or more
all users whohave been suspended
all organizations
all repositories
The help page also goes on to show examples on how to invoke the report data via CURL (you could do this with other methods as well, like in Powershell, which I prefer)
curl -L -u username:password/token http(s)://hostname/stafftools/reports/dormant_users.csv
You could make use of that data, without the API and parse it into your application. The world is your oyster.

Create Connetor CMIS BonitaSoft

I'm working with BonitaSoft Community version 7.6.3 and I want to create a CMIS connector to list the folders and documents for version 5.2 of Alfresco. I noticed that for this version of Bonita many connectors that existed in version 5.9.1 disappeared. When I asked the question how could I list Alfresco's folders and documents indicated that I would have to create a connector, however when reading the documentation for UI Designer forms it is not possible and that the solution would be REST API extension. When I analyze information about how to create REST API extensions it only gives Performance, Efficiency and Teamwork. How can I get around this?
The REST API extension documentation page has been updated and now cover the community edition as well.
Note that connector are used when you need to interact between Bonita process execution and an external system. Execution of connectors happen on the Bonita server. When executed, a connector has access to a context that includes information about the current process definition, instance and task instance.
REST API extension are usually call from the user web browser. More precisely it is the forms or pages served by Bonita that will execute the REST API call. REST API is executed on the Bonita server but has no context information about the currently running process or task. If you need such information you need to provide them as part of the REST API extension.

How to integrate PayPal Express Checkout with ASP.NET Web Pages site ("Razor")

I have an ASP.NET Razor / Web Pages site that I need to integrate with PayPal Express Checkout. Edit: this integration requires more than just a simple PayPal-generated button, e.g., I need to dynamically set the price, item description, tax etc.
I am quite new to both Web Pages and PayPal integration so would like to ask what the preferred approach would be.
So far, I have found there are these options:
Use PayPal Helper for WebMatrix
Just read the PayPal spec and create a form with hidden fields etc.
Use some of the NuGet packages from PayPal
Inspire in some custom code like this one
No. 1 is probably some outdated code (both the release date and recent reviews suggest that), no. 2 will certainly work but I'll be on my own, I'm hoping that no. 3 would be the best answer but there are many of those NuGet packages and I haven't found any good examples yet, and 4 is an option if no other works.
Any suggestions? The goal is to have a simple form, below it my custom "Pay Now" button (preferably; could be also a PayPal-provided button) and when user clicks it, the website should redirect him to PayPal, process the payment notification / approval etc.
I realize this question is old, but if you're looking for SDKs provided by PayPal that support Express Checkout, then you have the following two options:
PayPal .NET SDK
This SDK (formerly known as the "RestApiSdk") is built on the newer PayPal REST APIs and provides support for Express Checkout through the Payments API. All API calls use an OAuth token for security and the calls (and associated code) are a bit cleaner than its Classic counterpart. While some aspects of the REST services are still not quite up to par compared to Classic (e.g. Subscriptions), the Payments portion of the REST APIs is mostly at parity with Classic. Moving forward, this is the SDK that PayPal will be investing in and improving, so it's recommended that any new integrations use this SDK.
Recently, the .NET SDK repo on GitHub was updated with a Wiki that should hopefully make it easier to get started using the SDK. Also, a lot of work has also been put into the included samples project to help show how to use SDK with various use cases. And if there's a use case that's missing or needs better/more explanation, definitely don't hesitate to let me know on there. :)
PayPal Classic Merchant SDK
The Merchant SDK has been around for awhile and all the classes are auto-generated from PayPal's publicly-available WSDL schema files. While it provides support for every Express Checkout-related feature, using it is a bit more cumbersome than the REST-based SDK.
PayPal is no longer actively supporting the Merchant SDK and will only be providing bug fixes when necessary. For this reason, PayPal doesn't recommend using this SDK for new integrations.
If you find a feature that you enjoy using in this SDK that isn't available in the REST counterpart, please let me know here or on GitHub. One issue we've noticed for people looking to switch is the REST API does not provide payment history details for payments made via Classic calls. The PayPal SDK team is currently looking into ways this support can be added to the REST-based SDKs to make it easier for developers to make the transition.
The only option you have is to call rest api from asp.net web pages.
You can find the source code of rest api at following places.
https://github.com/paypal/rest-api-sdk-dotnet
http://paypal.github.io/sdk/
Borek,
if you just want PayPal Express Checkout the easiest way to do it is to simply create a PayPal "Buy It Now" button. You don't need to code anything.
You can find out how to do it here https://developer.paypal.com/docs/classic/paypal-payments-standard/ht_create-pps-buttons/ but the basic steps are:
Create the button inside PayPal.
Copy the button code inside PayPal.
Paste it into your website/email whatever.
Hope that helps!

Resources