README.md in barkibu-kb-0.22.0 vs README.md in barkibu-kb-0.23.0

- old
+ new

@@ -115,11 +115,11 @@ - throws a `KB::Error` exception if something went wrong - `contracts` - returns all the KB::PetContract associated with this pet - `upsert` - updates KB:Pet if exists a Pet with same name for its PetParent - - creates a new KB:Pet if not exists a Pet with same name for its PetParent + - creates a new KB:Pet if not exists a Pet with same name for its PetParent #### PetContract 📝 `KB::PetContract` represents a resource exposing: @@ -136,10 +136,19 @@ - returns: the raw attributes of the PetContract instance - throws an `KB::Error` exception if something went wrong - `save!` - persists (create or update) the entity to the Knowledge Base - throws an `KB::Error` exception if something went wrong +- `search` + - arg: `filters` hash. Currently, KB API supports these keys: + - `page`: results page number. Default 0. + - `size`: amount of results per page. Default 10. + - `chip`: searches contracts by insured pet chip + - returns: a hash including: + - `total`: total amount of contracts found + - `page`: current page number + - `elements`: array of PetContract instances matching the filters #### Plan 🗺 `KB::Plan` represents a resource exposing: @@ -232,15 +241,21 @@ You should be able to use the API seemlessly and the calls to the API will be intercepted and a local one used instead in a similar fashion to how ActiveRecord operations are wrapped into a transaction in a rails app with `use_transactional_fixtures` activated. ## Development & Testing ```bash - docker run -it --rm -v $(pwd):/app --workdir=/app ruby:2.6.5 bash - - > bundle install - > rspec +docker run -it --rm -v $(pwd):/app --workdir=/app ruby:2.7.2 bash +> bundle install +> rspec ``` +You can also start an interactive console if needed: +```bash +KB_API_URL_TEMPLATE=https://example.com/%{version}/%{entity} \ +KB_API_KEY=YourKbApiKey \ +KB_PARTNER_KEY=YourKbPartnerKey \ +bin/console +``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/kb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License