Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codebottle

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codebottle

🍾 API wrapper for codebottle.io

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
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

Package last updated on 01 Mar 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc