I've been searching high and low on how to make use of Webhook in API.AI. I'm new to API.AI in general.
My objective is to integrate API.AI into my Swift Application which i have already done. I want to get a JSON Object from a webpage and use those data to manually add them as Entities/Intents/Response/etc by sending back a request to API.AIand then create them.
Tried posting on DialogFlow forums but i guess it's pretty inactive.
The whole workflow is..
Integrating API.AI into my Swift Application for users to use.
I have the base of the AI now.. Intents lead to Entities in a sense whereby users ask for a type of study, and an Entity [Studies] is triggered, so meaning from the Intent 'asking for a type of study' the response would be like Science, or something. This reply i want to get it from the JSON that i mentioned above, from a webpage. Is there any way to actually set these responses? Create entities etc, with my Swift Codes.
I hope it's clear enough.. And hope that anyone can point me in a direction as i can't seem to find any articles or somewhere to follow on it?
May be its late for answering this question, but few days back, I came across a similar situation. I countered it and wrote a tutorial series for the same. Here's the link for tutorial. It might be useful for those who are looking to use API.AI, or want to integrate it in iOS project.
Building a Chat Bot having AI is easy
Related
I've recently installed Walmart's API into my iOS app. The app's purpose is for the user to search for items using Walmart's API and then display the queried items to the user. However I am having a hard time finding any examples on how to use Walmart's API with Xcode and Swift language. Was curious if anyone could point me in the direction of how to properly use the API while using Swift language or if anyone has experience using the Walmart API in Xcode? I feel like it shouldn't be hard to accomplish what I am trying to do but right now I am a bit lost. All help and advice is appreciated in advance! Thanks.
Whenever An API is Created The Author gives out a Documentation, about the usage of the API, Requests Parameters etc.
So, Go through the Documentation of Your Needed API,
Once the Requests Are made in-app, they Generally respond you in JSON, XML etc.
Using these Incoming data you can Populate data in your APP
I know that someone mean will probably close this question for being opinion, but the truth is, I'm not after opinion as such, but actual facts about the correct way and how to do this.
I've been searching around for quite a time and I'm still unclear as to what direction to take. It seems there are a billion* libraries that I could use, but I want to know what would be the correct, proper supported method of achieving this.
Essentially, I have a very simple requirement to list and download files from Sites on our Office 365 subscription to an iOS application.
Initially, I looked at the REST interface for Sharepoint and, from a browser, was able to easily perform a GET to our site and receive and receie a response with meta data about the file, for example:
https://mytenantid.sharepoint.com/_api/web/getfilebyserverrelativeurl('/MyFile/Here/Document.txt')
I could also retrieve JSON output instead of XML by specifying an Accept header of application/json using the POSTMAN REST client for Chrome.
So far, so easy. Just the authentication to do outside of the browser and that's it.
Phew!!
I started by looking at Basic authentication, but wasn't sure if this is the right way to do it and even if it would work?
On looking further, it seems that actually, using OAuth might be the way to go. Apparently, you can either do this yourself (no idea how), or use a library (ADAL?) from Microsoft? Unfortunately, this all looks half baked will very little documentation that seems to work. It also requires the use of CocoaPods and workspaces and isn't just a simple library that I can copy to my project and start using (a la SwiftyJSON). There also seems to be a lot of other libraries around too.
I should mention that I'm using Swift, so I've tried converting code from Objective C to Swift (unsuccessfully) too. Apparently I can't use "readWithCallback" with an argument list that the code tells me I should actually use -- even a sample application I downloaded had the same issue.
I've also tried using node.js with a script (not a Web Application) and the documentation and number of libraries available for that is almost worse.
Any assistance to achieve this really simple capability would be hugely appreciated -- it's been driving me nuts.
Many thanks,
D.
*this might be a slight exaggeration.
Office 365 has a RESTful API that you can use any programming language to authentication and integrate in your app.
Here is a simple example for iOS connected app to office 365. The sample shows how to do this in Objective C and SWIFT.
https://github.com/OfficeDev/O365-iOS-Connect
If you want to full iOS samples for office 365 connected apps, Check out this link:
https://msdn.microsoft.com/en-us/office/office365/howto/starter-projects-and-code-samples
Enjoy :)
I'm not exactly sure what this is called and so I'm not sure how to search for it on google correctly. I tried searching: "How to create a facebook wall swift", "A page where everyone can comment on swift", and "how to make a wall with users being able to post stuff swift". The most results were about Taylor Swift and making a fake Facebook profile. Though some may find this helpful, I, on the other hand, did not :(
So this is what I am trying to accomplish. I want to create a "wall" (I'm sure there is a better terminology for this) where users can post comments. So it's not like a facebook wall where you can post only on another user's "wall". I want a universal wall where any user can post a comment. Could anybody point me to the right direction?
Maybe some part of the Parse documentation or, perhaps, another Stack Overflow post?
This is not swift but C# but at least it can point you to the right direction:
http://www.joshgreenwald.com/journal/make-a-message-board-with-mvc5-and-signalr2
It is using C#, ASP.net MVC, and SignalR. You might want to look up especially this thing called SignalR because people use it to make the wall thing like you said, for instantaneous, real time communications like wallposts and comments.
I recommend using Parse for you backend database. Its super simple and very powerful. You can find some great tutorials for it too. Here's one that's relevant Swift & Parse Twitter like App
Alright — this sort of question shows my naïveté but I am asking it nonetheless so I don't venture down the wrong rabbit hole while trying out this app.
I'm making what amounts to a news app. Imagine taking a Wordpress blog and fitting it to iOS. Now, here's my question — what sort of feed / architecture should I be using to push information from my Wordpress server to my app? I would assume RSS using AFNetworking, but that seems to cause some rough edges, and all tutorials that I see end up pushing to a web view instead of a scrollview with nice, rendered text. Plus, none of the same tutorials seem to have anything further than the initial feed (loading more than the initial 10 stories given, for example).
I've already committed a few hours to trying the RSS / AFNetworking approach, but is there a significantly better alternative that I just haven't come across. (Note that I do have access to the back-end of my Wordpress site, i.e. it isn't somebody else's)
If you are building an iOS app that connects to WordPress, I suggest you to access the website data by an API instead of feed, then you can hit the API from your app and manipulate the data as you want.
If you have access to the WordPress backend, check the Thermal API which is a plugin that will probably solve your problem.
Cheers,
I would suggest that you look at https://wordpress.org/plugins/json-rest-api/ this is to be added to the core of wordpress so it would seem that is the way to go I think.
By the way I am working on the same type of thing as you.
I think the most popular Wordpress API is the one that comes with Jetpack. You can find its documentation here: https://developer.wordpress.com/docs/api/
If you just want read access, then i think the easiest way to do so is by using: https://github.com/evermeer/AlamofireJsonToObjects/blob/master/AlamofireJsonToObjectsTests/WordpressTest.swift
If you also want write access, then you have to implement Oauth2. For that you can select a library from: https://cocoapods.org/?q=oauth
How could I access a website and turn components of the website into strings. For example taking information from Facebook posts. I have done a little searching but can't find any good tutorials or anything useful.
Try looking at this tutorial. It should get you more familiar on the subject and start you off on the right track.
As it states at the beginning of the tutorial...
How to Parse HTML on iOS
Let’s say you want to find some information inside a web page and
display it in a custom way in your app. This technique is called
“scraping.” Let’s also assume you’ve thought through alternatives to
scraping web pages from inside your app, and are pretty sure that’s
what you want to do. Well then you get to the question – how can you
programmatically dig through the HTML and find the part you’re looking
for, in the most robust way possible? Believe it or not, regular
expressions won’t cut it! Well, in this tutorial you’ll find out how!
You’ll get hands-on experience with parsing HTML into an Objective-C
data model that your apps can use.
http://www.raywenderlich.com/14172/how-to-parse-html-on-ios