When I've to use the HEREMAPS REST API - api

I'm new in here maps and don't know
1- When I've to use the REST API instead of JavaScript API
as I know the REST API returns only xml or json object!
Does it mean I'll have to use the JavaScript API to do visual effects?!!!
2- also I don't know how to save the map to display it again to the user after he doing some changes on it.

1- When I've to use the REST API instead of JavaScript API as I know the REST API returns only xml or json object so,
Does it mean I'll have to use the JavaScript API to do visual effects and what are the advantages of using REST?!!!
[TCS] : The HERE Maps API for JavaScript is a set of programming interfaces that enable developers to build Web applications with feature rich, interactive HERE Maps at their center. Whereas HERE REST APIs provide a flexible and fast access to variety of map data and functionalities. The HERE Maps API for JavaScript 3.0 exposes the functionality of a collection of RESTful Web Services in the following four core components.
Yes, the REST API only provides responses in form of XML or JSON, to show it on a map you will need the Javascript API. You will find examples to explore on our playground on the link http://developer.here.com/api-explorer
2- How to create a drag-able route not a drag-able waypoint?
[TCS] : Dragable route is possible to implement , you will find an example on the following link
http://tcs.it.here.com/Examples/src/HLP3_Fleet.html
3- How to save the map to display it again to the user after he doing some changes?
[TCS] : We do not provide as part of our product portfolio to store any user related data once a session is terminated. A custom solution will have to be developed at your side if you would like to save any changes done on a map by a user and show these again when the user returns to the map.
If you would like to save the map as an image however that is possible using the 'Capture' functionality within the JS API. The following link also shows the Capture functionality

Related

How to build client side form to Post object in a db using API Platform entity in Symfony 6?

I recently started to learn Symfony 6 and API Platform and encountered this conundrum. I don't know what will be the best way to build client side form to Post object in db using API Platform entity in Symfony 6.
In a simple Symfony ORM project I would make form Type, add form validators and render form with a Twig.
But now I use Symfony + API Platform for backend and for a frontend I use Twig + Vue.js (for dynamic components). I have a single entity (articles) in the API Platform.
Since I use API Platform I shouldn't use form Type and instead I should somehow get form fields from Hydra context, right? I know there is Vue.js Generator for API Platform but I'm not sure if I should use it just to render one simple post form.
And related question:
Should I render form with Twig or should I get form on Ajax after I open "Add new article" modal window? In the second case what url should I use for Ajax request? Something like "/article/new-form"?

How to integrate wit.ai With my own chatbot application

I would like to create my own web chatbot and i like to integrate my app with wit.ai for natural language classification.I need to know how to integrate wit.ai service(through api call) with my application(any language in backend).i am using C# in front end.I have gone through the integration part Which posted in wit.ai website.But i don't know how to connect it .Could anyone send me a integration details little briefly
I think the short answer is its similar to how you would call any other APIs from your application server components. Wit exposes multiple APIs like message, speech and converse which you can call by passing the Authorization token and other payloads and make use of the API response in your application.
You can use message API if you are only interested in extracting
intent and other atributes of the sententense
Use speech for building voice based application and
Converse if you want to build a little more smarter app. Currently you can only pass text for converse APIs.Hoping they will introduce voice option for this soon.
Now to make things simpler, they have also provided SDKs in various languages like node-wit, pywit etc. So if you want to build your server side logic using on nodejs or python you can use these SDKs. The advantage is that you dont have to manage raw APIs calls and instead it is all managed by SDK. Also, other big advantage is that you can make use of runActions method which encapsulates converse API and make things simpler. If you want to build in nodejs then the messenger example is a good starting point. You can borrow all this logic/concept in your app and replace FB related calls etc with your custom bot. For Python you can look at the below link
https://github.com/wit-ai/pywit/pull/55
Also, you can explore the options like using other frameworks like botkit if you plan to integrate wit with other chatbots like FB messenger or slackbot as these frameworks provide more flexibility and ability to easily switch to different chatbots in future. But they don't seem to properly support the converse API of wit.
You are specifically looking for integration details. Since you are using c# for frontend app, natuarally the best option would be to use c# for backend as well. In which case you will be left with directly calling wit APIs from your backend as I think there are no SDKs in c#. If you want to make use of SDK in node or python etc then you will have to build a rest based backend (for example) which can be invoked from your c# application. I am currently working on a nodejs app and integrating it with wit using node-wit. I can share some code once its ready but i dont know when I will be able to finish it. For bootstrapping my application I have used this node application. If you have some understanding of node then you can look at the /server/controllers logic. Similar to this application I have built a witController which uses runAction to interact with wit and I am calling this from front-end when user submits a message to your bot. The biggest challenge in runAction is to figure-out a way to send back the wit response to your front-end and get follow up response from user. Wit sends the response in Send method as you can see in the node-wit's messanger example.
Hope this helps!

Any way to get a Restaurant menu from Yelp! API

Trying to extract some menu data from a restaurant on Yelp using the v2.0 API. The only thing i am getting via the API response is a menu_provider field which i don't know how to use - any ideas?
My understanding is that Yelp gets their menu information from Locu (and potentially other sources), so they won't share that via their API.
Per their documentation, they provide menu_provider and menu_date_updated, but not actual menu data in their API.
Documentation: http://www.yelp.com/developers/documentation/v2/business
TechCrunch article on partnership: http://techcrunch.com/2013/04/23/yelp-partners-with-locu-allowing-businesses-to-post-menus-daily-specials-photos-to-yelp-in-real-time/

Facepile with graph api

I want to display the list of the user's friends who made an Open Graph action, like cooking. I can do this with Facepile, but how can I do this with the Graph API in order to control how it's displayed?
I can't find the corresponding Graph API call. Is there a simple way in order to avoid multiple Graph API calls?
Facebook should make api for that, but there is not way currently. I asked the technical support in facebook.com for that. They have a plan to implemente in FQL, but not yet.
So, facepile is only way until now. Check http://developers.facebook.com/docs/reference/plugins/facepile/ and check other type of codes like javascript SDK or iframe.

How to add custom field in salesforce leads through rest api?

Hi
I am currently working on an application which is implementing salesforce.com REST api. I have done all the authentication part and received all the info needed. Now I want my application to push the leads into the customer's account. But the lead fields can be customized and different customer use their different custom fields, so any1 can suggest me how to add that custom field in my form which will be pushed to the customer's salesforce account.
Thanks
You can use the describe resource in the REST API to obtain the metadata about the Load object, including all the fields.
https://{someinstance}.salesforce.com/services/data/v20.0/sobjects/lead/describe
You can use the list of fields to drive your form, and to control what you subsequently POST to /services/data/v20.0/sobjects/lead to create the new lead.
Here's the link to the REST API pilot docs incase you haven't seen them
No idea if the REST API supports describe() calls, they're a way of querying for all metadata about table (columns, their types etc). In normal webservice API this info can be found at http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_calls_describesobject.htm#topic-title
the Metadata REST API was put on hold by Salesforce, so there is no REST API for Metadata (there is some limited support in the Tooling REST API, but not enough to create an object).
https://salesforce.stackexchange.com/questions/20763/creating-a-custom-object-using-rest-api