Socket
Socket
Sign inDemoInstall

@darkterminal/gitlab-crud

Package Overview
Dependencies
9
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @darkterminal/gitlab-crud

Gitlab CRUD REST API v4


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 24 Jan 2023

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