Sha256: adccaaafb5542168d5276951232e9092b0b5746f0bb6a2d6ac2a2d887faf2b83
Contents?: true
Size: 991 Bytes
Versions: 1
Compression:
Stored size: 991 Bytes
Contents
# frozen_string_literal: true require "roseflow/pinecone/response" require "roseflow/pinecone/structs" module Roseflow module Pinecone class Collection def initialize(connection) @connection = connection end def list CollectionResponse.new( method: :list, response: connection.get("/collections") ) end def describe(name) CollectionResponse.new( method: :describe, response: connection.get("/collections/#{name}") ) end def create(name = "", source_index = "") CollectionResponse.new( method: :create, response: connection.post("/collections", { name: name, source: source_index }) ) end def delete(name) CollectionResponse.new( method: :delete, response: connection.delete("/collections/#{name}") ) end private attr_reader :connection end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roseflow-pinecone-0.1.0 | lib/roseflow/pinecone/collection.rb |