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

@darkterminal/gitlab-crud

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darkterminal/gitlab-crud

Gitlab CRUD REST API v4

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Usage Example

import GitlabCRUD from "../dist/gitlab-crud.cjs"

const db = new GitlabCRUD('project-id', 'token')

async function main() {
    const created = await db.create('data/users.json', JSON.stringify([]))
    console.log(created)
    
    const users = await db.read('data/users.json')
    users.push({
        "username": "trojan302",
        "email": "trojan302@undefined.proto",
        "registeredAt": 1672340474,
        "avatar": "https://imgur.com/asdSd81as.png"
    })
    
    const updated = await db.update('data/users.json', JSON.stringify(users))
    console.log(updated)
    
    const newContent = await db.read('data/users.json')
    console.log(newContent)

    const deleted = await db.delete('notes/new-file.txt')
    console.log(deleted)
}
main()

Keywords

FAQs

Package last updated on 24 Jan 2023

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