obsidian-api-request icon indicating copy to clipboard operation
obsidian-api-request copied to clipboard

FR: Update the file properties on load

Open elvarb opened this issue 8 months ago • 20 comments

Is your feature request related to a problem? Please describe. I want to utilize Shodan to document what it knows about certain assets there and would like to utilize dataview and other properties tools to create the bigger picture.

Describe the solution you'd like When an API Request block is triggered to update it should be able to update the file frontmatter with the values it returns the same way as you would format the output.

Describe alternatives you've considered Other alternatives I have looked at is using Templater and javascript, but this plugin is a much better fit.

Additional context Example code from the documentation

url: https://api.chess.com/pub/player/hikaru/stats
show: chess_daily -> last -> rating, chess_daily -> best -> rating
format: <p>Last game: {}</p> <strong>Best game: {}</strong>

Could then be used like this as an example

url: https://api.chess.com/pub/player/hikaru/stats
show: chess_daily -> last -> rating, chess_daily -> best -> rating
format: <p>Last game: {}</p> <strong>Best game: {}</strong>
properties: last-game: {}, last-rating: {} 

elvarb avatar Jun 14 '24 10:06 elvarb