Skip to content

Conversation

@kyle-long
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Apr 12, 2017

Codecov Report

Merging #23 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #23   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          13     13           
  Lines         416    416           
  Branches       45     45           
=====================================
  Hits          416    416
Impacted Files Coverage Δ
lib/artifact.js 100% <ø> (ø) ⬆️
lib/metadata.js 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 510ed04...6540ecc. Read the comment docs.

Copy link

@fidian fidian left a comment

Choose a reason for hiding this comment

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

Rest of this looks good. Not sure if my single nod is good enough because there's a lot of words and I could easily have missed something.


Usage
-----
API
Copy link

Choose a reason for hiding this comment

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

Should "reference" and "artifact" be children of the "API" heading?

If so, you need to demote the other headings. Lots of minor changes.
If not (and I recommend this), perhaps "API" could be changed to "Library Interface" or some other wording in order to narrow the scope to just the thing that you get from require()?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah. yeah I see what you are saying. Yes they should be demoted :(

README.md Outdated
}, (err) => {
console.log("Hit an error: " + err);
});
### `reference.initSearch([path])`
Copy link

Choose a reason for hiding this comment

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

This one uses a dot. Others use a tilde. I think, if we are mirroring Node, we'd use a dot in all of the headings.


git clone https://github.com/not-nexus/shelf-lib-js.git
cd shelf-lib-js
npm install
Copy link
Member

Choose a reason for hiding this comment

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

I know this wasn't changed, but it might be a good idea to add instructions for installing as a module to use? Like npm install shelf-lib --save.

README.md Outdated
// Import the library.
var shelfLib = require("shelf-lib")("<URL where pyshelf is hosted>");

### `shelfLib(origin, [libOptions])`
Copy link
Member

Choose a reason for hiding this comment

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

I think the comma before optional arguments is inside the square brackets. Like so: shelfLib(origin[, libOptions]). I wasn't sure about this, so I checked on Node.Js's documentation and that's how they have it.

README.md Outdated

Options
-----------
* `origin` `{string}` - The protocol and host for connecting to Shelf. For example `https://api.shelf.com`.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need the "For example" part, as you have an example below. You could specify that it must start with "https://" or "http://" though.

README.md Outdated

// Grab a reference to a bucket.
var reference = shelfLib.initReference("refName", "<super secret pyshelf API key>");
* `refName` `{string}` - Could also be called "bucket", "storage" or "shelf". This represents a specific storage space.
Copy link
Member

Choose a reason for hiding this comment

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

I think it makes more sense to have the second sentence first. Then you're explaining what it is and then following that, you'd have extra information about it. I am not saying that this is an actual problem, I'm just saying it makes more sense to me.

README.md Outdated
// Grab a reference to a bucket.
var reference = shelfLib.initReference("refName", "<super secret pyshelf API key>");
* `refName` `{string}` - Could also be called "bucket", "storage" or "shelf". This represents a specific storage space.
* `authToken` `{string}` - The authentication token used to authenticate with the `reference`
Copy link
Member

Choose a reason for hiding this comment

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

Needs a period at the end.

}, (err) => {
console.log("Hit an error: " + err);
});
* `path` `{string}` - Just the path to the artifact inside of the reference. It is `<path>` in `https://api.shelf.com/shadow/artifact/<path>`.
Copy link
Member

Choose a reason for hiding this comment

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

Again, I don't think you need an example here since there is one below. I also think you should remove the word "just", as it sounds informal. I don't think it really matters, but I think Tyler has called me out on it before.

Copy link
Member Author

Choose a reason for hiding this comment

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

This one is much more important because it gives context to people who know how to use shelf.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, okay, cool.

README.md Outdated
Uploads the content provided to the path that the [artifact](#artifact) object to set up to point to. It returns a Promise which will resolve to have a path to where it was uploaded to. This should be usable with `reference~initArtifact`.

* `content` `{(string|Buffer|stream~ReadStream)}` - What you want uploaded as an artifact.
* Returns: `{Promise.<string>}`.
Copy link
Member

Choose a reason for hiding this comment

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

Even though you explain in the example before, it might be nice to explain what is being returned, along with the type.

README.md Outdated
var tagProperty1 = {
immutable: true,
value: "Tag-taggy"
The Second one is called `metadataValues` which is an object whose keys are the name of a property and the value is a `metadataProperty`.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think "Second" should be capitalized here.

@GoogilyBoogily
Copy link
Member

Sweet. Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants