I have a REST service that has many commands that can be called to return JSON data. I have a library of the DTO's that I use to build this JSON. I want to reference this library in my UWP app so that I can ensure they decode correctly. However I cannot reference the dll in my UWP app. I tried the backwards approach too, adding a UWP library to my REST service and referencing it in my UWP app, however then I cannot refrence it in the REST API. Any suggestions?
Move all your DTO's to a class library built using .Net Standard 1.4
This will allow you to share code between your REST service and UWP app.
Related
I created a restful web-app platform using yii2 framework. It is working with no problems using a browser. Now I'm developing a mobile-app with angular and ionic and I'm searching for some guide to help me splitting the request from browser and app. Using the browser the web-app is configured to have a html view response, how can I detect a mobile-app request to change response in JSON format in each controller/action?
It's my first mobile-app development.
I just fighted this same war this week and I ended up splitting the folders and generating a new yii-app with fresh controllers just for the api.
I tried creating the api folder inside the web backend project, but I had to much problems with redirections, and as I was working from Android emulator fueled by Expo it was almost impossible to reach the api inside my localhost from outside.
At the end in the API REST you just reuse the database connection, rest of files are new. So there is no much to win in placing it in the same folder/project.
By the way, read this documentation: Implementing RESTful Web Service APIs in Yii2
As a code example you could check my yii2 web app: https://github.com/jvidalv/fempoble
And the api that works with the web: https://github.com/jvidalv/api-fempoble
I understand that creation of Rest api documentation using swagger Ui generates a few jsons
Do other developers need to use swagger UI installation on their laptop to view these ?
What is the best way to view such a documentation
The general way is to host your own swagger ui instance on your servers, exposing the REST documentation. When all fails, and assuming you've enabled CORS, you can use the online petstore and paste the URL to you Swagger there.
I am trying to Connecting Salesforce with Adobe Air Application i.e. pulling data from Sales force to the AIR application. I tried this with Developerforce toolkit. But its not working. I tried the example from this following reference http://wiki.developerforce.com/page/Taking_Data_Offline_Using_Adobe_AIR . Please help me in this. And also please tell me is there any way to connect salesforce with AIR application.
Note: Im using Flashbuilder as IDE.
Thanks in Advance.
The best way to do this is to use the OAuth code from the provided toolkit and then to use the Rest API with the various AIR HTTP classes to do the rest yourself, there's libraries available for parsing the JSON to local actionscript objects.
We set up a web API for project internal usage.
I'm looking for a nice way to document our API. I've searched the web and found
IO Docs
Swagger
These tools read in JSON files that can be created automatically, e.g. for Java. Our API has grown and I like to create the JSON manually, but not by hand in a text editor. Is there a tool or frontend that eases the burden of creating the descriptive JSON manually?
On the other hand, what are recommendable tools for the documentation of a web API?
I work in a .NET (C#) shop and we use swagger to document our apis. We couldn't find any tools to do what your asking...so we just created our own. I don't think swagger is mature enough to spawn utility projects like that...yet.
It was not to difficult to create classes to represent the json objects described by the swagger documentation. We just take these instantiated classes and run them through a JSON serializer to get our individual json files describing our endpoints.
Best of luck!
I am trying to fetch access token and refresh token using the document specified here. While doing so, I am faced with an issue:
java.lang.NoSuchMethodError: com.google.api.client.json.JsonFactory.fromInputStream(Ljava/io/InputStream;Ljava/lang/Class;)
Where can I find the jar which contains this class and method?
The Google Drive Java client library is based on the Google APIs Java client library. Make sure you download it as well. The zip contains the library and all its dependencies.
Also make sure that you don't have conflicting versions of the Google Apis Client library in your compile/classpath as this method is only available in later versions.