We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
日本語です(3回目)
リソースを表す(JSONをデコードする)構造体にメソッドを定義することで、フィールドだけでは不親切な部分を便利にできる。
たとえばUserにdisplayNameがあるときはそれを、ないときはnameを返すメソッドや、ProductのimageUrlの変数部分を適切に引数で置換して返してくれるメソッドなど。 やりすぎるとAPIクライアントの領域を超える感があるので注意する。プレゼンテーションにかかわるものはとりあえずおいとくかなあ。
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
日本語です(3回目)
リソースを表す(JSONをデコードする)構造体にメソッドを定義することで、フィールドだけでは不親切な部分を便利にできる。
たとえばUserにdisplayNameがあるときはそれを、ないときはnameを返すメソッドや、ProductのimageUrlの変数部分を適切に引数で置換して返してくれるメソッドなど。
やりすぎるとAPIクライアントの領域を超える感があるので注意する。プレゼンテーションにかかわるものはとりあえずおいとくかなあ。
The text was updated successfully, but these errors were encountered: