Where can I get watsonPI api documentation? - personality-insights

I was searching for API documentaion for Watson PI and came across https://cloud.ibm.com/apidocs/personality-insights#service-endpoint from the main page which leads to no where as the page is not available.
Any idea where can I get the documentation for the same?

It seems that the service is being deprecated and maybe this is the reason why you cannot find anything relevant. They mention to consider Watson NLU instead.
https://cloud.ibm.com/docs/personality-insights?topic=personality-insights-overviewDevelopers

Related

What's the stock way of learning APIs for Dart/Flutter?

So there are a ton of dart packages that do all the heavy lifting regarding API handling but I am looking for the ground-up approach to learning API's and how they are handled within the Flutter framework. Wondering if there are any sources/tutorials on how to do so. With the exception of google's own documentation.
You can go through the official website to handle APIs in flutter-
https://docs.flutter.dev/cookbook/networking/fetch-data
and here's a good documentation of basic flow of API integration-
https://mobikul.com/http-api-calling-in-flutter/
Hope it will work for you.

How to document websockets?

Currently, I'm working on a project where I using websockets, in my past projects where I've been using mostly RESTful standard that was simple to document using Postman or Swagger, but actually I've spotted issue because Postman and Swagger seem to don't support WebSockets.
My question is how you're documenting WebSockets? Any information will be helpful but I'm mostly seeking some tool that will allow me to store documentation and share it with others.
The only thing that I've found is https://hoppscotch.io/
UPDATE 2022: Postman introduced new tools for documenting APIs including websockets and grpc what exactly resolves this issue and provides great tools to document further APIs.
tl;dr use AsyncAPI for it.
Here are some learning materials:
WebSocket, Shrek, and AsyncAPI - An Opinionated Intro
Creating AsyncAPI for WebSocket API - Step by Step
From API-First to Code Generation - A WebSocket Use Case
Official example of AsyncAPI document for real WebSocket API: Gemini API. For preview in AsyncAPI Playground click here.
YouTube presentation from EDASummit called An Opinionated Intro to AsyncAPI with WebSocket and Shrek and live stream that covers the first two articles mentioned above.
I've been googling some time for a searching solution for documenting WebSockets, and my answer is some kind of disappointing - Postman, OpenAPI or RAML don't support WebSocket documentation. So the only rational way to document parts of software that are using WebSockets is to write technical documentation by hand.
Checked examples on bigger organizations like Slack and so on, and they use the same practices for documenting real-time sockets, just write technical documentation by hand, I don't know how good that solution is but basically it will work so it's fine.

Where is the documentation for the Google Analytics API JavaScript client library?

I have spent days looking for proper comprehensive documentation for the JavaScript client library for the Google Analytics API. The only bits I could find was this page: https://developers.google.com/analytics/devguides/reporting/core/v4/rest/ which has all of ~20 completely uninformative words on the page, and https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/web-js, which does have some actual JavaScript, but nothing like documentation. It just illustrates two or three functions using the client API.
Is there nowhere that they actually list the full API? How are we supposed to know what functionality is available?!
Then there are the pages in this section: https://developers.google.com/analytics/devguides/reporting/core/v4/basics#request_body which list a lot of query samples, but don't explain how to use any of this in a client library. Is there any practical information on how to get started with accessing the Analytics API anywhere?
Thanks
The Analytics API is language agnostic, the google js client library docs apply to all of Google's APIs. Every client libarary is built around the discovery service API which describes the entirety of whats is available.
V3 API discovery call
Analytics Reporting Discovery call
How to use a client library is centrally documented and applies to every Google API.
Analytics Specific
There are lots of languages and client libraries and the Analytics API team cannot support every language. Instead they make available comprehensive reference docs which describe what endpoints are available. Once you learn how to use a particular client library calling the individual API endpoints happen in the same why.
That being said every endpoint they have is documented in JS.
The Analytics Mangement API is well documented in JavaScript. the Open source Google deomos and tools is built with it.
The Analytics Reporting API Samples page has documentated examples in JavaScript. You even linked to a Quickstart guide which should help you understand how to use the client library.
Can you expound more on what you'd expect in terms of documentation?
Final tip
If you load the analytics client library
gapi.client.load('analytics', 'v3').then(...)
In the chrome console you can then just start playing with it dynamically:
gapi.client.analytics.managment.[hit tab]
will list all the management API methods available.

Writing an api-doc for Swagger

I'm trying to use the Swagger UI, and it says that I should begin by writing an api-doc that describes the exact api for a REST api. The problem is that I have no idea what this means. Is this document written in plain English? Or is there a certain format that will be able to generate the UI?
Thank you!
Swagger is a specification for describing REST APIs. Documentation of the specification can be found here - https://github.com/swagger-api/swagger-spec.
Generally, there are two ways to document your API. If you already have an existing API with code, you can use any of the existing libraries (https://github.com/swagger-api/swagger-spec#additional-libraries) to integrate into your code and generate documentation at run time. Some of those libraries also offer offline generation of such docs.
If you're looking to design an API, or would rather not integrate another library into your application, you can use https://github.com/swagger-api/swagger-editor either locally or with the online version - http://editor.swagger.io.
Once you have the documentation, you can use Swagger UI to visualize and test it.

Rest with oauth2

I'm using this library with my codeigniter rest service. Basically, I have a REST_controller, that is inherited, and checks for a valid token, using that library.
All I want is to provide an API to secure some of the API methods.
Now, I'm lost reading most of the specs for oauth2 and tutorials regarding that library.
Can anyone help me, proving good tutorials, examples and explanations on I can achieve, a simple login system and then, call user authenticated methods.
Thanks in advance
Just constructed a pictorial tutorial for OAuth2.0 specs. In case you may find this useful:
Tutorial : http://restful-fundamentals.blogspot.in/2013/04/oauth-20-introducation.html
Also adding a web app demo demostrating the different Authorisation Grants flows. It contains the path to the google code as well as some other tips.
http://restful-fundamentals.blogspot.in/2013/04/svn-repository-oauth20-spectifications.html
***Your comments at that blog may be useful to me to improve the contents there*
I did a demo using spring MVC and spring security you can find source code here