MATLAB Central Interface for MATLAB
MATLAB Central Interface for MATLAB
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
Installation
- 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.
Quick Usage
-
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.
SDK Reference
Class | Method | HTTP request | Description |
---|---|---|---|
SearchApi | search | GET /v1/search | Search MATLAB Central areas for content matching specified query |
Search
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.
Errors
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.
Contribution
We are excited to hear any feedback you have for us and welcome contributions in the form of issues.
License
The license is available in the License file within this repository
Copyright © 2023 The MathWorks, Inc.
Cite As
Anusha Sridharan (2024). MATLAB Central Interface for MATLAB (https://github.com/mathworks/MATLAB-Central-Interface-for-MATLAB/releases/tag/v1.0.3), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
tests
toolbox
toolbox/internal
toolbox/internal/apiSchema
toolbox
toolbox/examples
Version | Published | Release Notes | |
---|---|---|---|
1.0.3.0 | See release notes for this release on GitHub: https://github.com/mathworks/MATLAB-Central-Interface-for-MATLAB/releases/tag/v1.0.3 |
|
|
1.0.2.0 | See release notes for this release on GitHub: https://github.com/mathworks/MATLAB-Central-Interface-for-MATLAB/releases/tag/v1.0.2 |
|
|
1.0.1 |
|
||
1.0.0.0 | See release notes for this release on GitHub: https://github.com/mathworks/MATLAB-Central-Interface-for-MATLAB/releases/tag/v1.0.0 |
|