8000 GitHub - remcostoeten/fync: A unified TypeScript library for easy access to popular APIs (GitHub, Spotify, GitLab, etc.)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A unified TypeScript library for easy access to popular APIs (GitHub, Spotify, GitLab, etc.)

License

Notifications You must be signed in to change notification settings

remcostoeten/fync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@remcostoeten/fync

npm version npm downloads GitHub license

A unified TypeScript library for easy access to popular APIs (GitHub, Spotify, GitLab, etc.)

Installation

npm install @remcostoeten/fync

Usage

Core API Access

import { createCore } from '@remcostoeten/fync'

const core = createCore()

Spotify API

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()

GitHub API

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')

API Reference

Spotify

The Spotify client provides access to:

  • User profile and library
  • Player controls
  • Playlists management
  • Search functionality
  • Album and track information

GitHub

The GitHub client provides access to:

  • User and organization information
  • Repository management
  • Issues and pull requests
  • Search functionality
  • Actions and workflows

Core

Shared utilities for:

  • HTTP client
  • Caching
  • Response handling
  • Pagination

Configuration

Both clients support configuration options for:

  • API tokens
  • Base URLs
  • Caching settings
  • Request timeouts

License

MIT

Contributing

Contributions are welcome! Please see the GitHub repository for more information.

0