Currently, the D7 branch of Stock is built to work against Dr. Claw's port of the StockAPI module.

I've pushed a new D7 branch of StockAPI. The attached patch makes Stock compatible with the current API.

CommentFileSizeAuthor
stockapi-compatibility-D7.patch1.91 KBbrianV

Comments

7wonders’s picture

I have applied the patch but am receiving the following errors:

Notice: Undefined index: GOOG in stockapi_load() (line 104 of /modules/stockapi/stockapi.inc).
Notice: Trying to get property of non-object in stock_do_quote() (line 337 of /modules/stock/stock.module).
Notice: Trying to get property of non-object in stock_process_data() (line 386 of /modules/stock/stock.module).
Notice: Trying to get property of non-object in stock_process_data() (line 386 of /modules/stock/stock.module).
Notice: Trying to get property of non-object in stock_process_data() (line 386 of /modules/stock/stock.module).
7wonders’s picture

And a number of notices when running cron:

Notice: Undefined offset: 1 in _stockapi_to_object() (line 164 of /modules/stockapi/stockapi.inc)

Followed by a big:

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'symbol' at row 1: INSERT INTO {stockapi} (symbol, name, last_trade_price_only, last_trade_date, last_trade_time, chg......

brianV’s picture

7wonders - anything that would be causing those errors is part of the rest of the module code, not the code that is touched by this upgrade patch. I would file those errors separately.

sst2001’s picture

Please explain what is the current status of the module.
I could not use it along with stockapi 7.x and since I am using drupal 7 I cannot have any access to the module.
Please help. Thx!!!

sst2001’s picture

Issue tags: +anchors not working

Please explain what is the current status of the module.
I could not use it along with stockapi 7.x and since I am using drupal 7 I cannot have any access to the module.
Please help. Thx!!!

waverate’s picture

Patch in o.p works.

descender’s picture

Thanks for the patch.

brianV, can you elaborate?

ehask71’s picture

I just posted a patch to stockapi as I was seeing a bunch of errors with the stockapi module

I will test this patch out

dakala’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)