code: function makeOpportunities(agent) {
      let groups = function (id) {
          if (id === undefined) {
              return agent.request('get_opportunities_groups', undefined);
          }
          else {
              return new GroupImpl(agent, id);
          }
      };
      let tasks = function (id) {
          if (id === undefined) {
              return agent.request('get_opportunities_tasks', undefined);
          }
          else {
              return new TaskImpl(agent, id);
          }
      };
      return { groups, tasks };
  }
docs: Create a new {@link Opportunities} instance that uses the given `agent` to
  make its HTTP requests to the ESI interface.
  
  @param agent The agent making actual requests
  @returns An Opportunities API instance