Skip to content

Change Result content class variable - #6

Open
nickescobedo wants to merge 2 commits into
m1so:masterfrom
nickescobedo:use-data
Open

Change Result content class variable#6
nickescobedo wants to merge 2 commits into
m1so:masterfrom
nickescobedo:use-data

Conversation

@nickescobedo

Copy link
Copy Markdown
Collaborator

Fixed class not found when trying to run unit tests.

Change Result to set data instead of content so both BatchResult and Result classes use the same property.

@nickescobedo nickescobedo changed the title Use data Change Result content class variable Nov 10, 2017
@m1so

m1so commented Nov 12, 2017

Copy link
Copy Markdown
Owner

Thanks! Could you please add getContent as alias for getData in order to keep backwards compatibility?

@nickescobedo

Copy link
Copy Markdown
Collaborator Author

Yes, I can add that. Are you open to deprecating the getContent method on the next major release as a breaking change? The API will get muddy if we're always backwards supporting these calls.

I was confused initially by the different getByIds and byIds for example on the Match class.

@m1so

m1so commented Nov 21, 2017

Copy link
Copy Markdown
Owner

Some people prefer the get prefix for those methods so it was made available.

I don't really see the point of deprecating just one method, also I'm not sure when or if there will be a major release as I currently don't have much time and it is unlikely that Riot's API will drastically change in the future

@nickescobedo

Copy link
Copy Markdown
Collaborator Author

I prefer the get prefix. Everything can have the get prefix, but then we don't have to have double the function calls. It's confusing to have functions with get and without get that do the same thing.

The point is to keep this API concise, UX friendly, and less confusing. You are right about Riot most likely not drastically changing the API in the near future, but that doesn't mean this package can't have releases.

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.

2 participants