### Current Build and Deploy Commands - Shell Source: https://github.com/slatedocs/slate/blob/main/CHANGELOG.md These are the recommended commands for building and deploying the Slate documentation site as of version 1.3. `bundle exec middleman build --clean` builds the site, and `./deploy.sh` handles deployment to GitHub Pages. ```Shell bundle exec middleman build --clean ``` ```Shell ./deploy.sh ``` -------------------------------- ### Initializing API Client for Authentication Source: https://github.com/slatedocs/slate/blob/main/source/index.html.md Demonstrates how to authenticate with the Kittn API. This involves initializing the client library with your API key or including it as an Authorization header in direct requests like curl. Replace 'meowmeowmeow' with your actual key. ```ruby require 'kittn' api = Kittn::APIClient.authorize!('meowmeowmeow') ``` ```python import kittn api = kittn.authorize('meowmeowmeow') ``` ```shell # With shell, you can just pass the correct header with each request curl "api_endpoint_here" \ -H "Authorization: meowmeowmeow" ``` ```javascript const kittn = require('kittn'); let api = kittn.authorize('meowmeowmeow'); ``` -------------------------------- ### Legacy Build and Deploy Commands - Shell Source: https://github.com/slatedocs/slate/blob/main/CHANGELOG.md These commands were used in older versions of Slate (prior to 1.3) to build the static site and deploy it. They have since been deprecated in favor of bundle exec and a dedicated deploy script. ```Shell rake build ``` ```Shell rake deploy ``` -------------------------------- ### Retrieving All Kittens from API Source: https://github.com/slatedocs/slate/blob/main/source/index.html.md Fetches a list of all kitten resources available from the API. This requires prior authentication using your API key. The endpoint supports query parameters to filter the results, such as 'include_cats' and 'available'. The response is a JSON array of kitten objects. ```ruby require 'kittn' api = Kittn::APIClient.authorize!('meowmeowmeow') api.kittens.get ``` ```python import kittn api = kittn.authorize('meowmeowmeow') api.kittens.get() ``` ```shell curl "http://example.com/api/kittens" \ -H "Authorization: meowmeowmeow" ``` ```javascript const kittn = require('kittn'); let api = kittn.authorize('meowmeowmeow'); let kittens = api.kittens.get(); ``` -------------------------------- ### Retrieving Specific Kitten by ID Source: https://github.com/slatedocs/slate/blob/main/source/index.html.md Retrieves the details for a single kitten resource using its unique identifier. Authentication via API key is required. The API returns a JSON object representing the requested kitten if found, otherwise an error. ```ruby require 'kittn' api = Kittn::APIClient.authorize!('meowmeowmeow') api.kittens.get(2) ``` ```python import kittn api = kittn.authorize('meowmeowmeow') api.kittens.get(2) ``` ```shell curl "http://example.com/api/kittens/2" \ -H "Authorization: meowmeowmeow" ``` ```javascript const kittn = require('kittn'); let api = kittn.authorize('meowmeowmeow'); let max = api.kittens.get(2); ``` -------------------------------- ### Deleting Specific Kitten by ID Source: https://github.com/slatedocs/slate/blob/main/source/index.html.md Deletes a specific kitten resource from the system using its unique identifier. This operation requires authentication via API key. The API confirms the deletion, typically returning a JSON object indicating the status. ```ruby require 'kittn' api = Kittn::APIClient.authorize!('meowmeowmeow') api.kittens.delete(2) ``` ```python import kittn api = kittn.authorize('meowmeowmeow') api.kittens.delete(2) ``` ```shell curl "http://example.com/api/kittens/2" \ -X DELETE \ -H "Authorization: meowmeowmeow" ``` ```javascript const kittn = require('kittn'); let api = kittn.authorize('meowmeowmeow'); let max = api.kittens.delete(2); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.