code: function addSetAPIMethod() {
          $methodGenerator = new MethodGenerator('setAPI');
          $methodGenerator->setBody('$this->api = $api;');
          $parameterGenerator = new ParameterGenerator('api', $this->apiClassname);
          $methodGenerator->setParameter($parameterGenerator);
          $this->classGenerator->addMethodFromGenerator($methodGenerator);
      }
docs: Add the ability to change the API instance.