Giter VIP home page Giter VIP logo

leankit-node-client's People

Contributors

digitalbush avatar johndmathis avatar reverentgeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leankit-node-client's Issues

classic access control problem

Fetch API cannot load https://<site>.leankit.com/io/card. Response to preflight
request doesn't pass access control check: No 'Access-Control-Allow-Origin'
header is present on the requested resource. Origin 'http://localhost:3000' is
therefore not allowed access. If an opaque response serves your needs, set
the request's mode to 'no-cors' to fetch the resource with CORS disabled

Everything works as a standalone script, but when I plug it into my site, I get this error. I feel dumb for not being able to solve this. I thought authenticating would make leankit return an access control header, but it didn't ๐Ÿ˜ž

Is this client still being maintained?

Hi

New Leankit user, and newbie Node.js developer here. I have been busy implementing some custom functions using this client, but I got stuck when I tried to get the child cards of a card. I can see the endpoints in the API, but I do not see the equivalent functions available in this client.

I am quite new a Node.js coding so I may of course be confused, but I just wanted to check if this client is still being maintained or whether I am better off engaging with the API some other way.

Thanks

ERROR TypeError: Cannot set property 'UserWipOverrideComment' of undefined

Attempting to use the addCard api and receiving the following traceback:

[Tue Aug 12 2014 22:16:55 GMT-0400 (EDT)] ERROR TypeError: Cannot set property 'UserWipOverrideComment' of undefined
  at LeanKitClient.exports.LeanKitClient.LeanKitClient.addCardWithWipOverride (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/leankit-client.js:149:35)
  at LeanKitClient.exports.LeanKitClient.LeanKitClient.addCard (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/leankit-client.js:145:19)
  at /home/adam/Projects/hubot-leankit/scripts/leankit.coffee:54:9, <js>:43:25
  at parseReplyData (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/leankit-client.js:18:14)
  at /home/adam/Projects/hubot-leankit/node_modules/leankit-client/leankit-client.js:61:16
  at parseBody (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/node_modules/request-json/main.js:26:12)
  at Request._callback (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/node_modules/request-json/main.js:68:18)
  at Request.self.callback (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/node_modules/request-json/node_modules/request/index.js:148:22)
  at Request.emit (events.js:98:17)
  at Request.<anonymous> (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/node_modules/request-json/node_modules/request/index.js:876:14)
  at Request.emit (events.js:117:20)
  at IncomingMessage.<anonymous> (/home/adam/Projects/hubot-leankit/node_modules/leankit-client/node_modules/request-json/node_modules/request/index.js:827:12)
  at IncomingMessage.emit (events.js:117:20)
  at _stream_readable.js:938:16
  at process._tickCallback (node.js:419:13)
  robot.respond /lk add (\d+) (.*)/i, (msg) ->
    user = msg.message.user
    boardId = msg.match[1]
    title = msg.match[2]
    board = robot.brain.data.lkboards[boardId]
    client.getBoardByName board, (err, b) ->
      if b?
        now = new Date()
        cardType = _.find(b.CardTypes, 'IsDefault': true)
        lane = _.find(b.Lanes, 'IsDefaultDropLane': true)
        newCard = {}
        newCard.TypeId = cardType.Id
        newCard.Title = title
        newCard.ExternalCardId = now.getTime()
        newCard.LaneId = lane.Id
        newCard.Position = 0
        client.addCard b.Id, newCard, (err, res) ->
          if res?
            msg.send "Added card(#{res.CardId}): #{title} to " +
                     "#{board.Title}/#{lane.title}."
      else
        msg.send "Unable to add card to Board"

I looked a bit at the client code and that variable does seem to be set.

Question - get list of cards last updated between two dates

I see that it's simple to get a list of cards updated since a certain date. I'd like to use that in conjunction with restricting to cards last updated before another date. Ultimately I want to get all cards last updated in any arbitrary time range. Is this possible?

Will not install

If I try to run npm install leankit-client, I end up with a failure saying that there's no package.json file.

If I clone the repo, cd to its directory, and run npm install I get the output below. What am I missing?

EDIT:

โ†’ node -v
v7.8.0

โ†’ npm -v
4.4.4
> [email protected] install /Users/username/node_apps/leankit-node-client/node_modules/fsevents
> node install

[fsevents] Success: "/Users/username/node_apps/leankit-node-client/node_modules/fsevents/lib/binding/Release/node-v51-darwin-x64/fse.node" is installed via remote
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts will run only for `npm publish`.
npm WARN prepublish-on-install (In npm@4 and previous versions, it also runs for `npm install`.)
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

> [email protected] prepublish /Users/username/node_apps/leankit-node-client
> npm run compile


> [email protected] precompile /Users/username/node_apps/leankit-node-client
> npm run lint


> [email protected] lint /Users/username/node_apps/leankit-node-client
> eslint --fix ./src


/Users/username/node_apps/leankit-node-client/src/client.js
  560:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

/Users/username/node_apps/leankit-node-client/src/events.js
  20:1  error  Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

โœ– 2 problems (2 errors, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `eslint --fix ./src`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] lint script 'eslint --fix ./src'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the leankit-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint --fix ./src
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs leankit-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls leankit-client
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2017-03-30T14_38_48_576Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] precompile: `npm run lint`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] precompile script 'npm run lint'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the leankit-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run lint
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs leankit-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls leankit-client
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2017-03-30T14_38_48_594Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `npm run compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] prepublish script 'npm run compile'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the leankit-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run compile
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs leankit-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls leankit-client
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2017-03-30T14_38_48_712Z-debug.log

Empty string for BlockStateChangeDate

Not sure if this should contain what I think it should (the last date that the block state was changed on a card) but currently when inspecting this value, after doing a getBoard and scanning through Lanes and then Cards, it seems to always show as an empty string whether the card is currently blocked or not. Does this value mean something different?

Node.js client not working behind Proxy

Hi,

I have tried this behind a proxy server and it somehow is not able to make that call.
Once I disconnect my corporate vpn and the connection is made directly to the internet, the same code works fine.

Please check this.

Txm
Hrishikesh Karekar

Error when reading Board API

I followed the simple "gettings started" tutorial (http://developer.leankit.com/automate-leankit-with-node-js/) on Lean Kit's website and I'm getting the following error.

Error getting boards: [TypeError: Object boards has no method 'startsWith']

Despite confirming that my Company Name, Username, and Password are all correct. Can anyone shed some light on this for me?



// Reference the LeanKit client
var LeanKitClient = require( "leankit-client" );

// Update this variable to the name of your LeanKit 
// account, which can be found in the URL you use 
// to access your LeanKit boards. For example, 
// https://mycompany.leankit.com
var accountName = "mycompany";

// Update this variable to your email address
var email = "[email protected]";

// Update this variable to your LeanKit password
var password = "p@ssw0rd";

// Create an instance of the client with your credentials
var client = new LeanKitClient( accountName, email, password );

client.getBoards( function( err, boards ) {  
  if ( err ) console.error( "Error getting boards:", err );
  console.log( boards );
} );

LeanKit API with node.js

Hello,

i am already using the leankit-node-client, and everything is working fine.
I was just wondering how to use the GET and POST operations from {accountname}.leankit.com/io/docs
Tried it using the require module and the express module, but it didn't relly work. Now I was wondering if i could integrate it in the leankit-node-client?
Or does anyone has some example script?
Esspecially regarding the create and delete template commands.
Thankful for any help

compiling nodejs

Hello

I've a very simple app. It reads from a DB and populates some custom fields in cards/LeanKit.
I'm struggling compiling the app.I've tried pkg and nexe .... no luck.

Do you have any suggestions?

Your help is highly appreciated

Question - Manipulate Lanes

Hi,

I'd like to duplicate and remove lanes with an automated script I want to create. I don't see your docs mentioning lane manipulation. Can you do this?

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.