Socket
Socket
Sign inDemoInstall

codebottle

Package Overview
Dependencies
1
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    codebottle

🍾 API wrapper for codebottle.io


Version published
Weekly downloads
12
increased by1100%
Maintainers
2
Install size
169 kB
Created
Weekly downloads
 

Readme

Source
CodeBottle

Snippets Stats discord guild version Build Status downloads

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;

Keywords

FAQs

Last updated on 01 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc