The toolbox provides easy to use MATLAB® functions that simplify the process of making requests to the MATLAB Central (MathWorks® Community) APIs. Whether you are using the APIs for data-analysis/reporting or for building custom MATLAB apps, the toolbox provides for a smooth integration.
- MATLAB Central Interface for MATLAB
- Install the toolbox by using the Add-on explorer in MATLAB or by downloading the MATLAB_Central_Interface_For_MATLAB.mltbx file attached to the latest release on GitHub, then doubleclicking on it.
-
Create a MATLAB script or live-script called 'Quickstart'.
-
Add the following lines of code to your script
searchResults = SearchApi.search(scope="matlab-answers");
items = searchResults.items
-
Save and Run the script.
-
If the code executed successfully, you should see the 'items' being displayed which calls the Seach endpoint from the MATLAB Central Public APIs.
This is just a quick overview -- install and look at gettingStarted.mlx and the examples directory for more information on using the Toolbox.
Class | Method | HTTP request | Description |
---|---|---|---|
SearchApi | search | GET /v1/search | Search MATLAB Central areas for content matching specified query |
The Search collection offers a single method called search
which offers a powerful way to programmatically search MATLAB Central.
If you are looking to get data from different MATLAB Central areas like MATLAB Answers, File Exchange, Cody, Community Highlights, Community Contests and Blogs with a single call, this would be the function to use. The function also supports many optional parameters that allow you to further filter the data returned, including limiting the scope to specific MATLAB Central areas.
When the API returns a non 2XX response code, an ApiError is thrown. The ApiError object is an extension of the MException object and contains all the fields from MException and additional retrievable fields with information on how to handle the error. See API Documentation for more details on possible error codes.
We are excited to hear any feedback you have for us and welcome contributions in the form of issues.
The license is available in the License file within this repository
Copyright © 2023 The MathWorks, Inc.