# feed-dac-library

> This library exposes a class that wraps the Feed DAC, created and hosted by redsolver.

Latest version **0.3.0** (published 2021-09-05) · MIT license · 10 weekly downloads

## Install

```sh
npm install feed-dac-library
pnpm add feed-dac-library
yarn add feed-dac-library
bun add feed-dac-library
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2021-09-05 |
| First published | 2021-04-10 |
| Weekly downloads | 10 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 58 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | redsolver |
| Maintainers | redsolver |

## Links

- npm: https://www.npmjs.com/package/feed-dac-library
- Homepage: https://github.com/redsolver/feed-dac-library
- Issues: https://github.com/redsolver/feed-dac-library/issues
- npm.io page: https://npm.io/package/feed-dac-library

## Dependencies (3)

- [post-me](https://npm.io/package/post-me.md) ^0.4.5
- [skynet-js](https://npm.io/package/skynet-js.md) ^4.0.3-beta
- [skynet-mysky-utils](https://npm.io/package/skynet-mysky-utils.md) ^0.1.2

## Recent versions

- 0.3.0 (latest) — 2021-09-05
- 0.2.4 — 2021-08-28
- 0.2.3 — 2021-08-28
- 0.2.2 — 2021-05-07
- 0.2.1 — 2021-05-02
- 0.2.0 — 2021-04-29
- 0.1.3 — 2021-04-22
- 0.1.2 — 2021-04-16
- 0.1.1 — 2021-04-13
- 0.1.0 — 2021-04-10

## README

# Feed DAC for MySky

Forked from `@skynethq/content-record-library`.

This DAC uses the https://github.com/SkynetHQ/skystandards data structures

## Usage

Using the library is very straightforward. In this section we'll show an example
of how a skapp could use the Feed DAC library and create a new post.

```typescript
import { SkynetClient } from "skynet-js";
import { FeedDAC } from "feed-dac-library";

(async () => {
  // create client
  const client = new SkynetClient();

  // create content record
  const feedDAC = new FeedDAC();

  // load mysky
  const mySky = await client.loadMySky("exampleskapp.hns");

  // load DACs
  await mySky.loadDacs(feedDAC);

  // check login
  const isLoggedIn = await mySky.checkLogin();
  if (!isLoggedIn) {
    // request login access
  }

  const res = await feedDAC.createPost({
    text: 'Hello, world!'
  })
  console.log(`Success: ${res.success}`);
  console.log(`Error (if unsuccessful): ${res.error}`);
  console.log(`Reference to the new post: ${res.ref}`);
})();
```

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