Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Security model. #12

Closed
wants to merge 4 commits into from
Closed

Added Security model. #12

wants to merge 4 commits into from

Conversation

homeworkprod
Copy link

I guess it makes sense to include this in the official library.

The approach to define which keys' values should be treated as which type has its limitations, though. Maybe a per-model list of (key, type_function) pairs is more flexible?

While I was able to fetch all available securities for all of the current user's accounts via session.query_api_object Security, '/rest/securities', nil, 'GET', 'securities', this approach ignores other keys besides "securities" in the JSON response (namely "deleted" and "status"); the Ruby library does not seem to provide an easy way to handle those as well. This is why I haven't added any methods to the session class, yet.
Then again, the equivalent method in the Python library seems to ignore the other keys as well.

…mal numbers and check if the current key is contained in it (makes things more readable, especially with more keys to come).
@homeworkprod
Copy link
Author

No idea why the build for 1.9.3 failed; the log on Travis CI seems to be empty.

@homeworkprod
Copy link
Author

I've added the aforementioned method to retrieve all securities (equivalent to what's done in the Python library) as well.

… Travis CI uses an old, buggy version of bundler).
@homeworkprod
Copy link
Author

Included fix from PR #13 to make the builds pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant