Giter Club home page Giter Club logo

Comments (9)

fengmk2 avatar fengmk2 commented on July 29, 2024 1

@exuperok

Promise way

Require node >= 0.11.13 or bluebird:

var gitlab = require('node-gitlab');

var client = gitlab.createPromise({
  api: 'https://gitlab.com/api/v3',
  privateToken: 'your private token'
});

client.milestones.list({id: 1})
  .then(function (milestones) {
    console.log(milestones);
  })
  .catch(function (err) {
    throw err;
  });

from gitlab.

fengmk2 avatar fengmk2 commented on July 29, 2024

it easy to support promise

from gitlab.

fengmk2 avatar fengmk2 commented on July 29, 2024

@exuperok I will impl the promise today.

from gitlab.

 avatar commented on July 29, 2024

Hello thank you for taking my suggestion into consideration, i am new to node.js, so i didn't know how much time it would take to do this, i've been struggling with this issue for a day and couldn't find an elegant solution.

from gitlab.

fengmk2 avatar fengmk2 commented on July 29, 2024

I will publish a promisify module like co-gitlab

from gitlab.

 avatar commented on July 29, 2024

Wow thank you, in case you're curious i am using node-gitlab, to build a little node worker that synchronizes branches of a project with jenkins job... basically it creates a jenkins job for every branch in gitlab project and delete jobs for every branch deleted in that same gitlab project etc... the gitlab part is handled by node-gitlab...

from gitlab.

 avatar commented on July 29, 2024

the co in co-gitlab stands for?

from gitlab.

fengmk2 avatar fengmk2 commented on July 29, 2024

https://github.com/visionmedia/co

from gitlab.

 avatar commented on July 29, 2024

Hello thank you for the implementation i will test that right away.

from gitlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.