2.0.0 • Published 5 years ago

codebottle v2.0.0

Weekly downloads
2
License
GPL-3.0
Repository
github
Last release
5 years ago

Snippets Stats Build Status

Install

npm i codebottle

yarn add codebottle

Usage

All requests return Promise

For examples see test/index.mjs

import bottle from 'codebottle';

// ...

const data = await bottle.latest;
const { id, code, title, username } = await bottle.fetch('f063cc6e0b');

// advanced api wrapper (without docs)
// recommended to not use it unless you know how to use it
const data = await bottle.api.snippets('f063cc6e0b').get();

All library methods and getters

// Fetch specific snippet by key
bottle.fetch(key)

// Fetch language or category by key
bottle.language(key);
bottle.category(key);

// Find snippets with query and with optional language id
bottle.search({ query, language })

// Fetch latest snippets
codebottle.latest;

// Fetch all languages or categories
codebottle.languages;
codebottle.categories;
2.0.0

5 years ago

0.5.0

6 years ago

0.4.5

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago