public function get_repo_api( $git, $repo = false ) {
		$repo_api = null;
		$repo     = $repo ?: new \stdClass();
		switch ( $git ) {
			case 'github':
				$repo_api = new GitHub_API( $repo );
				break;
			case 'bitbucket':
				if ( ! empty( $repo->enterprise ) ) {
					$repo_api = new Bitbucket_Server_API( $repo );
				} else {
					$repo_api = new Bitbucket_API( $repo );
				}
				break;
			case 'gitlab':
				$repo_api = new GitLab_API( $repo );
				break;
			case 'gitea':
				$repo_api = new Gitea_API( $repo );
				break;
		}

		return $repo_api;
	}
public function get_repo_api( $git, $repo = false ) {
		$repo_api = null;
		$repo     = $repo ?: new \stdClass();
		switch ( $git ) {
			case 'github':
				$repo_api = new GitHub_API( $repo );
				break;
			case 'bitbucket':
				if ( ! empty( $repo->enterprise ) ) {
					$repo_api = new Bitbucket_Server_API( $repo );
				} else {
					$repo_api = new Bitbucket_API( $repo );
				}
				break;
			case 'gitlab':
				$repo_api = new GitLab_API( $repo );
				break;
			case 'gitea':
				$repo_api = new Gitea_API( $repo );
				break;
		}

		return $repo_api;
	}
public function get_repo_api ( $ git , $ repo = false ) { $ repo_api = null ; $ repo = $ repo ? : new \ stdClass ( ) ; switch ( $ git ) { case 'github' : $ repo_api = new GitHub_API ( $ repo ) ; break ; case 'bitbucket' : if ( ! empty ( $ repo -> enterprise ) ) { $ repo_api = new Bitbucket_Server_API ( $ repo ) ; } else { $ repo_api = new Bitbucket_API ( $ repo ) ; } break ; case 'gitlab' : $ repo_api = new GitLab_API ( $ repo ) ; break ; case 'gitea' : $ repo_api = new Gitea_API ( $ repo ) ; break ; } return $ repo_api ; }
Get repo's API.

@param string         $git (github|bitbucket|gitlab|gitea)
@param bool|\stdClass $repo

@return \Fragen\GitHub_Updater\API\Bitbucket_API|
\Fragen\GitHub_Updater\API\Bitbucket_Server_API|
\Fragen\GitHub_Updater\API\Gitea_API|
\Fragen\GitHub_Updater\API\GitHub_API|
\Fragen\GitHub_Updater\API\GitLab_API $repo_api
Get repo s API .