caelum0x f80b04ae0f feat(ritgram): move GitGram app into railyard as Ritgram, next to Rithub
Moved later/gitgram-ai/gitgram/ to apps/ritgram/ (fresh history; full history stays in caelum0x/gitgram).
AITimeMachine stays separate in later/gitgram-ai per the Rithub master plan.
Logs, pid files and env files are ignored; GPL-3.0 mobile/proximity noted in THIRD_PARTY_NOTICES.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 04:18:46 +03:00

65 lines
1.9 KiB
TypeScript

import api from './api';
export const githubService = {
getRepositories: async () => {
const response = await api.get('/github/repositories');
return response.data;
},
getUserProjects: async (page = 1, limit = 20) => {
const response = await api.get('/github/projects', {
params: { page, limit },
});
return response.data;
},
getProject: async (projectId: string) => {
const response = await api.get(`/github/projects/${projectId}`);
return response.data;
},
syncProject: async (projectId: string) => {
const response = await api.post(`/github/projects/${projectId}/sync`);
return response.data;
},
syncAllProjects: async () => {
const response = await api.post('/github/sync/all');
return response.data;
},
createProject: async (data: { owner: string; repo: string; description?: string; tags?: string[] }) => {
const response = await api.post('/github/projects', data);
return response.data;
},
updateProject: async (projectId: string, data: { description?: string; tags?: string[] }) => {
const response = await api.put(`/github/projects/${projectId}`, data);
return response.data;
},
searchProjects: async (query: string, page = 1, limit = 20) => {
const response = await api.get('/search/projects', {
params: { q: query, page, limit },
});
return response.data;
},
saveProject: async (projectId: string) => {
const response = await api.post(`/github/projects/${projectId}/save`);
return response.data;
},
getSavedProjects: async (page = 1, limit = 20) => {
const response = await api.get('/github/projects/saved', {
params: { page, limit },
});
return response.data;
},
getRepositoryContent: async (owner: string, repo: string, path: string = '') => {
const response = await api.get(`/github/repos/${owner}/${repo}/contents/${path}`);
return response.data;
},
};