# contentful-collection

> [![Version](https://img.shields.io/npm/v/contentful-collection.svg)](https://npmjs.org/package/contentful-collection) [![Downloads/week](https://img.shields.io/npm/dw/contentful-collection.svg)](https://npmjs.org/package/contentful-collection) [![License]

Latest version **0.0.4** (published 2022-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install contentful-collection
pnpm add contentful-collection
yarn add contentful-collection
bun add contentful-collection
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-09-13 |
| First published | 2021-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Marco Link |
| Maintainers | marcolink |

## Links

- npm: https://www.npmjs.com/package/contentful-collection
- Repository: https://github.com/marcolink/contentful-collection
- npm.io page: https://npm.io/package/contentful-collection

## Recent versions

- 0.0.4 (latest) — 2022-09-13
- 0.0.3 — 2021-12-16
- 0.0.2 — 2021-12-16
- 0.0.1 — 2021-12-16

## README

# (get) Contentful Collection

[![Version](https://img.shields.io/npm/v/contentful-collection.svg)](https://npmjs.org/package/contentful-collection)
[![Downloads/week](https://img.shields.io/npm/dw/contentful-collection.svg)](https://npmjs.org/package/contentful-collection)
[![License](https://img.shields.io/npm/l/contentful-collection.svg)](https://github.com/marcolink/contentful-collection/blob/master/package.json)
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)

Get all pages of any contentful collection

### Install 
**yarn**
```
yarn add contentful-collection
```
**npm**
```
npm i contentful-collection
```

### Usage

Query entries with `contentful.js`
```js
import contentful from "contentful";
import getContentfulCollection from "contentful-collection";

const client = contentful.createClient({
  space: "<space>",
  accessToken: "<token>"
});

const query = {content_type: "<my-content-type>"};
const allItems = await getContentfulCollection(q => client.getEntries(q), query)
```

---
_Source: https://npm.io/package/contentful-collection · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
