question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Little stock API refinements

See original GitHub issue

For a my interface I am writing I need some kind of way to update the stock database directly. My motivation is to update the best_before_date of items without having to remove the item from stock and entering it again.

For my application I hacked it into the api:

diff --git a/grocy.openapi.json b/grocy.openapi.json
index eb6a246..199247b 100644
--- a/grocy.openapi.json
+++ b/grocy.openapi.json
@@ -2858,7 +2858,8 @@
                                        "userfields",
                                        "userentities",
                                        "userobjects",
-                                       "meal_plan"
+                                       "meal_plan",
+                                       "stock"
                                ]
                        },
                        "ExposedEntitiesPreventListing": {

This is probably not the best solution as this does not touch the stock_log table.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kriddlescommented, Jan 9, 2020

Ok I’ll take a look at removing the stock access and updating the endpoints.

1reaction
kriddlescommented, Jan 15, 2020

Sounds reasonable. Maybe related, there’s an inconsistency with the stock api: When querying /stock/products/{productId}/entries , you get an array with Stock items that have an “id” element. However, the PUT /stock/ api in master requires you to submit “stock_row_id”

I updated the “stock_row_id” to be named “id” for the put requirement

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comparing the best free financial market data APIs
So in this article, I compare a few of the top financial market data APIs' free tiers. I hope you find them useful....
Read more >
Refinement - browse API - eBay Developers Program
This type defines the fields for the various refinements of an item. You can use the information in this container to create histograms,...
Read more >
Best Stock APIs and Industry Landscape in 2022 - Medium
Wait! What about Yahoo Finance API or Google Finance API? Best Stock APIs to Use; Closing Thoughts. Stock API landscape.
Read more >
IEX Cloud Legacy API
IEX Cloud API Reference. IEX Cloud is a platform that makes financial data and services accessible to everyone. The IEX Cloud API is...
Read more >
Top 7 Best Stock Market APIs for Developers in 2022 - RapidAPI
In this article, we'll review the Best Stock Market APIs out there, including APIs such as Yahoo Finance, Alpha Vantage, Robinhood, and more ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found