How can I use my own api to other platforms? - rest

I made a json api with using this => https://www.django-rest-framework.org/tutorial/quickstart/
All the articles I read teach the creation and use of api within its own platform, what I need is what I produce on the web, use it to in other platforms. I made my api but no idea about how to import it in other platforms..
so how can I use my own api in my c# windows form application or my flutter project
Any link, guide etc.

First of all you should be clear about why you need an api. If you need to transfer data from one system to another, pick a way that you know you can operate on both sides.
JSON or XML are just ways of representing data, first think about what you need and how can you transport that data between systems...After that the implementation should be clear.

Related

How to connect API as data source in Tableau?

I need to use two data sources. One is SQL and another one is the response from a rest API.
I tried to implement WDC, but it needs an HTML and user need to interact with UI and getting the response.
But I don't want to create a html page.
Is there any way to use an API response as a data source in Tableau?
The short answer is that you can not use API directly as a data source but you should build a pipeline to transform this into flat-file o populate a database table.
The alternative answer is to use Python to connect to the REST API. You can choose to use TabPy or follow some pre-build solution like this one. Personally, I don't know how the performances could be.

Validate if English word is valid as in found in dictionary Flutter Dart

Developing a Dart Flutter app. I need to validate if an English word that the user inputted is in the dictionary or not.
Is there a package or API interface to Wordnet or similar dictionary?
Is it possible to get from the dictionary of word is verb, adjective or noun?
First of all you will have to find an API, if you find one, then you will have to communicate with it by using the 'http' package of Flutter and by creating your implementation.
If no API is available and I think it is the case (I'm not 100% sure), then you have two options.
The first one is to create a scraper for the dictionaries or the website, you can use the WordNet web interface(http://wordnetweb.princeton.edu/perl/webwn) and use the web_scraper plugin to try to access and retrieve the data (make sure you have the rights to do so).
The second option (for me the best), is to create your own API knowing that WordNet offers to download their database file under license.(https://wordnet.princeton.edu/download)
You can use a web framework(Express.Js https://expressjs.com/fr/ is quite simple) depending on the language you use to create your api rest using the WordNet database file or by creating a database with this file.
Clearly, it's complicated but not impossible, the last option is the most complex and the first one is rather unstable...
I specify that this answer is only my opinion and maybe there is another solution, if yes I let then other person answer.

Api to Api Comunication and data transformation

Good day,
I want to communicate between two Web Api's, the first web api lets call Api1 not written by me and that api interacts with my data base to spit out information needed.
I have web api2 which would be written by me and why i have this is because my application needs data in certain kind of format (.dll) format.so api2 purpose is to get the information from api1 and then transform or package my data in a way that the my application would understand.
The question, is this possible?. can i use wrappers, so when i get my information from api1 then i wrap my information in the desired format before sending it off to the application. Does anyone have any other suggestions ?
Thank you in advance,
What you describe is possible but the requirements are too vague to give a useful answer.
The file extension doesn't really mean anything so not sure why you need .dll format for the message. I would use a standard format like Json or Xml. Or if using datawindow you could simply do saveas on sending side (or comma delimited, tab delimit) and file import on receiving end, so many options.
Too vague.
Async or Sync interface?
Files transferred via REST, OLE, DDE, or files written to location on server?
Are the files/data transferred specific to a logged in user?
How much data is being transferred, rows of information or configuration data? Answer will help in deciding on appropriate format & best method.
What type program is API #1 not in your control? That is important factor.

Generating Dynamically OpenTok Session ID from iOS

I am using OpenTokSDK for iPhone (using it Natively)
I have made the code for calling but just there is one problem.:-
I have to statically Add the SessionID. But i want to generate the ID Dynamically.
How can I do this ?
Please help!
Thanks In Advance
Full disclosure: I am a developer for TokBox.
The only safe way to get session ID and token credentials to the device is by developing an application server that suits the specific needs of your app. We have a number of server-side SDKs available on GitHub (link) that will interface with the OpenTok server API to generate this data.
Note well the server-side SDK is enough to get your credentials generated, but not all devices will be on the same session, so things like user management and application workflows are all considerations that cannot be easily written to an open source library.
That said, we did try to make some of these examples more clear by writing code examples on our blog (link). You can relieve much of the overhead of writing your own application server (no doubt a daunting task, especially the first time around) by leveraging one of the third party signaling services available, like Parse and Pusher, to name two.
Wobbals is correct, and In addition to what Wabbals has mentioned, generating sessions/tokens is very simple, the sample code required for each server language (PHP, NodeJS, C#, Ruby) is located in OpenTok's Github page.
Furthermore, if you choose not to have server side code and use Parse to handle your back-end, there is a wonderful writeup about how to use Parse's cloud code module for OpenTok to generate sessions and tokens.
Good Luck!
I strongly felt that the tokbox tutorial was quite basic but had steeper learning curve. So I ended up wrote out my own app-cum-tutorial.
Though late, I felt compelled to post here:
How To write your first iPhone Video Chat App using parse and opentok(tokbox)

Getting data from remote sql table on iphone

I am a beginner at both iPhone programming and SQL, yet I have basic knowledge of them.
I am planning to do an application that would plot a graph from data taken from a database of the server of my company. I know how to plot, I know how to extract data from an sql table, but what I don't know is how to access the server.
So do I have to go through some kind of oracle-like application ?
This may seem like a very stupid question because it might not even be possible but any answer will be appreciated.
Thanks !
Go through a web service for example a PHP page that returns JSON (or XML, but JSON is easier to parse).
I can highly recommend this tutorial
Once you have your web service, you can use NSURLRequest/NSURLConnection to download the data and use a JSON framework to parse it. Or, if you're using XML you can use NSXMLParser.
See this apple code for more info on downloading using NSURLConnection.
The best way for this will be, using APIs at server end that handle the client request and perform database interaction, so transfer of data among device and server, take place through XMLs that will be secure as well as fast.
It is definitely possible to contact a server (I can't imagine what would happen without that!). What you are looking for is NSURLConnection. Have a look at the example provided by Apple.