No description
Find a file
2025-03-16 20:03:08 +01:00
src Initial commit 2025-03-16 20:03:08 +01:00
.editorconfig Initial commit 2025-03-16 20:03:08 +01:00
.eslintignore Initial commit 2025-03-16 20:03:08 +01:00
.eslintrc Initial commit 2025-03-16 20:03:08 +01:00
.gitignore Initial commit 2025-03-16 20:03:08 +01:00
.npmrc Initial commit 2025-03-16 20:03:08 +01:00
esbuild.config.mjs Initial commit 2025-03-16 20:03:08 +01:00
LICENSE Initial commit 2025-03-16 20:03:08 +01:00
main.ts Initial commit 2025-03-16 20:03:08 +01:00
manifest.json Initial commit 2025-03-16 20:03:08 +01:00
package-lock.json Initial commit 2025-03-16 20:03:08 +01:00
package.json Initial commit 2025-03-16 20:03:08 +01:00
README.md Initial commit 2025-03-16 20:03:08 +01:00
styles.css Initial commit 2025-03-16 20:03:08 +01:00
tsconfig.json Initial commit 2025-03-16 20:03:08 +01:00
version-bump.mjs Initial commit 2025-03-16 20:03:08 +01:00
versions.json Initial commit 2025-03-16 20:03:08 +01:00

Obsidian Data Fetcher

A plugin for Obsidian that allows users to fetch data from multiple sources (REST APIs, GraphQL, gRPC, RPC) and insert the results into notes.

Features

  • Support for multiple data sources:
    • REST APIs
    • GraphQL endpoints
    • gRPC services (via REST proxies)
    • RPC services
  • Two modes of operation:
    • Directly define queries within notes
    • Predefine endpoints in settings and reference them in notes
  • Automatic caching of query results to reduce redundant requests
  • Cache expiration settings
  • Manual refresh capabilities
  • Customizable headers for authentication

Installation

From Obsidian Community Plugins

  1. Open Obsidian Settings
  2. Go to Community Plugins
  3. Search for "Data Fetcher"
  4. Click Install, then Enable

Manual Installation

  1. Download the latest release from the releases page
  2. Extract the zip file into your Obsidian vault's .obsidian/plugins folder
  3. Enable the plugin in Obsidian settings

Usage

Method 1: Direct Query Definition

Create a code block with the language set to data-query and define your query in JSON format:

```data-query
{
  "type": "rest",
  "url": "https://api.example.com/data",
  "method": "GET",
  "headers": {
    "Authorization": "Bearer your-token"
  }
}
```

Method 2: Using Aliases

  1. First, define an endpoint alias in the plugin settings
  2. Then reference it in your notes:
```data-query
@my-api-alias
body: {"id": 123}
```

Configuration

Go to Settings > Data Fetcher to configure:

  • Cache duration
  • Pre-defined endpoint aliases
  • Default headers

Examples

REST API Example

```data-query
{
  "type": "rest",
  "url": "https://jsonplaceholder.typicode.com/posts/1",
  "method": "GET"
}
```

GraphQL Example

```data-query
{
  "type": "graphql",
  "url": "https://api.spacex.land/graphql",
  "query": "{ launchesPast(limit: 5) { mission_name launch_date_local } }",
  "variables": {}
}
```

Using Aliases

```data-query
@github-api
query: query { viewer { repositories(first: 5) { nodes { name } } } }
```

Support

If you encounter any issues or have feature requests, please file them on the GitHub issues page.

License

MIT