Skip to content

add a 'search' classmethod for each collection #15

Open
@mhjohnson

Description

@mhjohnson

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']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions