Fync

API Reference

Complete method reference for all providers

Complete API Reference

This page provides a reference of all available methods across all providers. For quick examples, see the Provider Guides.

Table of Contents


GitHub API

Users Resource (github.users)

// Basic user operations
getUser({ username: string })                    // Get user profile
getUserRepos({ username: string, per_page?: number, page?: number })
getUserGists({ username: string, per_page?: number })
getUserFollowers({ username: string })
getUserFollowing({ username: string })
getUserStarred({ username: string })
getUserOrgs({ username: string })
getUserEvents({ username: string })
getUserReceivedEvents({ username: string })
checkUserFollowing({ username: string, target: string })

Repositories Resource (github.repos)

// Repository information
getRepo({ owner: string, repo: string })
getRepoCommits({ owner: string, repo: string, per_page?: number, page?: number })
getRepoCommit({ owner: string, repo: string, sha: string })
getRepoBranches({ owner: string, repo: string })
getRepoTags({ owner: string, repo: string })
getRepoReleases({ owner: string, repo: string })
getRepoLatestRelease({ owner: string, repo: string })
getRepoContributors({ owner: string, repo: string })
getRepoLanguages({ owner: string, repo: string })
getRepoTopics({ owner: string, repo: string })
getRepoStargazers({ owner: string, repo: string })
getRepoForks({ owner: string, repo: string })
getRepoIssues({ owner: string, repo: string, state?: 'open'|'closed'|'all', per_page?: number })
getRepoIssue({ owner: string, repo: string, issue_number: number })
getRepoPulls({ owner: string, repo: string, state?: 'open'|'closed'|'all' })
getRepoPull({ owner: string, repo: string, pull_number: number })
getRepoContents({ owner: string, repo: string, path: string, ref?: string })
getRepoReadme({ owner: string, repo: string })

// Repository mutations
createRepoIssue(data: { title: string, body?: string, labels?: string[] }, { owner: string, repo: string })
updateRepoIssue(data: { title?: string, body?: string, state?: string }, { owner: string, repo: string, issue_number: number })
createRepoPull(data: { title: string, head: string, base: string, body?: string }, { owner: string, repo: string })

Search Resource (github.search)

searchRepos({ q: string, sort?: string, order?: 'asc'|'desc', per_page?: number })
searchCode({ q: string, sort?: string, order?: 'asc'|'desc' })
searchIssues({ q: string, sort?: string, order?: 'asc'|'desc' })
searchUsers({ q: string, sort?: string, order?: 'asc'|'desc' })
searchTopics({ q: string })
searchLabels({ repository_id: number, q: string })
searchCommits({ q: string, sort?: string, order?: 'asc'|'desc' })

Activity Resource (github.activity)

getPublicEvents({})
getNotifications({ all?: boolean, participating?: boolean })
markNotificationAsRead({}, { notification_id: string })
getStarred({ sort?: 'created'|'updated', direction?: 'asc'|'desc' })
starRepo({}, { owner: string, repo: string })
unstarRepo({}, { owner: string, repo: string })
getWatching({ sort?: 'created'|'updated', direction?: 'asc'|'desc' })
watchRepo({}, { owner: string, repo: string })
unwatchRepo({}, { owner: string, repo: string })

Enhanced Helper Methods

// Convenience methods
github.getUser('octocat')
github.getRepository('facebook', 'react')
github.searchRepositories('language:ts stars:>1000')
github.getAuthenticatedUser()

Spotify API

Music Catalog

// Tracks
getTrack({ id: string })
getTracks({ ids?: string })
getTrackAudioFeatures({ id: string })
getTrackAudioAnalysis({ id: string })

// Artists
getArtist({ id: string })
getArtists({ ids?: string })
getArtistAlbums({ id: string, include_groups?: string })
getArtistTopTracks({ id: string, market?: string })
getArtistRelatedArtists({ id: string })

// Albums
getAlbum({ id: string })
getAlbums({ ids?: string })
getAlbumTracks({ id: string, limit?: number })

// Search
search({ q: string, type: string, limit?: number, offset?: number })

Playlist Management

// Playlist operations
getPlaylist({ playlist_id: string })
getPlaylistTracks({ playlist_id: string, limit?: number, offset?: number })
createPlaylist(data: { name: string, description?: string, public?: boolean }, { user_id: string })
updatePlaylist(data: { name?: string, description?: string, public?: boolean }, { playlist_id: string })

// Track management
addTracksToPlaylist(data: { uris: string[] }, { playlist_id: string })
removeTracksFromPlaylist(data: { tracks: Array }, { playlist_id: string })
reorderPlaylistTracks(data: { range_start: number, insert_before: number, range_length?: number }, { playlist_id: string })
replacePlaylistTracks(data: { uris: string[] }, { playlist_id: string })

Player Control

// Playback control
getPlaybackState({})
getCurrentlyPlaying({})
getDevices({})
play(data: { context_uri?: string, uris?: string[], offset?: number, device_id?: string }, {})
pause(data: { device_id?: string }, {})
next(data: { device_id?: string }, {})
previous(data: { device_id?: string }, {})
seek(data: { position_ms: number, device_id?: string }, {})
setVolume(data: { volume_percent: number, device_id?: string }, {})
setRepeat(data: { state: 'off'|'track'|'context', device_id?: string }, {})
setShuffle(data: { state: boolean, device_id?: string }, {})
transferPlayback(data: { device_ids: string[], play?: boolean }, {})
addToQueue(data: { uri: string, device_id?: string }, {})

User Data & Library

// User profile
getCurrentUser({})
getMyTopArtists({ time_range?: 'long_term'|'medium_term'|'short_term', limit?: number })
getMyTopTracks({ time_range?: 'long_term'|'medium_term'|'short_term', limit?: number })
getMyPlaylists({ limit?: number, offset?: number })
getMyRecentlyPlayed({ limit?: number, before?: number, after?: number })

// Library management
getMySavedTracks({ limit?: number, offset?: number })
getMySavedAlbums({ limit?: number, offset?: number })
saveTracks(data: { ids: string[] }, {})
removeSavedTracks(data: { ids: string[] }, {})
saveAlbums(data: { ids: string[] }, {})
removeAlbums(data: { ids: string[] }, {})

// Following
getFollowedArtists({ limit?: number })
followArtists(data: { ids: string[] }, {})
unfollowArtists(data: { ids: string[] }, {})
followPlaylist(data: { public?: boolean }, { playlist_id: string })
unfollowPlaylist({}, { playlist_id: string })

Enhanced Helper Methods

// Convenience methods
spotify.getTrack(trackId)
spotify.getArtist(artistId)
spotify.getAlbum(albumId)
spotify.getPlaylist(playlistId)
spotify.search('drake', ['artist'])
spotify.getCurrentUser()
spotify.getMyTopTracks()
spotify.play({ uris: ['spotify:track:123'] })
spotify.pausePlayback()
spotify.addTracksToPlaylist(playlistId, ['spotify:track:123'])
spotify.removeTracksFromPlaylist(playlistId, ['spotify:track:456'])

Google Calendar API

Calendar Management

// Calendar operations
listCalendars({ showDeleted?: boolean })
getCalendar({ calendarId: string })
insertCalendar(data: { summary: string, description?: string, timeZone?: string }, {})
updateCalendar(data: { summary?: string, description?: string }, { calendarId: string })
patchCalendar(data: { ...patchData }, { calendarId: string })
deleteCalendar({}, { calendarId: string })
clearCalendar({}, { calendarId: string })

// Calendar list management
listCalendarList({ showDeleted?: boolean })
getCalendarListEntry({ calendarId: string })
insertCalendarListEntry(data: { id: string }, {})
updateCalendarListEntry(data: { ...updateData }, { calendarId: string })
patchCalendarListEntry(data: { ...patchData }, { calendarId: string })
deleteCalendarListEntry({}, { calendarId: string })

Event Management

// Event CRUD
listEvents({ calendarId: string, maxResults?: number, timeMin?: string, timeMax?: string, q?: string })
getEvent({ calendarId: string, eventId: string })
insertEvent(data: { summary: string, start: {}, end: {}, description?: string }, { calendarId: string })
updateEvent(data: { summary?: string, start?: {}, end?: {} }, { calendarId: string, eventId: string })
patchEvent(data: { ...patchData }, { calendarId: string, eventId: string })
deleteEvent({}, { calendarId: string, eventId: string })

// Event utilities
moveEvent(data: { destination: string }, { calendarId: string, eventId: string })
watchEvents(data: { id: string, type: 'web_hook', address: string }, { calendarId: string })
quickAddEvent(data: { text: string }, { calendarId: string })
getEventInstances({ calendarId: string, eventId: string })

Scheduling & Availability

// Free/busy information
queryFreeBusy(data: { timeMin: string, timeMax: string, items: Array }, {})

// Colors
getColors({})

Sharing & Permissions

// Access Control List (ACL)
listAcl({ calendarId: string })
getAclRule({ calendarId: string, ruleId: string })
insertAclRule(data: { role: string, scope: { type: string } }, { calendarId: string })
updateAclRule(data: { role: string }, { calendarId: string, ruleId: string })
patchAclRule(data: { role?: string }, { calendarId: string, ruleId: string })
deleteAclRule({}, { calendarId: string, ruleId: string })

Settings

listSettings({})
getSetting({ setting: string })
watchSettings(data: { id: string }, {})

Enhanced Helper Methods

// Convenience methods
calendar.getCalendars()
calendar.getCalendar(calendarId)
calendar.getEvents(calendarId)
calendar.getUpcomingEvents(calendarId, 10)
calendar.getTodaysEvents(calendarId)
calendar.createEvent(calendarId, { summary: 'Meeting' })
calendar.updateEvent(calendarId, eventId, { summary: 'Updated' })
calendar.deleteEvent(calendarId, eventId)
calendar.quickAddEvent(calendarId, 'Lunch tomorrow at 12pm')
calendar.isTimeSlotBusy(calendarId, startTime, endTime)

Google Drive API

File Operations

// Basic file operations
listFiles({ pageSize?: number, q?: string, spaces?: string, fields?: string })
getFile({ fileId: string })
createFile(data: { name: string, mimeType?: string, parents?: string[] }, {})
updateFile(data: { name?: string, ...metadata }, { fileId: string })
deleteFile({}, { fileId: string })
copyFile(data: { name: string }, { fileId: string })
moveFile(data: { addParents: string, removeParents: string }, { fileId: string })

// File content
exportFile({ fileId: string, mimeType: string })
downloadFile({ fileId: string })

// File utilities
generateIds({})
watchFile(data: { id: string, type: 'web_hook', address: string }, { fileId: string })
emptyTrash({}, {})
getFileMetadata({ fileId: string })
updateFileMetadata(data: { ...metadata }, { fileId: string })

Permissions & Sharing

// Permission management
listPermissions({ fileId: string })
getPermission({ fileId: string, permissionId: string })
createPermission(data: { type: string, role: string, emailAddress?: string }, { fileId: string })
updatePermission(data: { role: string }, { fileId: string, permissionId: string })
deletePermission({}, { fileId: string, permissionId: string })

Comments & Collaboration

// Comments
listComments({ fileId: string })
getComment({ fileId: string, commentId: string })
createComment(data: { content: string }, { fileId: string })
updateComment(data: { content: string }, { fileId: string, commentId: string })
deleteComment({}, { fileId: string, commentId: string })

// Replies
listReplies({ fileId: string, commentId: string })
getReply({ fileId: string, commentId: string, replyId: string })
createReply(data: { content: string }, { fileId: string, commentId: string })
updateReply(data: { content: string }, { fileId: string, commentId: string, replyId: string })
deleteReply({}, { fileId: string, commentId: string, replyId: string })

Version History

// Revisions
listRevisions({ fileId: string })
getRevision({ fileId: string, revisionId: string })
updateRevision(data: {...}, { fileId: string, revisionId: string })
deleteRevision({}, { fileId: string, revisionId: string })

Drive Organization

// Drives (Shared Drives)
listDrives({})
getDrive({ driveId: string })
createDrive(data: { name: string }, {})
updateDrive(data: { name?: string }, { driveId: string })
deleteDrive({}, { driveId: string })
hideDrive({}, { driveId: string })
unhideDrive({}, { driveId: string })

// Changes tracking
listChanges({ pageToken: string })
getStartPageToken({})
watchChanges(data: { id: string, type: 'web_hook', address: string }, {})

System Information

// Channels & About
stopChannel(data: { id: string, resourceId: string }, {})
getAbout({})

Enhanced Helper Methods

// Convenience methods
drive.listFiles()
drive.getFile(fileId)
drive.createFile({ name: 'Document' })
drive.updateFile(fileId, { name: 'Updated' })
drive.deleteFile(fileId)
drive.copyFile(fileId, 'Copy Name')
drive.moveFile(fileId, parentFolderId)
drive.downloadFile(fileId)
drive.exportFile(fileId, 'application/pdf')
drive.createFolder('New Folder')
drive.getFolderContents(folderId)
drive.searchFiles('query')
drive.getFilesByName('filename')
drive.getFilesByType('image/jpeg')
drive.shareFile(fileId, 'user@example.com')
drive.getPermissions(fileId)
drive.restoreFile(fileId)

Vercel API

Project Management

// Project operations
listProjects({ teamId?: string })
getProject({ projectId: string })
createProject(data: { name: string, framework?: string, buildCommand?: string }, {})
updateProject(data: { name?: string, buildCommand?: string }, { projectId: string })
deleteProject({}, { projectId: string })

// Project details
getProjectDomains({ projectId: string })
getProjectEnvVars({ projectId: string })
createProjectEnvVar(data: { key: string, value: string, target?: string[] }, { projectId: string })

Deployment Management

// Deployment operations
listDeployments({ projectId?: string })
getDeployment({ deploymentId: string })
createDeployment(data: { name: string, project: string, files?: object }, {})
deleteDeployment({}, { deploymentId: string })
cancelDeployment({}, { deploymentId: string })

// Deployment details
getDeploymentEvents({ deploymentId: string })
getDeploymentFiles({ deploymentId: string })

Domain Management

// Domain operations
listDomains({})
getDomain({ domain: string })
addDomain(data: { name: string }, {})
removeDomain({}, { domain: string })
verifyDomain(data: { name: string }, {})
getDomainConfig({ domain: string })

Team Management

// Team operations
listTeams({})
getTeam({ teamId: string })
createTeam(data: { name: string, slug?: string }, {})
updateTeam(data: { name?: string }, { teamId: string })
deleteTeam({}, { teamId: string })

// Team members
getTeamMembers({ teamId: string })
inviteTeamMember(data: { email: string, role: string }, { teamId: string })

User Management

// User operations
getUser({})
updateUser(data: { name?: string, bio?: string }, {})
deleteUser({}, {})
getUserEvents({})
getUserTokens({})

Enhanced Helper Methods

// Convenience methods
vercel.getProject(projectId)
vercel.listProjects(teamId)
vercel.getLatestDeployment(projectId)
vercel.getDeploymentStatus(deploymentId)
vercel.redeployProject(projectId)
vercel.getProjectAnalytics(projectId)
vercel.getDomainStatus(domain)
vercel.getTeamUsage(teamId)

Method Signature Patterns

Data-Bearing Methods (POST/PUT/PATCH/DELETE)

// Pattern: (data, options)
method(data: { ... }, { pathParam: string, queryParam?: string })

Non-Data Methods (GET/DELETE)

// Pattern: (options)
method({ pathParam: string, queryParam?: string })

Path Parameters

  • Placeholders like {owner}, {repo}, {playlist_id} are filled from options
  • Extra properties become query parameters
  • Example: getRepo({ owner: 'facebook', repo: 'react', per_page: 50 })

Error Handling

All methods throw on non-2xx responses:

try {
  const result = await api.method(params);
} catch (error) {
  console.error('API Error:', error.message);
}

This reference covers all major methods. For specific provider implementations and additional examples, see the individual provider guides.