Coder Social home page Coder Social logo

node-zoho's People

Contributors

ahmader avatar belfordz avatar chemerisuk avatar dafyk avatar grodas-p35 avatar interlock avatar pahan35 avatar sbrk avatar waffle-iron avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

node-zoho's Issues

Add support for any CustomModule[N]

ATM in project is supported only CustomModule1.

As I noticed in Zoho, user can create more custom modules, so, I think, it is inappropriate to create new copy of file for this purposes.

Maybe we should add some logic which allow create any CustomModule[N] from this file?

Implement options to provide Zoho url

Now it's hardcoded to crm.zoho.com. But in Zoho isset another domains like crm.zoho.eu.

It will be nice to have possibility to setup Zoho domain on instance creation.

Npm package update ?

Thanks for merging my fix. Will you update the npm package soon, so that we can use the npm version rather than getting it from github ?
Thanks.

Wrong response parsing in generated code

I noticed that method getRecordsById in crm-module.coffee doesn't work correctly cause this code

if response.data?[@name]
  row = _.first(response.data?[@name])
  processed = @processRecord(_.first(row.row))
  response.data = processed

compiled like

if ((_ref = response.data) != null ? _ref.Events : void 0) {
  row = _.first((_ref1 = response.data) != null ? _ref1.Events : void 0);
  processed = _this.processRecord(_.first(row.row));
  response.data = processed;
}

and not overrides in each child component to correct module name like Contacts etc

if ((_ref = response.data) != null ? _ref.Contacts : void 0) {
  row = _.first((_ref1 = response.data) != null ? _ref1.Contacts : void 0);
  processed = _this.processRecord(_.first(row.row));
  response.data = processed;
}

Have you any idea how to fix it?

UPD: actually I see error code in node package 0.0.26. When I build it manually it compiled correctly

Ideas for implementing download[File/Photo]

At this moment when I try execute downloadFile method via package I see that it happens error on response parsing stage because response tries to parse file body as XML and this caused error.

image

We've got content-type header in response and it is different than application/xml.

The correct expected result from this method is origin response body and parsed Content-Disposition header which easily can be done with this package

What do you think about the way of implementing this method?

Provide possibility to setup wfTrigger value and other request options

As you see there is some extra parameters which we can provide with requests.

In some methods we can't setup this options. For example I need to setup wfTrigger: true on every Zoho insert action but I have no possibility to do it via method usage.

So I propose to change this

  insertRecords: (records, cb) ->
    if not _.isArray(records)
      throw new Error('Requires array of records')
    if records.length < 1
      throw new Error('Requires as least one record')

    query = {
      newFormat: 1,
      xmlData: @build(records)
  }

to this part

  insertRecords: (records, _query, cb) ->
    if not _.isArray(records)
      throw new Error('Requires array of records')
    if records.length < 1
      throw new Error('Requires as least one record')

    if _.isFunction(_query) 
      cb = _query
      _query = {}

    query = _.extend({
      newFormat: 1,
      xmlData: @build(records)
    }, _query)

It works perfectly and has backward compatibility. I will post pull request and try to add extra test for this case

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.