Skip to content

Conversation

@AkashJana18
Copy link

minds_js_sdk

This pull request introduces a fully implemented SDK, minds_js_sdk, designed to interface seamlessly with the MindsDB API. The SDK enables developers to manage MindsDB resources programmatically, providing an easy-to-use and reliable interface for handling minds, datasources, and queries.

Key Features

  • Mind Management: Create, retrieve, update, and delete minds.
  • Datasource Management: Add, list, update, and delete datasources to support data ingestion and management.
  • Query Execution: Execute and retrieve query results, with built-in error handling for more reliable results.
  • Error Handling: Comprehensive error handling across methods provides clear feedback when issues arise.
  • Mocked API for Testing: Supports unit testing by mocking Axios, allowing tests to run without requiring actual API connections.

Implementation Details

  • Axios Integration: Used Axios for all HTTP requests, with a structured setup to handle common headers and configurations.
  • Helper Methods: Developed helper functions for streamlined error handling and response parsing.
  • Utility Functions: Includes helper functions for tasks like pagination, filtering, and request retries.
  • Environment Configuration: Allows configuration through environment variables for ease of setup in different environments.
    • Environment variables include:
      • API_KEY: Your MindsDB API key.
      • BASE_URL: Base URL for the MindsDB API.

Testing

  • Comprehensive Unit Tests: Implemented unit tests for all methods, covering success cases and error scenarios.
  • Jest with Axios Mocks: Tests use Jest with mocked Axios calls to simulate API responses, ensuring robust testing without requiring live API keys.

Documentation

  • Method Documentation: Each method is documented, with example usage provided to help developers get started quickly.
  • README: Includes a README.md file with installation instructions, setup, and basic usage examples for the SDK.

@AkashJana18
Copy link
Author

@quest-bot loot #18

@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Oct 26, 2024
@quest-bot
Copy link

quest-bot bot commented Oct 26, 2024

Quest PR submitted! image Quest PR submitted!

@AkashJana18, you are attempting to solve the issue and loot this Quest. Will you be successful?


Questions? Check out the docs.

@quest-bot quest-bot bot mentioned this pull request Oct 26, 2024
@chandrevdw31
Copy link

@AkashJana18 when I open the link for your java script sdk it gives 404 error. I can't seem to find the repo on your github profile. Can you send it to me please?

@AkashJana18
Copy link
Author

Sorry, that repository was private
I have changed the config now.
Can you please check @chandrevdw31
Here's the same link https://github.com/AkashJana18/minds_javascript_sdk

@chandrevdw31
Copy link

@AkashJana18 thanks I can see it now

@mindsdb-devops
Copy link

mindsdb-devops commented Oct 31, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@AkashJana18
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

mindsdb-devops added a commit that referenced this pull request Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚔️ Quest Tracks quest-bot quests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants