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

add a 'search' classmethod for each collection #15

Open
mhjohnson opened this issue Sep 22, 2011 · 0 comments
Open

add a 'search' classmethod for each collection #15

mhjohnson opened this issue Sep 22, 2011 · 0 comments
Milestone

Comments

@mhjohnson
Copy link
Member

By reading this: http://services.sunlightlabs.com/docs/Real_Time_Congress_API/floor_updates/

I now know what fields the search parameter is applied to.

"If the "search" parameter is passed to the API, a case-insensitive pattern match of the given string is applied to the following fields: events"


class FloorUpdates(RTC_Client):
    @classmethod
    def search(cls, query, make_obj=False, sections=''):
        endpoint = "floor_updates.json"
        params = {'search':query}
        result = super(FloorUpdates, cls)._apicall(endpoint, sections, make_obj, **params)
        return result['floor_updates']
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

No branches or pull requests

1 participant