11 lines
326 B
TypeScript
11 lines
326 B
TypeScript
import type { GithubRepository } from '~/types/github-repository';
|
|
|
|
export const useGithub = () => {
|
|
const api = useApi('https://api.github.com');
|
|
|
|
const getRepoMeta = (owner: string, name: string): UseApiResponse<GithubRepository> =>
|
|
api.get<GithubRepository>(`repos/${owner}/${name}`);
|
|
|
|
return { getRepoMeta };
|
|
};
|