How to make a result for com.huawei.hmf.tasks? - huawei-mobile-services

In com.google.android.gms.tasks.Tasks there is a forResult method which returns a specific result for the task, how related this method to Huawei's tasks?
// return a null result task
Task<?> methodCallTask;
methodCallTask = Tasks.forResult(null);

Huawei have com.huawei.hmf.tasks.Tasks.fromResult(null);Similar to google.

The HMS Tasks API reference doc is located at Common-Task (huawei.com).
The GMS Tasks API reference doc is located at Tasks | Google Play services | Google Developers.
Compared both GMS Tasks APIs and HMS Tasks APIs. It looks like they don't have the exact same API of GMS Tasks.forResult(). The closely related HMS Tasks API might be getResult(). Common-Task (huawei.com)

Related

Upgrade to Google Analytics API v4 instead of waiting for new alpha API to become available?

I am currently on Google Analytics API v3. Since Google Analytics 4 (GA4) just came out, I am looking into upgrading to API v4, however, I have noticed that the API v4 does not include GA4 properties and the API that handles GA4 properties is currently in alpha (I believe it's Data Reporting v1).
Will it be more work for me to update my existing application to API v4 from v3, and then when the beta or general release for the Data Reporting v1 arrives, upgrade then, or should I wait to upgrade from API v3 to
I am under the impression that v4 doesn't have the ability to pull GA4 properties, however, since it runs on completely new endpoints and Google has mentioned all future development will be on v4 then I should just move to it so its less work when the newest API comes out with those features. Does that sound right?
Marshall,
You are correct, the Google Analytics Reporting API V4 cannot access GA4 properties, you need to use the Google Analytics Data API V1 in order to do this. New features development will only be done in the Data API. Both APIs are conceptually similar, but the decision mostly depends on which type of properties you need to access.
As a side note, I believe the Data API is slated to graduate to Beta in a matter of weeks.
Thanks,
Ilya
The Google Analytics Team

Deploy application in IBM Cloud using only Rest API

I am an intern and currently doing automation on a software. What I need to do is to automate the process of creating, and starting an application in the cloud foundry using Rest API (rest-assured). I can't start an app because to start it I need to upload bits. I searched for weeks and still cannot find how to do it. I can only use V2 of the Cloud Foundry API, because when I create an app using the V3 API it doesn't show in the dashboard. I don't know why so we decided to just leave it and use V2 instead.
My question is: Is there any way to create, and deploy/start an app using only Rest API with the V2 API of the Cloud Foundry API? If there is a way to do this by using V3 API, I'm willing to search for the solution to solve the issue.
Thank you very much.
I think others commented on your question to use the cf command line, but if you want to use whats behind the scenes of cf then you can refer to the REST API Docs. At the top the page there is a API version selector (I linked 2.9.0 since you mentioned V2).
More specifically, to create an app you can use the Create App Endpoint; then to upload the bits, you can use Upload Bits Endpoint.
I hope this helps. Definitely check out the main docs, there are tons of endpoints that might be useful. Good luck on your internship!
EDIT: Just in case you need the CF API URL its https://api.ng.bluemix.net
If you want to see how the cli uses the rest api behind the scenes you can temporarily set the environment variable BLUEMIX_TRACE with the command line EXPORT BLUEMIX_TRACE=TRUE.
Then you can try doing cf push or cf start, cf stop, etc, and you will see the http requests the CLI uses. This has helped me a lot versus digging through the CF documentation :). Hope it helps!
I solved it by combining V3 API with V2 API. I understand the upload bits in V3 API. I use link[1] mainly to start the app. I think you can't create a route in V3 API because I don't see any endpoint for that, so I use V2 API instead to create and assign. I also use V2 API to create my app because of what I stated in my question. Thanks for answering the question because without the answers given by good people here I can find the best way to solve this.
[1] Create an App using V3 : https://github.com/cloudfoundry/cloud_controller_ng/wiki/How-to-Create-an-App-Using-V3-of-the-CC-API
[2] V2 API doc : https://apidocs.cloudfoundry.org/3.1.0/routes/list_all_apps_for_the_route.html .
[3] V3 API doc : http://v3-apidocs.cloudfoundry.org/version/release-candidate/index.html#get-assigned-isolation-segment

Do I have to use API.AI to create an action for Google Home?

I have some experience building chat and voice agents for other platforms, but I’m not using API.AI to understand natural language and parse intents. Do I have to replace my existing solution with API.AI?
Not at all. The advantages of using API.AI in creating a Conversation Action include Natural Language Understanding and grammar expansion, form filling, intent matching, and more.
That said, the Actions on Google platform includes a CLI, client library, and Web Simulator, all of which can be used to develop an Action entirely independent of API.AI. To do this you’ll need to build your own Action Package, which describes your Action and expected user grammars, and an endpoint to serve Assistant’s requests and provide responses to your users queries. The CLI can be used to deploy your Action Package directly to Google, and you can host your endpoint on any hosting service you wish. Google recommends App Engine on Google Cloud Platform.
I found this explanation from the official page most helpful.
API.AI
Use this option for most use cases. Understanding and parsing natural, human language is a very hard task, and API.AI does all that for you. API.AI also wraps the functionality of the Actions SDK into an easy-to-use web IDE that has conveniences such as generating and deploys action packages for you.
It also lets you build conversational experiences once and deploy to many other platforms other than Actions on Google.
ACTIONS SDK
Use this option if you have simple actions that have very short conversations with limited user input variability. These type of actions typically don't require robust language understanding and typically accomplish one quick use case.
In addition, if you already have an NLU that you want to use and just want to receive raw text and pass it to your own NLU, you will also need to use the Actions SDK.
Finally, the Actions SDK doesn't provide modern conveniences of an IDE, so you have to manually create action packages with a text editor and deploy them to your Google Developer project with a command-line utility.
Google is pushing aggressively everybody to API.AI. The only SDK they have (Node.js) no longer supports expected events for instance. Of course, you don't need to rely on their SDK (you can talk to the API directly) but they may change the API too. So proceed with caution.

Get Watson Conversation Workspaces

I am using Watson Conversation services on Bluemix. We have multiple Conversation workspaces within the service to enable better segmentation of the problem space.
I need to load information on the set of available workspaces within the Conversation service (e.g. name, workspace ID) to allow me to target the appropriate Conversation API endpoint. I've been trying to find a Watson or Bluemix API to allow me to retrieve the information directly but have not had any success.
Does anyone know if it is possible to retrieve this information programmatically and if there are any best practices for doing so?
We don't have an exposed endpoint for this capability at this point. It is something being discussed internally, however.
The API for managing Conversation workspaces is now available. It is possible to list workspaces, to create/update/delete a workspace and to download an entire workspace. The API is supported by the Watson SDKs.
Using the new API, I wrote a small tool for managing Conversation workspaces. The tool shows the API in action. The source is available on GitHub to demonstrate how the API can be of use.

Where do I find Google.Apis.Contacts.v3 for .NET?

There is a lot of different Google API dlls for .NET, for example Google.Apis.Calendar.v3. But nothing for Contacts API.
Using older versions or other approaches is not a solution because I already use v3 of several APIs. I need to add a Contacts API.
The Contacts API v3 is supported by the the .NET library for the Google Data API:
https://code.google.com/p/google-gdata/source/browse/#svn%2Ftrunk%2Fclients%2Fcs%2Fsrc%2Fgcontacts
To learn more about its usage, please check the documentation:
https://developers.google.com/google-apps/contacts/v3/