The attached patch allows one to pass additional fields to be fetched to stockapi_fetch().

It's pretty simple and does not interact with stockapi_insert() or the db schema.

CommentFileSizeAuthor
stockapi.module.extra_fields.patch958 bytesfp

Comments

izmeez’s picture

Is there a way to view these extra fields?

fp’s picture

It depends how you use it.

If you call stockapi_fetch() from a custom function, you should obviously be able to see them in the data that is returned by this function.

If it's being used within an existing module, if the module doesn't make use of the extra fields, then you simply won't have access to them because they are just not available.

izmeez’s picture

@fp Thanks. As you say this would need to be used further in some way.
To start with it would need to be saved in the database as part of stockapi or some other module.

joseph.olstad’s picture

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

New design in 7.x-2.x
Previous versions no longer work because yahoo shut it's service down
7.x-2.x has a new data source.
Major changes were required