{"library":"shred","title":"shred","description":"Shred is a resource-oriented HTTP client for JavaScript/Node.js that allows declarative definition of API wrappers with support for URL templates, response compression, authorization, and streaming. The current version is 1.1.0-alpha-10 (alpha quality). It is a complete reboot from 1.0.x, not backwards compatible. Key differentiator: declarative resource definition using CoffeeScript/JavaScript objects, focusing on HTTP resource abstraction rather than low-level requests.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install shred"],"cli":null},"imports":["import { resource } from 'shred'","import { invoke } from 'shred'","import type { ShredResponse } from 'shred'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { resource } = require('shred');\nconst github = resource('https://api.github.com/', {\n  repos: (resource) => resource('repos/{owner}/{repo}/', {\n    issues: (resource) => resource('issues', {\n      list: { method: 'get', headers: { accept: 'application/vnd.github.v3.raw+json' }, expect: 200 }\n    })\n  })\n});\nasync function main() {\n  try {\n    const { data } = await github.repos({ owner: 'user', repo: 'repo' }).issues.list();\n    console.log(data);\n  } catch (error) {\n    console.error(error);\n  }\n}\nmain();","lang":"javascript","description":"Defines a GitHub API client using shred's resource-oriented approach and performs a simple issue listing request.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}