Sha256: 0e28819d307e733fa69ba353802e4dffe066659d131d521b1f5f510d5ab51f74

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

require 'bc3client'
require "net/http"
require "uri"
require "bc3client/resource"
require "json"

module Bc3client

  class ToDoSet < Resource

    def initialize(*args)
      args = args.flatten(1) unless !args[0].is_a?(Array)
      super(args)
      @project_id = args[3]
    end

    def find_by_id(todo_set_id)
      get build_uri(todo_set_path(todo_set_id))
    end

    private

      def todo_set_path(todo_set_id)
        "/#{@account_id}/buckets/#{@project_id}/todosets/#{todo_set_id}.json"
      end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bc3client-0.1.0 lib/bc3client/todo_set.rb