Sha256: 568a269a2f667dc96aa7ec07c3689652c57f6157dc64d47961d38ef66fbcb0fe

Contents?: true

Size: 840 Bytes

Versions: 9

Compression:

Stored size: 840 Bytes

Contents

module Tr3llo
  module API
    module Board
      extend self

      def find_all_by_user(user_id)
        JSON.parse(
          client.get(
            "/members/#{user_id}/boards",
            key: api_key,
            token: api_token,
          ),
          symbolize_names: true
        )
      end

      def find(board_id)
        JSON.parse(
          client.get(
            "/boards/#{board_id}",
            key: api_key,
            token: api_token,
          ),
          symbolize_names: true
        )
      end

      private

      def client
        container.resolve(:api_client)
      end

      def api_key
        container.resolve(:configuration).api_key
      end

      def api_token
        container.resolve(:configuration).api_token
      end

      def container
        $container
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
3llo-0.3.1 lib/3llo/api/board.rb
3llo-0.3.0 lib/3llo/api/board.rb
3llo-0.2.0 lib/3llo/api/board.rb
3llo-0.1.12 lib/3llo/api/board.rb
3llo-0.1.11 lib/3llo/api/board.rb
3llo-0.1.10 lib/3llo/api/board.rb
3llo-0.1.9 lib/3llo/api/board.rb
3llo-0.1.9.beta lib/3llo/api/board.rb
3llo-0.1.8 lib/3llo/api/board.rb