google-cloud-storage .Net 3.5 not support? - google-cloud-storage

Is there anyway to use google-cloud-storage APIs in VS 2008?
It shows Google.Apis.dll was built by newer version so can not run on my project when i trying to build my project.
I was trying to test the APIs from Google Cloud Storage.
var googleClientService = new BaseClientService.Initializer();
googleClientService.ApiKey = "ABcdefghUSftzxcvbnmEhLmGcZnfcE_12345678";
var storageService = new StorageService(googleClientService);
var getRequest = storageService.Buckets.List("demotest");

Sorrry, I don't believe there's a pre-built .NET client available for early versions of .NET. The source code of the library is public, though. You could perhaps try and build it, if you feel like a challenge. Alternately, the library is simply a small wrapper around a public, RESTful API. You could also invoke the Google Cloud Storage API directly with standard HTTP libraries, although you'll have to handle authorization.

Related

GCP Storage API upload files using Java 1.6

We require to upload files to GCP storage bucket using Java 1.6 version. As storage SDK library support starts with Java 1.7 or above, request to let me know the way forward to operate with GCP storage bucket.
I tried with apache http library by following the guidelines of setting required http header with token however faced issues with oauth token along with refreshing it without using GCP SDK.
Request to provide sample code or any reference to operate on GCP storage bucket using Java 1.6.
As you have been able to see in the documentation, the client library supports Java 7 and above. In addition, the Java version you are trying to use was deprecated more than a year ago as explained in this post. Therefore, I would recommend you to switch either to Java 7 or Java 8.
There are a few different client libraries available for Google Cloud for Java, but I believe they all require a minimum of Java 7 due to Oracle dropping support for Java 6.
The good news is that Google's OAuth client library for Java seems to only require Java 6. The bad news is that it requires the Google HTTP for Java library, the current version of which requires Java 7. However, that library supported Java 6 until around only dropped about 6 months ago, so you could most likely grab an older release and get the OAuth stuff working in Java 6, although I haven't tried.
That wouldn't get you a rich SDK client, but it would at least take care of your OAuth authentication for manually-crafted API requests.
Another option would be to use Google Cloud Storage's compatibility API, the XML API, which works with a variety of third party blob storage clients.

ModernHttpClient Not Compartible with Web Appication Project

i am currently using Restclient to send request via web api for xamarin, it works well with windows and ios but i doesnt work for andriod , i searched and found a nuget package that will help, called ModernHttpClient,so it changes my code from var httpclient = new HttpClient(); to var httpClient = new HttpClient(new NativeMessageHandler()); but when i install it for the web application i keep getting an error stating the package is not compatible with the project. but it installs ok in android,ios and windows. i tried uninstalling it from the web application but i doesnt work in the code unless it appears in all the project.
so i want to find the reason why the package is not compatible with the web appication or a solution to the Restclient request not working on android .
Unfortunately the product page for modernhttpclient on nuget.org doesn't list any dependencies, but changing the domain name of the URL to use fuget.org instead of nuget.org lists monoandroid, monotouch, portable-net45+winrt45+wp8+wpa81, and xamarin.ios10. Therefore, these are the target frameworks that the package supports.
Another way to check what TFMs (target framework monikers) a package supports is to find/download the nupkg and then open it as a zip file, or use NuGet Package Explorer to look for subfolders under lib/.
You didn't say what target framework your web app is using, but this is where things start getting very complicated and I don't understand it very well. .NET Framework TFMs are compatible with other .NET Framework TFMs of lower versions. Similarly .NET Core TFMs are compatiable with other .NET Core TFMs of lower versions. .NET Standard is a whole other complication. NuGet also supports fallback or alternate TFM compatibility, to allow .NET Core apps to use libraries targetting .NET Framework, but it's a best guess and might fail at runtime (maybe it's even possible to fail to compile, I'm not sure, but restore will succeed with a warning). Given you're not getting the warning, but instead an error, it suggests to me that portable-net45 is not compatible with net45 and therefore probably isn't compatible with whatever target framework you're using with your web app (unless your web app is targetting net40 or earlier).
Having said all that, when I was looking at the package to see which frameworks it targets, I saw that the whole point of the package is to use the platform native HTTP stack, instead of Xamerin's HTTP stack on the mobile platforms. Your web app isn't running on a mobile platform, it's running on either .NET Core or .NET Framework, so you shouldn't need the package. I suggest you use #if, #else and #endif to use NativeMessageHandler only on Android and IOS, and then use the default HTTPClient constructor (or use HttpMessageHandler) on other platforms.

