vue-use-github
v0.0.1
Published
Vue composable for fetching activities and information via GitHub API
Downloads
18
Maintainers
Readme
useGitHub Composable
useGitHub
is a custom Vue composable that provides an easy way to fetch and manage GitHub user data and repositories in your Vue applications.
Features
- Fetch GitHub user information
- Retrieve user's repositories
- Get user's pinned repositories
- Filter repositories by programming language
- Get top N repositories
Installation
npm install vue-use-github axios
API
Hook Parameters
username
: GitHub usernamepersonalAccessToken
: GitHub personal access token (required for fetching pinned repositories)
Return Values
userInfo
: Object containing user informationfollowers
: Array containing user's followers informationfollowings
: Array containing user's followings informationprofileReadme
: String in markdown format containing user profile's readmemetadata
: Object containing API response metadatagetRepositories
: Function to access and filter repositories
getRepositories()
Returns an object with the following methods:
all()
: Returns all repositorieswithLanguage(languages)
: Filters repositories by programming language(s)top(n)
: Returns top N repositoriespinned()
: Returns pinned repositories
Note
It requires the axios
library to be installed so make sure to install both vue-use-github
and axios
before using the composable.