A unified TypeScript library for easy access to popular APIs (GitHub, Spotify, GitLab, etc.)
npm install @remcostoeten/fync
import { createCore } from '@remcostoeten/fync'
const core = createCore()
import { Spotify } from '@remcostoeten/fync/spotify'
const spotify = Spotify({
token: 'your-spotify-token'
})
// Get current user
const user = await spotify.me.get()
// Search for tracks
const results = await spotify.search.tracks('your query')
// Get playlists
const playlists = await spotify.me.playlists.get()
import { GitHub } from '@remcostoeten/fync/github'
const github = GitHub({
token: 'your-github-token'
})
// Get user info
const user = await github.user('username').get()
// Get repository
const repo = await github.repo('owner', 'repo').get()
// Search repositories
const repos = await github.search.repositories('query')
The Spotify client provides access to:
- User profile and library
- Player controls
- Playlists management
- Search functionality
- Album and track information
The GitHub client provides access to:
- User and organization information
- Repository management
- Issues and pull requests
- Search functionality
- Actions and workflows
Shared utilities for:
- HTTP client
- Caching
- Response handling
- Pagination
Both clients support configuration options for:
- API tokens
- Base URLs
- Caching settings
- Request timeouts
MIT
Contributions are welcome! Please see the GitHub repository for more information.