IBM Bluemix - Kitura Swift - is missing a required environment variable: 'OPENAPI_SPEC'

I am stuck for the moment. I cannot obtain the source code for the mobile project and I do not know where is the problem. All my researches was without positive result.
My intention with IBM Bluemix is to develop myself a small project only in Swift (server side + iOS) because I am iOS mobile developer.
When I try to get the code for mobile project (iOS) I get these error:
Error Notification:
The Cloud Foundry App 'XXX' is missing a required environment variable: 'OPENAPI_SPEC'.
I want to use OpenWhisk SDK for iOS. I do not know where to set the variable OPENAPI_SPEC and what value to put in it.
I have setup a Cloud Foundry App started from "Runtime for Swift - Kitura" and a mobile project named started from "Code Starter - OpenWhisk".
Can you help me with some advice or some sample?
Thank you!
If you added a Swift server side Compute to your mobile project, you will need to add an environment variable called OPENAPI_SPEC to your backend to point to a valid Open API swagger document outlining the API.
This way when you download the project, it will auto-generate an SDK corresponding with your backend's Open API.
For instance, here is how you set the environment variable:
And here is a valid API doc that it's using (albeit not in the most elegant Open API compliant format yet but it works).
https://updatesdk.mybluemix.net/explorer/swagger.json
The idea is that the "project" concept takes an abstracted view of a Compute runtime (Cloud Foundry, Docker, etc.) and only cares that it exposes an API compliant with the Open API specification. Using that defined Open API spec, you can dynamically generate an SDK for a "project" when it's downloaded (for iOS, Android, etc.).
If your backend Compute exposes no Open API specification at this time, and you just want to download the code of OpenWhisk for iOS, you can just deassociate that backend Compute from your mobile project for now, and it should download the code. If you ever build on top of that backend and want to reconnect it in the future, you can add it and redownload at a later time (doing a git diff or using the Bluemix CLI SDK plugin to download an SDK from your Open API specification later in your project's lifecycle).

Azure - generating REST SDKs from IDL

I want to build REST-based web services on Microsoft Azure. I want to define my web service APIs using some kind of IDL from which client SDKs for various programming languages can be generated. Ideally, even client documentation, test code, and client sample code could be generated.
Outside the Azure world, there are tools like Swagger and RAML that attempt to do this. Does anyone know of an equivalent, existing or planned, in the Azure space?
Yes, this is coming very soon - http://blogs.msdn.com/b/windowsazure/archive/2013/10/23/microsoft-acquires-apiphany.aspx.

Azure deployment versions

I will try to make it simplify. I am using windows azure cloud to host our web services and databases. and these web services are accessible via URL: "https://server.mydomain.com"
now we made a few major changes to our model and hence web services as a whole. This breaks the API interface for older users. Now we want to deploy the latest version on URL: "https://server.mydomain.com/v2" so that old users can still access the older version.
I searched around SO and other resources but i couldnt find a definite answer how to deploy new version without messing up the old version.
Anything in right direction will be helpful.
In one of the projects I was working on, we built in a versioning scheme on top of our Web API. We used this tutorial to get started. I would recommend starting there.
Sorry for the generic answer, if you post some more specifics I will make some updates.
I'd suggest to deploy separate cloud service and use "v2.server.mydomain.com"