お題 / Coding Challenge

English follows Japanese

以下の3つのWeb APIがあります(実際にアクセスできます)。
これらを利用して、あるユーザーIDをあたえたときのユーザー名および登録金融機関一覧と、登録金融機関の残高(balance)を出力するプログラムを作成してください。

なお、プログラムはオブジェクト指向プログラミングに基づく設計・実装をしてください。
また、解答の公開は避けてください。secret gist あるいはメールでの提出をお願いします。


There are three APIs below. (These are actual API, so you can access them.)
Please create a program with some of these APIs. It should take a user ID as input and return the name, account list and balances of that user.

Please note that it is required to use object-oriented programming.
Please send your result by secret gist or email and refrain from releasing it to public so that everyone has equal opportunities.

- Web API
  - https://sample-accounts-api.herokuapp.com/users/1
    - レスポンス例 / Sample response
      {
        attributes: {
          id: 1,
          name: "Alice",
          account_ids: [
            1,
            3,
            5
          ]
        }
      }
  - https://sample-accounts-api.herokuapp.com/users/1/accounts
    - レスポンス例 / Sample response
      [
        {
          attributes: {
            id: 1,
            user_id: 1,
            name: "A銀行",
            balance: 20000
          }
        },
        {
          attributes: {
            id: 3,
            user_id: 1,
            name: "C信用金庫",
            balance: 120000
          }
        },
        {
          attributes: {
            id: 5,
            user_id: 1,
            name: "E銀行",
            balance: 5000
          }
        }
      ]   

  - https://sample-accounts-api.herokuapp.com/accounts/2
    - レスポンス例 / Sample response
      {
        attributes: {
          id: 2,
          user_id: 2,
          name: "Bカード",
          balance: 200
        }
      }