Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Normalize NAME API #190

Merged
merged 6 commits into from
Jan 5, 2018
Merged

Normalize NAME API #190

merged 6 commits into from
Jan 5, 2018

Conversation

hacdias
Copy link
Contributor

@hacdias hacdias commented Jan 2, 2018

Uncapitalizes the Object fields for Name API to be compliant to JavaScript best practices and to the other APIs.

Closes ipfs-inactive/js-ipfs-http-client#582.

@ghost ghost assigned hacdias Jan 2, 2018
@ghost ghost added the in progress label Jan 2, 2018
@hacdias
Copy link
Contributor Author

hacdias commented Jan 2, 2018

@diasdavid, the spec for ipfs.name.resolve says you receive a response in this format:

{
  name: "/ipns/QmHash.."
  value: "/ipfs/QmHash.."
}

Although, what I am receiving here is something like:

{ Path: '/ipfs/QmQrX8hka2BtNHa8N8arAq16TCVx5qHcb46c5yPewRycLm' }

For ipfs.name.publish, I receive an object with capitalized fields. Instead of name and value, I receive a Name and a Value.

Since I'm adding some examples, should they be consistent with the spec or to the actual API? Should I make a PR on js-ipfs-api to change this?

@hacdias hacdias changed the title [WIP] docs: add examples to name API docs: add examples to name API Jan 2, 2018
@hacdias
Copy link
Contributor Author

hacdias commented Jan 3, 2018

@diasdavid one more thing: I see documentation all over the place. What's ipfs/docs supposed to be and how does it relate to SPEC and to the docs on the other repositories? 😄

@daviddias
Copy link
Contributor

ipfs/docs is a WIP not yet ready for prime time. Right now SPEC is the source of truth.

Should I make a PR on js-ipfs-api to change this?

Thanks for catching this. Yes, please do make a PR :)

@hacdias
Copy link
Contributor Author

hacdias commented Jan 3, 2018

Done! Should be merged alongside with ipfs-inactive/js-ipfs-http-client#658

@hacdias hacdias requested a review from daviddias January 3, 2018 13:23
@hacdias hacdias changed the title docs: add examples to name API Normalize NAME API Jan 3, 2018
@hacdias hacdias mentioned this pull request Jan 3, 2018
3 tasks
@daviddias daviddias merged commit 9670c1a into master Jan 5, 2018
@daviddias daviddias deleted the name-example branch January 5, 2018 18:01
@ghost ghost removed the in progress label Jan 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants