Skip to content

Search feature #14

Description

@adammcarth

At the moment, the only way to get a specific object with JTask is with it's unique id. It would be cool if a future version of JTask [post first stable release (> 1.0.0)] would have the option to retrieve objects by searching for a parameter' value. Something like this maybe:

# GET /salaries/peyton-manning

@salary = JTask.get_by_shortlink("salaries.json", "peyton-manning")
puts @salary.amount
#=> "$18,000,000 USD"

The above example would return the first object it finds that matches the shortlink. Maybe we could also spice things up a little by allowing multiple objects that fit the search criteria to be returned:

@birthdays = JTask.get_by_birthday("birthdays.json", "2014-03-02", :all)
@birthdays.each do |person|
  push_notification("Happy birthday, #{person.name}!")
end

It's just an idea and I imagine it will be extremely slow for large file types, but it's certainly something I'd like to see considered in a later version of JTask.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions