Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Introducing Tomdoc #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

ruyrocha
Copy link
Contributor

@ruyrocha ruyrocha commented May 3, 2013

Ref #29

# to pass different params for the same, e.g: send user instead of username
#
# Do not modify this behavior. Those inconsistencies will be worked
# internally
Copy link
Contributor

Choose a reason for hiding this comment

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

The message we are trying to convey here is: always use the same name for keys/variables for our library. If we use username on one method, we use it for all of them. Example:

def whatever(options = {})
  api_request(username: options[:username])
end

def hello(options = {})
  api_request(user: options[:username])
end

Note how we send user in one method and username in the other, but out API methods ask for username for both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we stick with this behavior for everything, right?

Take this key as an example: "rCFG". It means nothing outside a scope and I think everything should be translated for a more readable version.

What about the interdependent keys? If we went to DNS zone records modules, there are some keys that depend on each other, e.g: txtdata is an optional string but it's required if we're dealing with a TXT record. Docs would be enough here? Or it would be better to work those values inside methods?

Copy link
Contributor

Choose a reason for hiding this comment

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

What are the specific API calls you are referring to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I think he API docs as a reference would be fine, then.

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