how migrate to Gemini 5 .net API - gemini

I have a tool that communicates with Gemini platform using .net API
CounterSoft.Gemini.Commons, Version 4.0.1.3038
Assembly CounterSoft.Gemini.WebServices, Version 4.0.1.3038
Now Gemini is going to be updated on the site I'm connecting with. AFAIU I have to update .net Gemini API wrappers too.
The problem is that API has been changed and it is a little bit tricky to find method in the new version.
Is there any howto guide?
I've checked http://docs.countersoft.com/rest-api/ but unable to find replacement for IssuesService.GetMyWork() method. In 4th version it return all issues that belongs to current user. I've tried to use Reflector but it fails to find something like GetMyWork method
Regards,
oleksa

We had to go through the same process and couldn't find a guide for it. However, what we did for "My Work" is use the GetFilteredItems method and passed in the resource in the filter:
IssuesFilter filter = new IssuesFilter();
filter.Resources = "1"; // Your user id
var myItems = service.ItemService.GetFilteredItems(filter);

Related

.Net Core: what is the best version to use? SDK 2.1.301 or Runtime 2.1.1

what is the best one to work in .net core? SDK 2.1.301 or Runtime 2.1.1?
I am trying to create a webapi with dotnet, I run dotnet and set http://localhost:5000/api/values/get?Id=1 and fails telling me page not found
I don't know if it is the version of dotnet I installed, I used SDK.
The URL is wrong. It should be http://localhost:5000/api/values/1. That's specified in the controller method itself with a routing attribute :
The SDK inlcudes the runtime so there's no reason to worry about order of installation.
The SDK contains the tools and libraries needed to create and build a project, like dotnet new and dotnet build. It runs on top of the runtime, it doesn't provide its own.
// GET api/values/5
[HttpGet("{id}")]
public ActionResult<string> Get(int id)
{
return "value";
}
This means that the Get action will be called in response to the GET verb and the id parameter will be retrieved from the URL itself.
The runtime contains only the parts that run a program.
UPDATE
The URL just works with the default Web API template. To verify :
Create a new folder
Run dotnet new webapi to create a new Web API project
Run dotnet build to build it and then dotnet run
Paste http://localhost:5000/api/values/1 in any browser.
The response will be
value
UPDATE 2
Postman also works, once SSL certificate verification in Settings > General is disabled.
The Web API template comes with HTTPS preconfigured and works with a self-signed certificate. Calls to http://localhost:5000 will be redirected to https://localhost:5001.
In terms of the framework, there is no difference if you use SDK or runtime. The first one is designed for development, while the latter one for production environments.
Issue comes out from your project, routing for e.g., but difficult to say once you need to share more details. Mentioned framework variants are irrelevant here.

Need to tell users when update occurs

I want to notify all the app users to update the app (through a popup in the app itself) whenever there is a new version deployed in the stores. Can someone suggest the best way to do that?
Luckily, we do have solution for iOS app store
string url = "http://itunes.apple.com/lookup?bundleId=com.xxx.xxxxx";
HttpClient httpClient = new HttpClient();
Task<string> jsonString = httpClient.GetStringAsync(string.Format(
var lookup = JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonString.Result);
But Now I need to get the current version of App from Google Play Store?
Let's say you want to notify the users about a new version of the app every time they open the application, then you should just trigger a simple GET call to retrieve the latest version info or use a third party lib to act accordingly.
0 cost simple solutions
One option would be to ask the API (if there is any) if a new version is available - basically delegate the problem to someone else. If there is no backend the app could do the check itself. There are different options from having a simple txt file hosted somewhere with the latest app version to scraping App Store and Play Store for the current published version of the app.
Existing solutions
https://appgrades.io/
https://github.com/ArtSabintsev/Siren
Use Push Notifications to notify your users
You will find more if you google it
Platform specific solutions
For iStuff (Apple) you could use iTunes Search API as mentioned here
Other platforms may have their own APIs
Depends on the specific case you can decide what will work better for you.
P.S.: Be sure to handle the versioning correctly by bumping the app version on each release.

SonarQube Web Api Changes from 6.0 to 6.4

I was using "http://sonarserver:9000/api/resources?metrics=ncloc,bugs,vulnerabilities" to get the details of all the projects for sonar 6.0.
After upgrading to 6.4 this url does not work and I am not able to find the alternative for this under the web_api changes page.
Please let me know if anyone knows about an alternative to this.
Error: {"errors":[{"msg":"Unknown url : /api/resources"}]}
Per WebAPI documentation (embedded in your own SonarQube server, linked at the footer): api/resources/index is deprecated since 5.4 (i.e. a super long time ago).
The documentation even provides some guidance:
if you need one component with measures: api/measures/component
That will get you the measures you need for a given project. You can use other APIs to get the list of projects (e.g. api/components/search). See Web API docs for the full listing of possibilities.

How do I access AntiForgery.GetTokens() in ASP.NET MVC 3?

The tutorial Preventing CSRF by Mike Wasson, introduces a method called GetTokens() that is supposed to reside within the System.Web.Helpers.AntiForgery class (as confirmed on MSDN here).
I am using ASP.NET 4.0, C#, and MVC 3 and cannot find this method anywhere. It doesn't exist, and the MSDN page about the method doesn't not give any hints as to which version of the framework contains the GetTokens() method. Am I missing something? I left a comment on Mike Wasson's post, but he apparently doesn't read the comments there (at least not anymore) because I'm the second person to raise the question there and there are no responses.
Where can I find this method?
This method (as well as HttpRequestMessage class itself) is new to .NET 4.5. You most likely using an older version of this framework. But you can still manually iterate through the headers and check if the specific header is present.

Can you use WcfTestClient against WebApi?

This article suggests it was possible, or in the works, with some code that suggests it can be done, but I can't figure out what code needs to happen or the WcfTestClient's uri needs to be.
Here's the code from the article that makes me think I can do it:
// Metadata routes to support $metadata and code generation in the WCF Data Service client.
configuration.Routes.MapHttpRoute(
ODataRouteNames.Metadata,
"$metadata",
new { Controller = "ODataMetadata", Action = "GetMetadata" }
);
Is this feature implemented?
No, it does not work as you intend. WCF Test Client supports talking to SOAP-based services. OData is not supported in the current version.
Granted, as #Snixtor mentioned, you could create a SOAP service using ASP.NET Web API, including support for metadata (WSDL). But I really don't know of any good reason why anyone would want to do that.

Resources