You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
0
-100%
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

gitlab

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