Sha256: 8fd3d0d779fdfd0d2d6a797ea9ed512e2b0303b75a1ff5d411a205653f151612
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
module Todoist module Sync class Filters include Todoist::Util # Return a Hash of filters where key is the id of a filter and value is a filter def collection return ApiHelper.collection("filters") end # Add a filter with a given hash of attributes and returns the filter id. # Please note that item_id is required as is a date as specific in the # documentation. This method can be tricky to all. def add(args) return ApiHelper.add(args, "filter_add") end # Update a filter given a hash of attributes def update(args) return ApiHelper.command(args, "filter_update") end # Delete filter given an array of filters def delete(filter) args = {id: filter.id} return ApiHelper.command(args, "filter_delete") end # Update orders for an array of filters def update_multiple_orders(filters) args = {} filters.each do |filter| args[filter.id] = filter.item_order end args = {id_order_mapping: args.to_json} return ApiHelper.command(args, "filter_update_orders") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
todoist-ruby-0.1.3 | lib/todoist/sync/filters.rb |