Skip to content

Conversation

@xbill82
Copy link
Contributor

@xbill82 xbill82 commented Sep 18, 2017

The method kuzzle.collection('foo').create() passed to the callback the response from the server. We estimate that passing the collection makes the API easier to use. It notably allows to do

kuzzle
  .collection('bar')
  .createPromise()
  .then((collection) => {
    return collection
       .createDocumentPromise(...)
  })

Boyscouting

Included kuzzle.createIndex in the promisification whitelist.

@codecov-io
Copy link

codecov-io commented Sep 18, 2017

Codecov Report

Merging #245 into 5.x will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              5.x     #245      +/-   ##
==========================================
+ Coverage   98.27%   98.27%   +<.01%     
==========================================
  Files          17       17              
  Lines        2148     2149       +1     
  Branches      610      611       +1     
==========================================
+ Hits         2111     2112       +1     
  Misses         37       37
Impacted Files Coverage Δ
src/Kuzzle.js 98.76% <ø> (ø) ⬆️
src/Collection.js 98.04% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c9ef89...58aa058. Read the comment docs.

@scottinet
Copy link
Contributor

This needs an update to the SDK documentation and to other SDKs as well

window = undefined; // eslint-disable-line
WebSocket = undefined; // eslint-disable-line
window = undefined;
/*eslint no-native-reassign: "off"*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: this disables the rule for the entire file. Prefer the following:
// eslint-disable-next-line no-native-reassign, no-global-assign

@benoitvidis benoitvidis merged commit 27db639 into 5.x Sep 20, 2017
@benoitvidis benoitvidis deleted the fix-create-index-collection branch September 20, 2017 10:00
@scottinet scottinet mentioned this pull request Sep 27, 2017
This was referenced Oct 11, 2017
This was referenced Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants